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
theme the label/status overlays on the 3D and Three.js previews
[._.]/ Adam Eivyd3aae0a69b1b
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 4553b341de..afa95804d9 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -34,6 +34,8 @@## Fixed+- **Labels floating over 3D and Three.js previews now follow the active theme.** The status bar on a generating Three.js model read as dark green text on a near-black slab — that chrome was written as a fixed black scrim with white text, and on a light theme the white text is remapped to the theme's dark ink while the black scrim stays black. Overlay chrome across the 3D and Three.js surfaces (the generation status bar, the preview's background/explode and part-selection panels, the orbit hint and articulation badge, the mesh viewer's display-settings button, and the "Change image" labels on both pickers) now takes its surface and ink from the theme itself, so it matches the page and stays legible over a dark canvas, a light one, or a photograph.+- **Brain Memory and Media History no longer paint every record at once.** A live install with ~1.5k imported ChatGPT memories was mounting full Markdown trees for every card (~180k DOM nodes / multi-MB of text), and Media History mounted ~1.8k gallery cards with images in one grid — both tabs froze on open. Memory now shows a plain teaser for imported transcripts (full thread still opens in the conversation viewer) and both lists use a progressive "Show more" window so search still covers the full set while only a page of cards mounts. CoS 3D avatars also probe WebGL before creating a canvas, so headless/no-GPU displays degrade to a hint instead of unhandled `WebGLRenderer` rejections.- **The pre-episode arc-spine check now resolves at the altitude it judged at.** That checkpoint deliberately verifies the arc spine with the episode lineup hidden — no episodes have been planned in earnest yet, so it only asks whether the premise, principals, engine, and volume allocation are safe to expand. The auto-resolver behind it, though, was still handed the full episode lineup and the general "correct an episode synopsis when the contradiction originates there" instruction, so it answered spine findings by rewriting episode synopses the gate had never read. Those edits could not close what was flagged, the arc and volume text stayed unfixed, and the next spine verification came back with twice the blockers — a round that got reverted wholesale and paused the run. (Observed on a run that went in with 3 blocking findings, spent its round editing 3 episode synopses, and came back with 6.) Spine rounds now render the resolver the same episode-empty plan the verifier saw, tell it to fix the arc and volumes only, and discard any episode edits it returns anyway, so a customized or stale installed prompt can't re-open the blast radius. Nothing changes for the full arc gate that runs after episodes exist: it still verifies and repairs episode synopses, which is the only place an episode-scoped contradiction can converge. Sparse finding-keyed patches and the blocker-count rollback are untouched.diff --git a/client/src/CLAUDE.md b/client/src/CLAUDE.mdindex 622e6cceb2..ba95a71386 100644--- a/client/src/CLAUDE.md+++ b/client/src/CLAUDE.md@@ -9,6 +9,7 @@ These apply to React/Vite client code. Universal constraints (functional program- **Mobile responsive** - all pages should be mobile responsive friendly- **Above the fold** - keep actionable content and info above the fold and design pages for maximum information and access without scrolling- **No hardcoded localhost** - use `window.location.hostname` for URLs; app accessed via Tailscale remotely+- **Chrome floating over media uses `.port-media-overlay`** - a label, status bar, badge, or control panel sitting on top of an image, a video, or a 3D canvas takes its surface and ink from the theme (`.port-media-overlay`, or `.port-media-overlay-strong` for a small label directly on photography; `.port-media-overlay-item` for its buttons, `.port-media-overlay-divider` for its separators — all defined in `index.css`, which carries the mechanism and the rule for picking between this, `.always-dark`, and the City HUD remap). **Don't write `bg-black/NN` + `text-white`/`text-gray-N00` for this** — day mode remaps the text to the theme's dark ink while the black scrim stays black, so the label renders dark-on-black. Older overlays outside the 3D/Three.js pages still carry that idiom (migration tracked in #3796), so match the new convention rather than the nearest neighbor.- **Alphabetical navigation** - sidebar nav items in `Layout.jsx` are alphabetically ordered after the Dashboard+CyberCity top section and separator; children within collapsible sections are also alphabetical- **Reactive UI updates** - after mutations (delete, create, update), update local state directly instead of refetching the entire list from the server. Use `setState(prev => prev.filter(...))` or similar patterns for immediate feedbackdiff --git a/client/src/components/media/GlbViewer.jsx b/client/src/components/media/GlbViewer.jsxindex f62686e60d..603e630d87 100644--- a/client/src/components/media/GlbViewer.jsx+++ b/client/src/components/media/GlbViewer.jsx@@ -160,7 +160,7 @@ export default function GlbViewer({aria-controls={controlsOpen ? controlsPanelId : undefined}aria-label="Preview display settings"title="Preview display settings"- className={`absolute right-2 top-2 z-10 inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-md border border-white/20 bg-black/60 text-white backdrop-blur-sm hover:bg-black/80 focus-visible:ring-2 focus-visible:ring-port-accent sm:min-h-0 sm:min-w-0 sm:p-1.5 ${controlsOpen ? 'ring-1 ring-port-accent' : ''}`}+ className={`port-media-overlay-strong port-media-overlay-item absolute right-2 top-2 z-10 inline-flex min-h-[44px] min-w-[44px] items-center justify-center rounded-md border border-port-border focus-visible:ring-2 focus-visible:ring-port-accent sm:min-h-0 sm:min-w-0 sm:p-1.5 ${controlsOpen ? 'ring-1 ring-port-accent' : ''}`}><SlidersHorizontal className="h-4 w-4" /></button>diff --git a/client/src/components/threejsModels/ThreejsModelPreview.jsx b/client/src/components/threejsModels/ThreejsModelPreview.jsxindex 983b80f28e..6f00f16945 100644--- a/client/src/components/threejsModels/ThreejsModelPreview.jsx+++ b/client/src/components/threejsModels/ThreejsModelPreview.jsx@@ -274,8 +274,8 @@ export default function ThreejsModelPreview({ spec, className = '' }) {onSelect={handleSelect}/></Canvas>- <div className="always-dark absolute left-2 top-2 flex max-w-[calc(100%-1rem)] flex-wrap items-center gap-1.5 rounded-lg bg-black/70 px-2 py-1.5 text-[10px] text-gray-300 backdrop-blur-sm">- <span className="mr-1 whitespace-nowrap text-gray-400">Background</span>+ <div className="port-media-overlay absolute left-2 top-2 flex max-w-[calc(100%-1rem)] flex-wrap items-center gap-1.5 rounded-lg px-2 py-1.5 text-[10px]">+ <span className="mr-1 whitespace-nowrap text-port-text-muted">Background</span><div className="flex flex-wrap gap-1" role="radiogroup" aria-label="Preview background">{BACKGROUND_PRESETS.map((preset) => (<button@@ -284,13 +284,13 @@ export default function ThreejsModelPreview({ spec, className = '' }) {aria-label={preset.label}aria-pressed={selectedPreset === preset.id}onClick={() => setBackground(preset.value)}- className="rounded px-1.5 py-1 hover:bg-white/15 aria-pressed:bg-white/25 aria-pressed:text-white"+ className="port-media-overlay-item rounded px-1.5 py-1">{preset.label}</button>))}</div>- <label className="flex items-center gap-1 rounded px-1.5 py-1 hover:bg-white/15">+ <label className="port-media-overlay-item flex items-center gap-1 rounded px-1.5 py-1">Custom<inputtype="color"@@ -300,8 +300,8 @@ export default function ThreejsModelPreview({ spec, className = '' }) {className="h-4 w-5 rounded border-0 bg-transparent p-0"/></label>- <span className="mx-1 hidden h-3 w-px bg-white/20 sm:block" />- <label htmlFor={explodeSliderId} className="whitespace-nowrap text-gray-400">+ <span className="port-media-overlay-divider mx-1 hidden h-3 w-px sm:block" />+ <label htmlFor={explodeSliderId} className="whitespace-nowrap text-port-text-muted">Explode</label><input@@ -315,21 +315,21 @@ export default function ThreejsModelPreview({ spec, className = '' }) {onChange={(event) => setExplode(Number(event.target.value))}className="h-1 w-20 cursor-pointer accent-port-accent disabled:cursor-not-allowed disabled:opacity-40 sm:w-28"/>- <span className="w-8 tabular-nums text-gray-400">{Math.round(explode * 100)}%</span>+ <span className="w-8 tabular-nums text-port-text-muted">{Math.round(explode * 100)}%</span>{explode > 0 && (<buttontype="button"onClick={() => setExplode(0)}- className="rounded px-1.5 py-1 hover:bg-white/15"+ className="port-media-overlay-item rounded px-1.5 py-1">Reassemble</button>)}</div>{selectedId && (- <div className="always-dark absolute right-2 top-2 flex max-w-[calc(100%-1rem)] items-center gap-2 rounded-lg bg-black/70 px-2 py-1.5 text-[10px] text-gray-200 backdrop-blur-sm">- <span className="truncate font-medium text-white">{selection.names[selectedId] || selectedId}</span>- <code className="truncate text-gray-400">{selectedId}</code>+ <div className="port-media-overlay absolute right-2 top-2 flex max-w-[calc(100%-1rem)] items-center gap-2 rounded-lg px-2 py-1.5 text-[10px]">+ <span className="truncate font-medium">{selection.names[selectedId] || selectedId}</span>+ <code className="truncate text-port-text-muted">{selectedId}</code>{/* Which declared joint (if any) drives the picked part — the diagnosticthat turns "it says articulation-ready" into something checkable. */}{articulation.jointsByPartId[selectedId] && (@@ -344,14 +344,14 @@ export default function ThreejsModelPreview({ spec, className = '' }) {type="button"aria-label="Clear part selection"onClick={() => handleSelect(null)}- className="rounded px-1.5 py-0.5 hover:bg-white/15"+ className="port-media-overlay-item rounded px-1.5 py-0.5">Clear</button></div>)}- <div className="always-dark pointer-events-none absolute bottom-2 left-2 flex max-w-[calc(100%-1rem)] flex-wrap items-center gap-1.5 text-[10px]">- <span className="rounded bg-black/60 px-2 py-1 text-gray-300">+ <div className="pointer-events-none absolute bottom-2 left-2 flex max-w-[calc(100%-1rem)] flex-wrap items-center gap-1.5 text-[10px]">+ <span className="port-media-overlay rounded px-2 py-1">Drag to orbit · scroll to zoom · click a part to identify it</span>{/* Never "animation-ready": nothing here is skinned. The badge says only@@ -359,8 +359,8 @@ export default function ThreejsModelPreview({ spec, className = '' }) {that predates the contract has none and reads as a static assembly. */}<spanclassName={articulation.articulationReady- ? 'rounded bg-port-success/20 px-2 py-1 text-port-success'- : 'rounded bg-black/60 px-2 py-1 text-gray-400'}+ ? 'port-media-overlay rounded px-2 py-1 text-port-success'+ : 'port-media-overlay rounded px-2 py-1 text-port-text-muted'}>{articulation.articulationReady? `Articulation-ready · ${articulation.jointCount} joints · ${articulation.socketCount} pivot${articulation.socketCount === 1 ? '' : 's'}`diff --git a/client/src/index.css b/client/src/index.cssindex b6c701d9cf..90e3e26c10 100644--- a/client/src/index.css+++ b/client/src/index.css@@ -849,8 +849,87 @@ html[data-port-theme-mode="day"] .always-dark [class~="hover:text-gray-100"]:hovhtml[data-port-theme-mode="day"] .always-dark [class~="hover:text-slate-100"]:hover {color: rgb(255 255 255) !important;}-html[data-port-theme-mode="day"] .always-dark [class~="aria-pressed:text-white"][aria-pressed="true"] {- color: rgb(255 255 255) !important;++/* === Media overlay chrome ===+ Labels, status bars, badges, and small control panels that float over an+ image, a video, or a 3D canvas.++ The old idiom — `bg-black/65 text-white` — breaks on a day theme: the remap+ above rewrites `text-white` to the theme's dark ink while the black scrim+ stays black, so the label renders dark-on-black. `.always-dark` pins the text+ back to white but leaves a black slab floating over a cream page.++ These classes take the theme's own card + text pairing instead, so overlay+ chrome matches the page and its contrast is the theme's own card contrast —+ over a dark canvas, a light one, or a photograph. Written as a literal alpha+ rather than `bg-port-card/NN` (floored opaque for content cards) or+ `--port-overlay-alpha` (tuned for full-screen modal backdrops, and low enough+ on several themes to drop muted ink under AA once an arbitrary image shows+ through). At 0.9 there is nothing left for a `backdrop-blur` to soften, so+ don't add one.++ This is the successor to the two older answers to the same problem, and the+ rule for picking between the three is:+ - `.port-media-overlay*` — the default for new overlay chrome.+ - `.always-dark` (above) — only when the surface underneath is genuinely+ fixed-dark regardless of theme: video-player chrome, a terminal, a+ full-screen lightbox.+ - `.cybercity-themed` (below) — a page-scoped `!important` remap of the+ City HUD's fixed cyberpunk palette. Legacy shape, kept because that HUD is+ authored against a fixed palette on purpose; don't add a second one. */+.port-media-overlay {+ background-color: rgb(var(--port-card) / 0.9);+}++/* Solid variant for a small label sitting directly on photography, where even+ 10% show-through takes its contrast from whatever pixels it lands on. Same+ fill as `.port-menu-surface` (above) for the same reason — an opaque themed+ surface with arbitrary content behind it and no backdrop to sit on — but no+ `!important`, since these labels are not fighting a `bg-port-card/NN`. */+.port-media-overlay-strong {+ background-color: rgb(var(--port-card));+}++/* Zero-specificity so the default ink is a fallback, not an override: an+ overlay that carries its own `text-port-success` / `text-port-text-muted`+ utility keeps it. */+:where(.port-media-overlay, .port-media-overlay-strong) {+ color: rgb(var(--port-text));+}++/* Interactive overlay chrome — buttons inside an overlay panel, and buttons+ that ARE one. `hover:bg-white/15` is the companion idiom to the black scrim+ and disappears against a light one.++ The state tint rides on `background-image` so it composites OVER whatever+ scrim the element already carries instead of replacing it — a button that is+ its own `.port-media-overlay-strong` would otherwise go transparent on+ hover. That is also why the app-wide `--port-hover-bg` / `--port-active-bg`+ pair isn't reused here: `--port-active-bg` is a gradient on six of the eight+ themes, so it cannot ride this mechanism, and a hover that reused its token+ while pressed did not would drift the two states apart. */+.port-media-overlay-item:hover,+.port-media-overlay-item[aria-pressed="true"] {+ background-image: linear-gradient(+ var(--port-overlay-item-tint),+ var(--port-overlay-item-tint)+ );+}++.port-media-overlay-item:hover {+ --port-overlay-item-tint: rgb(var(--port-text) / 0.12);+}++.port-media-overlay-item[aria-pressed="true"] {+ --port-overlay-item-tint: rgb(var(--port-accent) / 0.22);+}++.port-media-overlay-item[aria-pressed="true"]:hover {+ --port-overlay-item-tint: rgb(var(--port-accent) / 0.32);+}++.port-media-overlay-divider {+ background-color: rgb(var(--port-text) / 0.2);}/* === City (formerly CyberCity) HUD theming ===diff --git a/client/src/pages/Media3D.jsx b/client/src/pages/Media3D.jsxindex bb158e7151..40b287601a 100644--- a/client/src/pages/Media3D.jsx+++ b/client/src/pages/Media3D.jsx@@ -339,7 +339,7 @@ export default function Media3D() {</span>)}{selectedImage && (- <span className="absolute inset-x-2 bottom-2 rounded bg-black/90 px-2 py-1 text-center text-xs font-medium text-white">+ <span className="port-media-overlay-strong absolute inset-x-2 bottom-2 rounded px-2 py-1 text-center text-xs font-medium">Change image</span>)}@@ -441,7 +441,7 @@ export default function Media3D() {/>)}{record.status === 'ready' && (- <span className="absolute right-1.5 top-1.5 rounded bg-black/80 p-1 text-port-success">+ <span className="port-media-overlay-strong absolute right-1.5 top-1.5 rounded p-1 text-port-success"><Boxes className="h-3.5 w-3.5" /></span>)}diff --git a/client/src/pages/ThreejsModelDetail.jsx b/client/src/pages/ThreejsModelDetail.jsxindex c10de8ae21..466425a1a4 100644--- a/client/src/pages/ThreejsModelDetail.jsx+++ b/client/src/pages/ThreejsModelDetail.jsx@@ -459,7 +459,7 @@ export default function ThreejsModelDetail() {<div className="relative min-h-[520px]"><ThreejsModelPreview spec={record.spec} className="h-full min-h-[520px] w-full" />{generating && (- <div className="absolute inset-x-0 top-0 flex items-center justify-center gap-2 bg-black/65 px-3 py-2 text-xs text-white backdrop-blur-sm">+ <div className="port-media-overlay absolute inset-x-0 top-0 flex items-center justify-center gap-2 border-b border-port-border px-3 py-2 text-xs"><LoaderCircle className="h-4 w-4 animate-spin text-port-accent" />Inspecting the reference and building procedural geometry…</div>diff --git a/client/src/pages/ThreejsModels.jsx b/client/src/pages/ThreejsModels.jsxindex d091349553..cd67c12f63 100644--- a/client/src/pages/ThreejsModels.jsx+++ b/client/src/pages/ThreejsModels.jsx@@ -135,7 +135,7 @@ export default function ThreejsModels() {</span>)}{selectedImage && (- <span className="absolute inset-x-2 bottom-2 rounded bg-black/70 px-2 py-1 text-center text-xs text-white">+ <span className="port-media-overlay-strong absolute inset-x-2 bottom-2 rounded px-2 py-1 text-center text-xs">Change image</span>)}