Files
platform/TODO.md
T
pastilhasandClaude Opus 4.8 1ed12cd3ba resolve a relative task cwd against the user's home before spawning
the file browser sends msg.cwd relative to the user's home and it went straight to
Bun.spawn, which resolves it against the server's cwd. when that directory does not
exist posix_spawn reports ENOENT naming the binary rather than the directory, so
"Convert Audio" failed with the misleading "posix_spawn 'bash'".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 00:38:12 +00:00

56 lines
3.4 KiB
Markdown

# 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 `username` plumbing.** `pi-bridge.spawnPi` no longer uses `username` — it always
runs as the service user. But the handlers still compute `toShellUsername(...)` and thread it
through `sendAndAwait``spawnOptions`, where nothing reads it. `send-claude-code` declares
`username` (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, `toShellUsername` has one caller left
(`provision.ts``generateClaudeSettings`) and may be inlinable.
- [ ] **Delete or gut `scripts/provision-existing-users.sh`.** Line ~100 runs
`sudo 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
under `dev-data/{email}/home`, per-user server state (dock, user apps, AppRegistry keyed by
email), and auth (passkeys-per-origin, JWT signin, unmounted `PasskeyGate`).
## Known bugs
- [ ] **`bootstrap.ts` runs `npm install -g` for Pi on every boot.** `findPiPackageDir` checks stale
paths and an outdated package name, so `installPi` always fires and floods the logs with
`EEXIST` noise. Should detect `@earendil-works/pi-coding-agent` at the real npm prefix.
## Infra (alpha)
- [ ] **Delete `/etc/systemd/system/officer-vnc.service`.** Hand-installed unit (not in this repo)
that ran `vncserver :1 -geometry 1920x1080 -localhost yes -fg` with `Restart=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 `:0` via 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
one `systemctl enable` away from returning.
- [ ] **`ufw` blocks port 9010 on the LAN.** Default deny incoming; only `22/tcp`, `80/tcp`,
`443/tcp`, and everything on `tailscale0` are allowed — so `http://192.168.47.196:9010` is
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 need `GET /file-browser/flatten-audio`, a
`useFilesAPI.flattenAudio` method, and the Music app panel rebuilt from scratch.