Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Merge pull request #1130 from atomantic/fix/catalog-user-type-sync-converge

[._.]/ Adam Eivyfbb68f2044f4
diff --cc .changelog/NEXT.md
index 7d44d3e7ec,3f1536f2ca..e52fcb4199
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@@ -8,10 -8,10 +8,12 @@@
- **Public API surface with per-API auth gating (Voice/TTS + sdapi):** PortOS can now serve individual services as HTTP APIs on your tailnet. A new **Settings → API Access** tab exposes per-API toggles — *Expose on the network* (off by default) and *Require auth* (off = passwordless) — so you can keep the whole app behind your PortOS password while leaving the **Voice/TTS** and **Image Gen (sdapi)** APIs open for other machines to call. A deliberately-minimal `POST /api/voice/public/synthesize` (plus `/voices` and `/engines`) turns text into WAV audio with any engine/voice/rate; config and process-control endpoints always stay gated. A single in-tree registry (`server/lib/apiRegistry.js`) drives the auth-gate exemptions, the settings UI, and a native **OpenAPI 3.1 spec** at `GET /api/api-docs/openapi.json` (no swagger dependency — request bodies are generated from the same Zod schemas the routes validate against). The API Access tab shows each API's public base URL and a copy-paste `curl` example, and the Voice settings tab links to it. Defaults are safe: both APIs ship not-exposed and passwordless-once-exposed, with a migration seeding the key for existing installs.
+- **Live TUI runs are now viewable AND drivable in the Shell page** — one-shot AI runs that drive a terminal UI (Claude Code, Codex, etc.) — like the manuscript editor's editorial review and pipeline stages — now appear in **Developer Tools → Shell** as fully interactive session tabs (a pulsing bot-icon "live" tab, plus a live-run count in the header). Previously these spawned an invisible PTY you couldn't see; now you can open the tab to watch the run's live output, scroll its recent history (last 50 KB buffered for late attach), **type into it** to answer a question the model is waiting on or steer it mid-run, and **Stop** it if it hangs. So a watched run isn't snapped shut while you're reading or about to answer, the runner pauses its 8-second idle-auto-complete while you have the tab open — the run then ends on natural exit, an explicit Stop, or its configured max-time backstop (unattended pipeline runs keep the snappy idle timing). Tabs are labelled by the run's source (e.g. `pipeline-manuscript-completeness`), don't count toward the shell-session cap, and are skipped by Shell's auto-attach (you opt in by clicking), so the default "give me a shell" behavior is unchanged. The interactive-shell cap was also raised from 5 to 20. (`server/services/shell.js`, `server/lib/tuiPromptRunner.js`, `client/src/pages/Shell.jsx`)
+
## Fixed
+ - **Catalog user-type sync now converges instead of re-applying every cycle** — federated catalog *user-defined types* used an at-or-newer (`>=`) last-write-wins comparison, so a peer re-sending a type you already held at the same timestamp was re-adopted, re-written, and re-counted as a change on every sync cycle. The logs showed a constant non-zero count (e.g. `Synced with <peer>: 3 catalog changes`) once a minute forever, and the slice was rewritten needlessly each pass. The merge now uses strict-newer (`>`), matching the SQL LWW guard every other catalog kind already uses (`EXCLUDED.updated_at > …updated_at`): an equal-clock echo is a skip, so the merge is idempotent and the cycle settles to zero changes. (`server/services/catalogSync.js`)
+
- **[issue-1080] Notes synced from other machines become searchable promptly** — a Brain note, daily-log entry, person, project, or idea created or edited on one of your machines is now re-indexed into semantic memory on the others as soon as it syncs, instead of waiting for a full manual re-sync. Edits and deletes that arrive from a peer also refresh or retire the matching memory entry, so search no longer surfaces stale copies of records that changed elsewhere. A new **Refresh embeddings** button on the Brain graph re-indexes everything in one pass to heal anything that drifted before this fix.
## Changed