5.3 KiB
TODO
Deferred work. Context: Officer is collapsing from multi-tenant / open-source-ready to a single-user platform. Treat multi-tenant indirection as accidental complexity, not a requirement.
Single-user cleanup
-
Remove dead
usernameplumbing.pi-bridge.spawnPino longer usesusername— it always runs as the service user. But the handlers still computetoShellUsername(...)and thread it throughsendAndAwait→spawnOptions, where nothing reads it.send-claude-codedeclaresusername(lines 8, 36) without using it. Typechecks clean today (excess-property checks don't fire on variables), so it silently looks load-bearing. Touches:channels/{whatsapp,telegram,discord}/handler.ts,channels/send-and-await.ts,channels/send-claude-code.ts. After this,toShellUsernamehas one caller left (provision.ts→generateClaudeSettings) and may be inlinable. -
Delete or gut
scripts/provision-existing-users.sh. Line ~100 runssudo useradd -d "$HOME_DIR" -s /bin/zsh -M "$shell_user". This is what created the four vestigial Unix accounts (andrepadez,john-wick,fedra,miguelbenoliel) that cluttered the lightdm greeter. Nothing in the server creates Unix users; if this script runs again they come back. -
Collapse the rest of the multi-tenant machinery. Candidates, in rough order of payoff: roles (
Super Admin/Member), the sandboxed-vs-unsandboxed path split, per-email home dirs underdev-data/{email}/home, per-user server state (dock, user apps, AppRegistry keyed by email), and auth (passkeys-per-origin, JWT signin, unmountedPasskeyGate).
- Gmail-style search operators. Extend the FTS5 search (
/email/search,searchEmails+toFtsQueryinapi/email/email-db.ts) to parse structured operators likefrom:,to:,subject:,has:attachment,label:,before:/after:(dates),is:unread, quoted phrases, andOR. TodaytoFtsQueryjust does per-term prefix-AND across all columns. Approach: split the query into (a) field-scoped text → FTS5 column filters (theemails_ftstable already has named columnssubject/sender/recipients/snippet/body, sosubject:foo→{subject}:"foo"*in the MATCH;from:x→ thesendercolumn) and (b) structured filters applied as SQLWHEREalongside the MATCH —has:attachment→attachment_count > 0,before:/after:→daterange,is:unread→read = 0,label:→labels LIKE. Free text stays full-text. Frontend: keep the single search box (operators are typed inline, Gmail-style) — no UI change needed beyond maybe a hint/legend.
Known bugs
-
bootstrap.tsrunsnpm install -gfor Pi on every boot.findPiPackageDirchecks stale paths and an outdated package name, soinstallPialways fires and floods the logs withEEXISTnoise. Should detect@earendil-works/pi-coding-agentat the real npm prefix. -
VNC mirror can orphan/duplicate x11vnc across sidecar restarts.
vnc-manager.startSessiontracks the running mirror in module-level state and skips spawning only if that pid is alive. On a vnc-sidecar restart the state resets to null while the old x11vnc keeps running orphaned; the nextstartSessionspawns a second one. Worse,waitForPorttreats any listener on 5900 as success, so the platform can believe it started a mirror that is actually a stale process — desyncing into multiple contending x11vnc instances on:0(suspected cause of click-lag on 2026-07-16, cleared by killing all but one). Fix: before spawning, kill any existingx11vnc -display :0/ free port 5900 (anExecStartPre-style cleanup, like the old officer-vnc.service unit did withvncserver -kill).
Infra (alpha)
-
Delete
/etc/systemd/system/officer-vnc.service. Hand-installed unit (not in this repo) that ranvncserver :1 -geometry 1920x1080 -localhost yes -fgwithRestart=on-failure, enabled at boot — it kept a whole parallel XFCE session alive on:1(283 MB, 166 tasks) independently of the platform, and silently respawned it whenever the display was killed. Obsolete now that the Desktop panel mirrors:0via x11vnc. Disabled 2026-07-15 (systemctl disable --now), but the unit file is still on disk. Nothing in the codebase recreates it and nothing documents it, so delete the file rather than leave a mystery service onesystemctl enableaway from returning. -
ufwblocks port 9010 on the LAN. Default deny incoming; only22/tcp,80/tcp,443/tcp, and everything ontailscale0are allowed — sohttp://192.168.47.196:9010is unreachable from the LAN while localhost and Tailscale work. Fix:sudo ufw allow from 192.168.47.0/24 to any port 9010 proto tcp
Backburner
- Music tagging feature (
/music, Mp3tag-inspired). v1 was scoped as a two-panel workspace — file browser left, table right, single "Load" context-menu item flattening audio files into the table. Discarded before completion; would needGET /file-browser/flatten-audio, auseFilesAPI.flattenAudiomethod, and the Music app panel rebuilt from scratch.