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 #1429 from atomantic/claim/issue-1393

[._.]/ Adam Eivy1680b5d56981
diff --cc .changelog/NEXT.md
index ec9146b458,50dd488cde..610d829b2a
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@@ -113,12 -113,10 +113,14 @@@
## Fixed
+ - **[issue-1393] The universe base-style probe now scopes its in-flight render per universe instead of remounting on every switch.** The probe spinner used to be kept from leaking across universe switches by remounting the whole `StyleProbeImage` (a `key={universe.id}` in the Universe Builder and Story Builder). That worked but had two costs: every switch re-ran the probe's `{ silent: true }` image-settings GET, and switching *away* from an in-flight render abandoned its completion — the server still filed the image, but switching back never resumed the spinner or pinned the result onto the universe's style refs for that session. `useSingleImageRender` now takes a `scopeId` that namespaces the single-target key per universe (`<id>:__single__`), so the displayed universe's job is read without a remount: no per-switch settings refetch, and switching back to a still-running (or already-finished) render resumes it and captures its completion. The mid-render style-drift guard is now keyed per universe too, so a stale image can't pin to the wrong record when two probes overlap across a switch. And because the render slot no longer remounts to reset itself, a render that *fails or is canceled* (which never produces a filename, so the slot's completion path can't clear it) now clears the stuck job explicitly — so a failed probe leaves the slot ready to re-render instead of disabling regenerate for the rest of the session. (`client/src/hooks/useSingleImageRender.js`, `client/src/components/universe/{StyleProbeImage,EntryThumbSlot}.jsx`, `client/src/pages/{UniverseBuilder,StoryBuilder}.jsx`, #1393)
+
- **[issue-1422] Re-planning a goal that has scheduled calendar blocks no longer silently strands those calendar events, and a malformed AI plan now fails fast.** Accepting a new AI-generated plan (either *Generate Plan* phases or *Decompose into Tasks*) replaces a goal's milestones wholesale — but if you'd already pushed those milestones onto your calendar as time blocks, the old blocks were left pointing at milestones that no longer existed. Accepting now refuses with a clear message asking you to unschedule first, so your calendar can't drift out of sync with your plan. Separately, both *Generate Plan* and *Decompose into Tasks* now validate the AI's proposal the moment it comes back — a garbled response surfaces a clear error up front instead of looking fine in the review screen and only breaking when you try to accept it.
+- **Brain graph no longer crashes the tab at scale — it loads a bounded view and you navigate by search + focus.** With a large brain (~1500 nodes) the graph tried to render the *entire* graph at once, and a server bug made that catastrophic: shared-tag edges were computed all-pairs per tag with no per-node cap, ballooning to **>1,000,000 edges** that the synchronous force layout and three.js renderer choked on — the tab froze and crashed within ~a minute. The graph is now **bounded by design**: it lands on an **overview** of the most-connected memories, a **search box** jumps to any memory across the whole brain, and **double-clicking a node** (or its "Explore connections" button) re-focuses on that node's neighborhood with a **breadcrumb trail + Back / Overview** to retrace. Each view is capped (≤ ~150 nodes, a few hundred edges) so the renderer stays fast, and the shared-tag edge computation is now capped per node (top-8) at the source, so the million-edge explosion can't recur. New endpoints: `GET /api/brain/graph?focus=&limit=` (overview vs. neighborhood) and `GET /api/brain/graph/search-index`. (`server/services/brainGraph.js`, `server/routes/brain.js`, `client/src/components/brain/tabs/BrainGraph.jsx`, `client/src/lib/brainGraphFocus.js`)
+
+- **Brain graph: embedding refresh now shows it's working, can be targeted, and an isolated node can always be cleared.** (1) The only feedback for the long server-side re-embed was a tiny braille spinner inside the button — easy to miss, so the page looked frozen; it now raises a persistent loading toast that stays up for the duration and swaps in place to the success/error result. (2) Rather than always re-embedding *everything*, the graph now reports **how many records are missing an embedding** and offers a fast **"N missing · Embed"** backfill that processes only those (unmapped records, or records whose memory vector is NULL because generation failed); the heavyweight re-embed-all is now a separate **"Refresh all"** gated behind an inline confirm (it can run for minutes). New endpoint `GET /api/brain/embeddings/status` + `onlyMissing` on `POST /api/brain/bridge-sync`. (3) Selecting a node *isolates* it by dimming the rest — but dimmed nodes still capture clicks, so clicking "empty space" to clear often re-selected a dark node and `onPointerMissed` ignores any orbit drag, leaving the user stuck (the detail panel's × sits below the fold). There's now an always-visible **Clear selection** button on the canvas plus an **Esc** handler. (`server/services/brainMemoryBridge.js`, `server/services/memoryDB.js`, `server/services/memory.js`, `client/src/components/brain/tabs/BrainGraph.jsx`)
+
- **The Chief of Staff 3D avatar no longer slowly zooms itself in until you reload.** The full-bleed background avatar keeps a constant apparent size by moving the camera back as the panel grows (`CoSBackgroundCamera` derives `camera.position.z` from the live-measured canvas height). But a transient *zero / pre-layout / hidden* size reading — which fires when the agent panel collapses and re-expands, when the EventLog mounts on the "working on task" transition, or from tab-occlusion ResizeObserver frames — collapsed the scale factor to its floor and slammed the camera to its closest (most zoomed-in) position, which `OrbitControls` then latched with no guaranteed correction. Over a busy night of state transitions the avatar ended up "zoomed way in," fixable only by a page reload. The camera-distance math is now a pure, unit-tested helper that returns `null` for any degenerate (non-finite or sub-pixel) measurement, so those frames leave the camera at its last good framing instead of yanking it in. (`client/src/components/cos/CoSBackgroundCamera.jsx`)
- **`./update.sh` now tells you where to open PortOS — and the boot banner stops pointing at a dead `:5555`.** When a Tailscale cert is present, the user-facing `:5555` speaks HTTPS only, so a plain `http://localhost:5555` (the URL muscle memory reaches for, and the one you're left guessing after an update) just fails to connect — and `update.sh`/`update.ps1` printed no URL at all, so you'd end up on the Vite dev server at `:5554` by accident. Both update scripts now print the working access URL on completion (via the same `print-access-url.js` banner `setup.sh` already uses), leading with the loopback HTTP mirror `http://localhost:5553` that works with no cert warning. The server's own startup banner is reordered to match — it now leads with the local mirror URL instead of burying it under the remote Tailscale lines — and it no longer advertises a bogus Tailscale hostname (e.g. `https://undefined.<tailnet>.ts.net:5555`, produced when a cert was provisioned while MagicDNS was down) as "trusted." (`update.sh`, `update.ps1`, `server/index.js`)