- Entrypoint: chown -R /data (not just the directory) so existing
volume files owned by root become writable by node user
- Entrypoint: add echo logging so startup progress is visible
- db.js: verify /data is writable before opening SQLite
- db.js: wrap Database() constructor in try-catch with clear error
message instead of crashing silently at ESM import time
_configPath was called at lines 26/28 (CACHE_FILE, DISABLED_RECIPES_FILE)
but only defined at line 79. Moved the definition to the top of the
function body so it exists before the first call.
The Opus package manager deletes the entire package directory on
update (fs.delete(packageDir)) before re-downloading files. This
wiped all config files (.manager_config, .client_config, etc.) that
were stored inside packages/inventory-manager/.
Fix: add _configPath() helper to every program that resolves config
file paths to usr/config/inventory-manager/ when running under Opus,
which lives outside the package directory and survives updates.
Falls back to the local _path() for standalone (non-Opus) use.
Updated files:
- inventoryManager.lua, manager/config.lua, inventoryClient.lua,
inventoryWebBridge.lua, dropperController.lua, craftingTurtle.lua
- .package install script: saves configs to usr/config/inventory-manager/
- autorun/startup.lua: checks both persistent and package dirs
- startup/client.lua: uses persistent dir for .client_setup/.dropper_config
- web/server/Dockerfile: switch health check to wget (from prior fix)
Spawning a full Node process for health checks is slow on Alpine and
can exceed the 3s timeout, causing the container to be marked unhealthy.
Use wget (built into Alpine) instead, and increase start_period to 15s.
- Updated the turtle status check logic to use ctx.craftTurtleOk for determining if the crafting turtle is available.
- Adjusted the logic to fall back on checking ctx.craftTurtleName and its peripheral presence if ctx.craftTurtleOk is not set.
- Implemented a client dashboard mirroring manager/display.lua
- Integrated state management via master broadcasts (ctx.cache, ctx.activity)
- Enabled action commands to master through ctx.sendToMaster()
- Established UI components for inventory management and smelting operations
- Included item filtering, stock tracking, and crafting capabilities
- Designed responsive layouts for main and smelter dashboards
Opus initChildren uses pairs() which has non-deterministic ordering.
The keyboard overlay occupies the same screen space as alertBar,
footerBar, and bottomBar. If those bars end up later in the children
array, they render on top and hide the keyboard.
Added raise() after enabling the keyboard to move it to the end
of the children array, ensuring it renders on top.
Same bug as the manager: CLIENT_BARREL_NAME == '' caused return
inside parallel.waitForAny, killing all tasks instantly.
Replace with infinite sleep when barrel is unconfigured.
- startup/client.lua now prompts on first run: asks if a dropper
is next to the computer, and if so, which side it's on
- Saves config to .dropper_config (JSON with dropperSide,
redstoneSide, enabled)
- Only launches dropperController if dropper is enabled
- dropperController.lua reads .dropper_config for its sides
instead of hardcoding 'back'
- Delete .client_setup to re-run the setup wizard
UI.TextEntry requires keyboard input which monitors don't have.
Replaced it with the original touch-friendly approach:
- Search bar shows query text with toggle button (? / X)
- Tapping the search row opens an on-screen keyboard overlay
- 3-row QWERTY layout with Bksp, Done, Space, Clr keys
- Keyboard overlays the bottom status bars when active
- All key zones use touch hit-testing for monitor_touch events
- Add entrypoint script that ensures /data is owned by node user
before dropping privileges with su-exec
- Remove USER node from Dockerfile (entrypoint handles it)
- Change client depends_on to service_healthy so nginx waits for
the server to pass its healthcheck before starting
Page:postInit defaults parent to UI.term (small computer terminal).
Window:postInit then calls setParent() which computes all child
dimensions from that small terminal. When we later re-parent to
the monitor device, the children retain their small dimensions.
Adding resize() before setParent() forces all children to
recompute dimensions from the correct monitor size.
Opus Canvas only renders children with enabled=true. Without
calling page:enable(), all widgets were skipped during render,
resulting in a blank black monitor.
Task 12 (supply chest) and Task 13 (network) returned immediately
when not configured, which caused parallel.waitForAny to exit and
the entire program to silently stop after cache build.
CC:Tweaked dofile loads files with _G as environment, but Opus
injects require into the program's sandbox _ENV. All dofile'd
modules (especially display.lua) could not see require.
Also add dropperController to apps.db.
- Add autorun/startup.lua for Opus package integration:
- Detects role from config files (.manager_config, .client_config, etc.)
- Registers reboot listener as kernel hook
- Launches program via shell.openForegroundTab()
- Client role also opens dropperController in separate tab
- Override grid eventHandler on actionable grids (itemGrid, smeltTab,
craftTab) to emit grid_select on single mouse_click, enabling
monitor touch to trigger actions immediately instead of requiring
double-click
- Implemented main dashboard UI with item display, status bar, and pagination.
- Added touch zones for item ordering, quantity selection, and search functionality.
- Created smelter dashboard with tabs for status, smelting, crafting, and missing recipes.
- Integrated keyboard input for search queries and item management.
- Enhanced drawing functions for better UI representation and interaction.
- Add _baseDir/_path() resolution using shell.getRunningProgram() in all
entry-point scripts (inventoryManager, inventoryClient, craftingTurtle,
inventoryWebBridge)
- Pass _path function through to manager/config.lua for data/ and config files
- Config files (.manager_config, .inventory_cache, etc.) now resolve relative
to the package directory rather than CWD
- Exclude startup/ auto-updater scripts from Opus .package manifest
- All dofile() calls now use _path() for portable path resolution