4 Commits
Author SHA1 Message Date
OmO Orchestrator 972f578584 fix(run-local): serve HTTPS by default with an auto-generated self-signed cert
Root cause of the wallet balance stuck at '--' and every other mini-app
write silently failing: @noble/ed25519's signing needs crypto.subtle,
which every browser restricts to a secure context (https://, or
http://localhost). A plain http://<lan-ip>:port origin - exactly what a
second device on the same network needs to reach this - is NOT a secure
context, so crypto.subtle is undefined there and init()'s promise
rejects with no .catch(), leaving accountId stuck at undefined forever.

Reproduced directly against the live deployment with a real headless
browser: confirmed 'crypto.subtle must be defined, consider polyfill'
in the console, isSecureContext: false. Fixed by generating a
self-signed cert (openssl, auto-generated on first run, reused after,
SANs cover localhost/127.0.0.1/every detected LAN IPv4) and serving
HTTPS by default - verified end to end: hasSubtle: true,
isSecureContext: true, wallet balance resolves to a real value instead
of '--'. HTTP_ONLY=1 opts back into plain HTTP for same-machine-only
testing, where http://localhost is already a secure context on its own.
2026-11-20 23:43:06 -05:00
OmO Orchestrator 033db1bfd1 fix(run-local): default data dir to cwd, not the read-only nix store
'nix run' failed with ENOENT trying to mkdir inside the built package's
own Nix store path (.../the-commons-hollow-0.0.0/.data) - Nix store
paths are immutable by design, mkdir there can never succeed regardless
of permissions. The data directory must default to somewhere the
invoking user actually controls: process.cwd(), not the script's own
install location. Verified end to end through the real flake: 'nix
build' + 'nix run' from a separate writable directory now creates
.data there and serves real HTTP 200.
2026-11-20 23:28:39 -05:00
OmO Orchestrator 8cdfcf631e feat(flake): add 'nix run' launcher, no system config needed
Per explicit preference: no NixOS module/global config edit required.
'nix run .' starts one process serving both the static frontend and
api/* on one auto-picked free port (tries 3001, falls back to any free
port). Ctrl+C or kill stops it; only ./.data's SQLite files persist.
Verified directly: real HTTP 200 on the served frontend.
2026-11-20 23:11:42 -05:00
OmO Orchestrator d22361a613 feat: persist synced event-log history across server runs (SQLite relay)
The event relay was an in-memory array that started empty on every process, so
synced history vanished on every API-server restart. Persist it to a gitignored
.data/events.sqlite3 via node:sqlite like the blob store (EVENT_DB_PATH override;
seq rowid pull cursor; UNIQUE(authorPubkey,signature) push idempotency), keeping
the exact exported API. Synced history now survives restarts and keeps growing,
and a fresh device pulls the whole lived-in history on load; ShellLayout adds a
light 6s poll for live cross-device reflection. Adds a dev:all script, isolates
the two integration tests to a temp EVENT_DB_PATH, documents EVENT_DB_PATH.
2026-11-20 02:30:03 -05:00