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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
chore: merge main into claim/issue-3870
[._.]/ Adam Eivy96e8c60d1dff
diff --cc .changelog/NEXT.mdindex d65ea46e07,ff4884db99..8a596a0380--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -47,4 -47,5 +47,6 @@@- The Pipeline's Reverse Outline map now keeps the selected scene in the URL (`?scene=<id>`) instead of component state, so the open scene detail survives a reload and can be linked to or shared. A stale id — after regenerating the outline, say — falls back to the "click a marker" placeholder rather than a blank card, and regenerating clears the selection outright.- The six "file too large" toasts — album covers, artist portraits, tracks, author headshots, reference audio and OpenClaw attachments — now render their size cap through the shared `formatBytes` helper instead of each dividing by 1024 twice and gluing on "MB". The rendered text gains a space before the unit (`12 MB` rather than `12MB`), which is what the rest of PortOS already shows and what the reference-audio toast already read. The OpenClaw combined-attachment message picked up the same treatment for its decoded-size estimate, so the two limits it can report no longer print their units two different ways.- The post-restart agent-recovery path is now its own function instead of a 65-line branch inlined at the top of `handleAgentCompletion`, so a change to either it or the live in-memory completion path no longer means reading past the other. The pause guard that path sits behind — the one keeping a stray completion event from cleaning the worktree out from under a later resume — is now pinned by tests that call the real function rather than by a source-text assertion that broke the moment the code moved.+- Every inline `new Date(x).toLocaleDateString()` / `.toLocaleTimeString()` in the client — roughly seventy across fifty components, from the calendar views and CyberCity HUD to the CoS tabs, goals, media queue and app-update panels — now routes through `client/src/utils/formatters.js`, so a change to how PortOS renders a date is one edit rather than fifty. The helper set grew to cover the shapes that were being spelled out by hand (`formatDateNumeric`, `formatTimeOfDaySeconds`, `formatMonthDay`, `formatMonthYear`, `formatWeekdayShort`, `formatWeekdayDate`, `formatWeekdayTime`), and `formatClockTime` gained `seconds` / `hour12` options instead of a second copy of itself. Two long-standing paper cuts go with it: a bare `YYYY-MM-DD` is now anchored at local midnight everywhere (a plain `new Date('2026-03-05')` is UTC midnight and renders as the 4th anywhere west of Greenwich — call sites used to fix this by hand, and the ones that forgot showed the wrong day), and a missing or malformed timestamp renders a caller-chosen fallback instead of the literal text "Invalid Date" — including the calendar event-detail formatter, which had ended up guarding its all-day branch but not its timed one.+ - The ~460-line Sprite Manager block in `server/lib/validation.js` now lives in its own `server/lib/spriteValidation.js`, matching the eleven other per-domain validation files. A straight lift wasn't possible: the block leans on four fragments (`recordRenderPinFields`, `cloudModelIdString`, `grokVideoDurationSchema`, `isSafeSubdirFilter`) that music video, universe builder, series, video gen and backup also use, and a domain file can't read them back out of `validation.js` — ESM hoists its `export * from` re-exports, so the read lands in the temporal dead zone. Those four moved to a new leaf `server/lib/sharedSchemas.js` first, with `validation.js` still re-exporting them, so every existing deep import keeps working unchanged.+ - The TUI runner's response-file tests no longer fail at random on a busy machine. They drive the runner's one-second size-stability window with fake timers, but the polls behind that window read the response file from real disk — and a real read finishes on Node's threadpool, which advancing fake timers does not wait for. Under load a poll's read could land after the test had already moved on, so the run took the timeout or fallback path and the failure looked like a regression in whatever diff happened to be under test. Those five tests now serve the response file from memory, so every read settles as a microtask the timer advance always drains, and the assertions are unchanged.