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
refactor([warning-banner-migrate-remaining-sites]): migrate 25 more banner sites to shared Banner
[._.]/ Adam Eivy646a1d0ac155
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 311282bc4f..df47ddf889 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -5,6 +5,7 @@- **[patch-settings-slice-helper] Nested settings edits no longer risk clobbering sibling fields.** Saving a Python path from Video Gen, or an image-gen config from a pipeline / Writers Room stage, used to round-trip the entire current settings object — leaving unrelated top-level keys exposed to drift if the read raced a concurrent write elsewhere. These edits now scope themselves to the slice being changed.- **[client-use-previous-hook] Shared `usePrevious` hook.** Internal refactor: collapses two ad-hoc previous-render comparisons into one shared hook. No user-visible behavior change.- **[warning-banner-component] Shared `Banner` component.** Internal refactor: introduces a tone-variant Banner primitive and replaces five hand-rolled warning banners (LoRA manager, Security audio prompt, scheduled-runs paused / improvement-disabled callouts, local Python arch / externally-managed notices, CoS memory-backend status). Two of those banners pick up a minor visual unification — the LoRA download message body now uses the standard warning amber instead of a cream variant, and the local Python notices gain a few pixels of horizontal padding to match the rest of the warning banner family.+- **[warning-banner-migrate-remaining-sites] Status banner consistency across the app.** Internal refactor: ~25 more hand-rolled status banners (across Brain, CoS, Apps, MeatSpace, Digital Twin, Pipeline, and several pages) now use the shared `Banner` primitive instead of ad-hoc tone-and-padding combinations. Most banners are visually identical to before; a few pick up small cosmetic unifications — uniform corner radius, consistent horizontal padding, and the standard warning/error/success/info color family.- **[setup-check-cache] Local Python setup check no longer spawns a subprocess per keystroke.** Typing in the Python interpreter path used to fire a fresh ~0.5–1 s python probe on every (debounced) keystroke, on mount, and on the refresh button. The check now memoises its result per interpreter for 30 seconds, and the cache busts automatically when the interpreter binary changes, when a new venv is created, and when a `pip install` finishes — so typing flows feel snappier. External package mutations (a shell-side `pip install`) can take up to 30 s to surface; the next setup interaction picks them up.## Addeddiff --git a/PLAN.md b/PLAN.mdindex 5fb4c6c998..81e8653914 100644--- a/PLAN.md+++ b/PLAN.md@@ -6,7 +6,6 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel_Batch-cleared 2026-05-25: 23 Next Up items shipped together via parallel sub-agents (env-file helper, formatBytes migration, lazy voice UI text, voice long-term-memory routing, voice tool expansion + `ui_describe_visually`, three phosphene generate_ltx2.py hardenings, the peer-sync snapshot-coverage P1 refactor + ephemeralize-then-delete, per-record tombstone-ack clamp, MediaLightbox→MediaImage, global vitest peer mock, videoHistory sync category, reverse-sub UI broadcast, palette Health disambiguation, insertXxxWithId resurrection side-effects, importer tombstone detection, TUI finish-rejection note, mortalLoom errno widen, VideoGen stale-model toast, Universes sidebar grandchildren). See `git log` + `.changelog/NEXT.md`._-- [ ] [warning-banner-migrate-remaining-sites] **Migrate the remaining ~33 hand-rolled banner sites to `<Banner>`.** The shared `client/src/components/ui/Banner.jsx` component (with `tone="warning|error|success|info"`, `size="sm|md|lg"`, `icon`, `title`, `actions`) shipped via `[warning-banner-component]` and replaced 5 sites (Loras, Security, ScheduleTab cos × 2, LocalSetupPanel × 2, cos MemoryTab). The remaining ~33 `bg-port-warning/10 border border-port-warning/30` matches (and the success/error/info equivalents) can swap incrementally — search `grep -rln "rounded.*border-port-warning/30.*bg-port-warning/10\|bg-port-warning/10.*border-port-warning/30" client/src/`. A few sites (HfTokenBanner's vertical-stack layout, table-cell banners) won't fit the row-layout `<Banner>` shape and should stay as-is or get a sibling primitive.- [ ] [mediajobqueue-resolve-live-params] **Extract `resolveLiveParams(job, safeParams)` in `server/services/mediaJobQueue/index.js#runJob`.** The 8-line block at line 605 that re-resolves `pythonPath` from live settings mixes a settings-read concern into the (already-long) sanitize-uploads section. Pulling it into its own helper makes `runJob` easier to skim and gives the live-settings concern its own seam for future fields (e.g. `model.runtime`-aware overrides). Surfaced by /simplify on 2026-05-28.- [ ] [pythonsetup-arch-tests] **Test coverage for arch-aware `detectPython()` + `/setup/check` arch fields.** Added 2026-05-28 with the VideoGen inline Local Python setup fix. New helpers (`probePythonArch`, `isArchMismatch`, `detectArm64Python`, `HOST_ARCH`) and the new `/api/image-gen/setup/check` response fields (`interpreterArch`, `hostArch`, `archMismatch`, `suggestedArm64Python`) have no test coverage — the existing `server/routes/imageGen.test.js` skips all `/setup/*` routes entirely. Worth a `pythonSetup.test.js` that mocks `node:os` + `node:child_process` to verify: (1) on `darwin/arm64`, `detectPython` prefers arm64 candidates over x86_64; (2) `/setup/check` includes the new arch fields and only sets `archMismatch: true` when the host is arm64; (3) `suggestedArm64Python` is null when no viable arm64 candidate exists. Deferred from the fix because the `/setup/*` route family has zero existing test harness and adding one is its own piece of work.- [ ] [mediacard-use-mediaimage-for-syncing-assets] **`MediaCard.jsx` grid thumbnails still use a raw `<img src={previewUrl}>`.** Same peer-sync placeholder/live-swap gap that `[peer-sync-medialightbox-use-mediaimage-for-syncing-assets]` fixed for the lightbox — `client/src/components/media/MediaCard.jsx` (~line 42) doesn't get the "Syncing" placeholder or the `peerSync:asset-arrived` atomic swap. Swap the raw `<img>` for `MediaImage`. Surfaced by that item's cross-check during the batch-clear (2026-05-25); was outside its stated scope.@@ -84,6 +83,7 @@ Items here need a research / design pass, an explicit decision, or a preconditio- [ ] [shallow-equal-guard-in-usemediaannotations-socket] **Shallow-equal guard in `useMediaAnnotations` socket handler.** Speculative micro-opt; theoretical until observed.- [ ] [capabilities-cheap-memory-count] **Capabilities route should count active memories without sorting/paginating.** `GET /api/capabilities` calls `getMemories({ status: 'active' })` (server/routes/capabilities.js) only to read `.total`, but `getMemories` loads the full index, filters, sorts, and paginates before returning `{ total, memories }` — the sort + slice is wasted work on a page polled every ~20s. Add a lightweight `countMemories({ status })` (or a `countOnly` option) to `server/services/memory.js` that returns the filtered count without the sort/paginate, and switch the route to it. Micro-opt; the index is cached via `loadIndex`, so low urgency. Surfaced by copilot review of `[codex5-onboarding-capability-map]` 2026-05-25.- [ ] [low-client-extract-shared-usepopoverposition-hook] **[LOW][CLIENT]** Extract shared `usePopoverPosition` hook — **premise eroded; revisit when a 3rd caller lands.** Original PLAN flagged 4 components but `VisualStylePicker` no longer exists and `AddToCollectionMenu` / `BulkTargetPicker` no longer use portal positioning. Today the pattern lives in exactly two components (`client/src/components/ThemeSwitcher.jsx` and `client/src/components/media/CollectionPickerShell.jsx`) — both implement portal-with-fixed-positioning + `useLayoutEffect` measurement + rAF-coalesced scroll/resize listeners. With only 2 callers the abstraction isn't worth the indirection; extract when a third surface needs the same shape.+- [ ] [inline-confirm-row-primitive] **Extract `<InlineConfirmRow tone="error">` primitive for inline delete-confirm rows.** Five sites (`client/src/components/brain/tabs/LinksTab.jsx:599`, `client/src/components/brain/tabs/InboxTab.jsx:387, 512, 606, 765`) share the same shape: `flex items-center gap-2 p-2 bg-port-error/10 border border-port-error/30 rounded` + `<span flex-1>{question}</span>` + Delete + Cancel buttons. They didn't migrate to `<Banner>` during `[warning-banner-migrate-remaining-sites]` because `<Banner>` is shaped around "icon + content + actions" alerts, not "question + confirm/cancel" confirm rows (the body is the prompt, both buttons are equal-weight actions, and `confirmText` / `cancelText` are the natural API). Build a tiny primitive at `client/src/components/ui/InlineConfirmRow.jsx` with `{ question, confirmText='Delete', cancelText='Cancel', onConfirm, onCancel, tone='error' }`, then swap the five sites. Pairs naturally with the existing confirmation UX preference (no two-click-arm).- [ ] [pill-component-goaldetailpanel-migration] **Migrate `GoalDetailPanel.jsx`'s badges to the shared `<Pill>`.** The shared `<Pill>` (`client/src/components/ui/Pill.jsx`) shipped with `[shared-pill-chip-component]` and absorbed `WritersRoomGuide.jsx` + `Instances.jsx`'s badge family. `GoalDetailPanel.jsx`'s badges were intentionally left out: their colors are computed from data (`GOAL_TYPE_CONFIG[].bg/color` ~line 384, `CATEGORY_CONFIG`/`urgencyColor()` ~571-581, tag chips ~528/707, `CHECK_IN_STATUS_CONFIG` ~993), so they don't map to a fixed `tone`. They'd migrate via `<Pill tone="bare" bordered={false} className={`${cfg.bg} ${cfg.color}`}>` (the `bare` tone exists for exactly this data-driven case), which only consolidates the structural `rounded px-2 py-0.5 text-xs` shape — not the colors. Marginal benefit + many edits in a 1252-LOC god-component, so deferred. Do it opportunistically when next touching the file (pairs with the `GoalDetailPanel.jsx` god-component split under "Deferred Architecture").- [ ] [setup-data-import-drift-tables-from-migrations] **`setup-data.js` should import drift tables from each migration file.** `SHIPPED_PROMPT_OLD_MD5` + `SHIPPED_PROMPT_NEW_MD5` in `scripts/setup-data.js:139-196` manually mirror the `ACCEPTED_OLD_MD5` + `NEW_SHIPPED_MD5` exports each migration file already maintains. The mirror is hand-edited every time a migration ships and is the most likely place to drift. After `[backport-pre-023-migrations-to-_lib]` lands, every prompt-replace migration will export those constants — `setup-data.js` can build `SHIPPED_PROMPT_OLD_MD5` / `SHIPPED_PROMPT_NEW_MD5` by `import * as m025 from './migrations/025-idea-stage-character-detail.js'`-style sweep (or by glob+dynamic import) and removing the mirror entirely. Single source of truth, no hand sync. Surfaced by /simplify during `[pipeline-idea-stage-character-detail-plumbing]`.- [ ] [parallelize-applypromptreplacemigration-files] **Parallelize `applyPromptReplaceMigration` per-file scan.** Today every prompt-replace migration covers exactly one file, so the serial `for (await readFile…)` loop in `scripts/migrations/_lib.js` costs nothing. When the first multi-file migration lands, fold the loop into `Promise.all(Object.keys(accepted).map(async filename => …))` and accumulate the `{ updated, alreadyCurrent, skipped }` counters post-flight. Theoretical until needed.diff --git a/client/src/components/ErrorBoundary.jsx b/client/src/components/ErrorBoundary.jsxindex f0f50a24ff..defc3d0251 100644--- a/client/src/components/ErrorBoundary.jsx+++ b/client/src/components/ErrorBoundary.jsx@@ -1,5 +1,6 @@import { Component } from 'react';import { AlertTriangle } from 'lucide-react';+import Banner from './ui/Banner';import { isStaleChunkError, reloadOnceForStaleChunk } from '../utils/staleChunkReload';export default class ErrorBoundary extends Component {@@ -30,11 +31,11 @@ export default class ErrorBoundary extends Component {An unexpected error occurred. Please try refreshing the page.</p>{this.state.error && (- <div className="bg-port-error/10 border border-port-error/30 rounded-lg p-3 mb-4">- <p className="text-xs text-port-error font-mono break-all">+ <Banner tone="error" size="md" className="mb-4">+ <p className="text-xs font-mono break-all">{this.state.error.message}</p>- </div>+ </Banner>)}<buttononClick={() => window.location.reload()}diff --git a/client/src/components/apps/EditAppModal.jsx b/client/src/components/apps/EditAppModal.jsxindex a84fc26916..cf151e601f 100644--- a/client/src/components/apps/EditAppModal.jsx+++ b/client/src/components/apps/EditAppModal.jsx@@ -6,6 +6,7 @@ import * as api from '../../services/api';import { PORTOS_APP_ID } from '../../services/apiCore';import toast from '../ui/Toast';import Modal from '../ui/Modal';+import Banner from '../ui/Banner';import { copyToClipboard } from '../../lib/clipboard';export default function EditAppModal({ app, onClose, onSave }) {@@ -405,9 +406,9 @@ export default function EditAppModal({ app, onClose, onSave }) {{formData.jiraEnabled && (<>{jiraInstances.length === 0 ? (- <div className="p-3 bg-port-warning/10 border border-port-warning/30 rounded-lg text-sm text-port-warning">+ <Banner tone="warning" size="md">No JIRA instances configured. <Link to="/devtools/jira" className="underline hover:text-white">Configure JIRA</Link> first.- </div>+ </Banner>) : (<><div>@@ -612,9 +613,9 @@ export default function EditAppModal({ app, onClose, onSave }) {{formData.datadogEnabled && (<>{datadogInstances.length === 0 ? (- <div className="p-3 bg-port-warning/10 border border-port-warning/30 rounded-lg text-sm text-port-warning">+ <Banner tone="warning" size="md">No DataDog instances configured. <Link to="/devtools/datadog" className="underline hover:text-white">Configure DataDog</Link> first.- </div>+ </Banner>) : (<><div>diff --git a/client/src/components/apps/tabs/OverviewTab.jsx b/client/src/components/apps/tabs/OverviewTab.jsxindex 0b4b19a3d8..5ce257ffa2 100644--- a/client/src/components/apps/tabs/OverviewTab.jsx+++ b/client/src/components/apps/tabs/OverviewTab.jsx@@ -7,6 +7,7 @@ import KanbanBoard from '../../KanbanBoard';import EditAppModal from '../EditAppModal';import ActivityLog from '../ActivityLog';import SlashDoPanel from '../SlashDoPanel';+import Banner from '../../ui/Banner';import { useAppOperation } from '../../../hooks/useAppOperation';import * as api from '../../../services/api';@@ -131,47 +132,44 @@ export default function OverviewTab({ app, onRefresh }) {{/* Missing Xcode Scripts Banner */}{missingScripts.length > 0 && (- <div className="bg-port-warning/10 border border-port-warning/30 rounded-lg p-4">- <div className="flex items-start gap-3">- <AlertTriangle size={18} className="text-port-warning shrink-0 mt-0.5" />- <div className="flex-1">- <div className="text-sm font-medium text-port-warning mb-2">- Missing management scripts- </div>- <div className="flex flex-wrap gap-2 mb-3">- {missingScripts.map(s => {- const Icon = SCRIPT_ICONS[s.name] || Terminal;- return (- <span key={s.name} className="inline-flex items-center gap-1.5 px-2 py-1 bg-port-card border border-port-border rounded text-xs text-gray-300">- <Icon size={12} />- <span className="font-mono">{s.name}</span>- <span className="text-gray-500">— {s.description}</span>- </span>- );- })}- </div>- <div className="flex gap-2">- <button- onClick={() => handleInstallScripts(missingScripts.map(s => s.name))}- disabled={installingScripts}- className="px-3 py-1.5 bg-port-warning/20 text-port-warning hover:bg-port-warning/30 rounded text-xs font-medium disabled:opacity-50"- >- {installingScripts ? 'Installing...' : 'Install All'}- </button>- {missingScripts.length > 1 && missingScripts.map(s => (- <button- key={s.name}- onClick={() => handleInstallScripts([s.name])}- disabled={installingScripts}- className="px-2 py-1.5 bg-port-border hover:bg-port-border/80 text-gray-300 rounded text-xs disabled:opacity-50"- >- Install {s.name}- </button>- ))}- </div>- </div>+ <Banner+ tone="warning"+ size="lg"+ icon={AlertTriangle}+ title="Missing management scripts"+ >+ <div className="flex flex-wrap gap-2 mb-3 mt-2">+ {missingScripts.map(s => {+ const Icon = SCRIPT_ICONS[s.name] || Terminal;+ return (+ <span key={s.name} className="inline-flex items-center gap-1.5 px-2 py-1 bg-port-card border border-port-border rounded text-xs text-gray-300">+ <Icon size={12} />+ <span className="font-mono">{s.name}</span>+ <span className="text-gray-500">— {s.description}</span>+ </span>+ );+ })}</div>- </div>+ <div className="flex gap-2">+ <button+ onClick={() => handleInstallScripts(missingScripts.map(s => s.name))}+ disabled={installingScripts}+ className="px-3 py-1.5 bg-port-warning/20 text-port-warning hover:bg-port-warning/30 rounded text-xs font-medium disabled:opacity-50"+ >+ {installingScripts ? 'Installing...' : 'Install All'}+ </button>+ {missingScripts.length > 1 && missingScripts.map(s => (+ <button+ key={s.name}+ onClick={() => handleInstallScripts([s.name])}+ disabled={installingScripts}+ className="px-2 py-1.5 bg-port-border hover:bg-port-border/80 text-gray-300 rounded text-xs disabled:opacity-50"+ >+ Install {s.name}+ </button>+ ))}+ </div>+ </Banner>)}{/* Start Commands */}diff --git a/client/src/components/apps/tabs/UpdateTab.jsx b/client/src/components/apps/tabs/UpdateTab.jsxindex 4fc3fa34d0..8031f59150 100644--- a/client/src/components/apps/tabs/UpdateTab.jsx+++ b/client/src/components/apps/tabs/UpdateTab.jsx@@ -3,6 +3,7 @@ import { RefreshCw, Download, XCircle, Check, Loader, AlertTriangle, Trash2, Extimport toast from '../../ui/Toast';import BrailleSpinner from '../../BrailleSpinner';import MarkdownOutput from '../../cos/MarkdownOutput';+import Banner from '../../ui/Banner';import * as api from '../../../services/api';import socket from '../../../services/socket';import { useAutoRefetch } from '../../../hooks/useAutoRefetch';@@ -405,10 +406,7 @@ export default function UpdateTab() {{/* Update Error */}{updateError && (- <div className="flex items-start gap-2 p-3 bg-port-error/10 border border-port-error/30 rounded-lg">- <AlertTriangle size={16} className="text-port-error shrink-0 mt-0.5" />- <span className="text-sm text-port-error">{updateError}</span>- </div>+ <Banner tone="error" size="md" icon={AlertTriangle}>{updateError}</Banner>)}{/* Last Update Result */}diff --git a/client/src/components/brain/tabs/DigestTab.jsx b/client/src/components/brain/tabs/DigestTab.jsxindex fca8b3b893..e8f7db111f 100644--- a/client/src/components/brain/tabs/DigestTab.jsx+++ b/client/src/components/brain/tabs/DigestTab.jsx@@ -9,6 +9,7 @@ import {Play,Clock} from 'lucide-react';import BrailleSpinner from '../../BrailleSpinner';import toast from '../../ui/Toast';+import Banner from '../../ui/Banner';import { timeAgo } from '../../../utils/formatters';@@ -238,14 +239,14 @@ export default function DigestTab({ onRefresh }) {{/* Open Loops */}{latestReview.biggestOpenLoops?.length > 0 && (- <div className="p-3 bg-port-warning/10 border border-port-warning/30 rounded-lg mb-4">- <h4 className="text-xs font-medium text-port-warning mb-2">Biggest Open Loops</h4>+ <Banner tone="warning" size="md" className="mb-4">+ <h4 className="text-xs font-medium mb-2">Biggest Open Loops</h4><ul className="space-y-1">{latestReview.biggestOpenLoops.map((loop, i) => (<li key={i} className="text-sm text-gray-300">• {loop}</li>))}</ul>- </div>+ </Banner>)}{/* Recurring Theme */}diff --git a/client/src/components/brain/tabs/ImportTab.jsx b/client/src/components/brain/tabs/ImportTab.jsxindex 352c9f8d64..0872cb08f7 100644--- a/client/src/components/brain/tabs/ImportTab.jsx+++ b/client/src/components/brain/tabs/ImportTab.jsx@@ -12,6 +12,7 @@ import {Upload,Sparkles} from 'lucide-react';import * as api from '../../../services/api';import toast from '../../ui/Toast';+import Banner from '../../ui/Banner';import BrailleSpinner from '../../BrailleSpinner';import { formatBytes, formatDateShort } from '../../../utils/formatters';@@ -198,13 +199,19 @@ function ChatGPTWizard({ onExit, navigate }) {<Header onExit={onExit} /><Stepper steps={STEPS} activeIdx={stepIdx} />{error && (- <div className="mb-4 p-3 rounded border border-port-error/30 bg-port-error/10 text-sm text-port-error flex items-start gap-2">- <AlertCircle size={16} className="mt-0.5 flex-shrink-0" aria-hidden="true" />- <span>{error}</span>- <button className="ml-auto text-gray-400 hover:text-white" onClick={() => setError(null)} aria-label="Dismiss">- <X size={14} />- </button>- </div>+ <Banner+ tone="error"+ size="md"+ icon={AlertCircle}+ className="mb-4"+ actions={(+ <button className="text-gray-400 hover:text-white" onClick={() => setError(null)} aria-label="Dismiss">+ <X size={14} />+ </button>+ )}+ >+ {error}+ </Banner>)}{step.id === 'instructions' && <StepInstructions onNext={goNext} />}diff --git a/client/src/components/brain/tabs/MemoryTab.jsx b/client/src/components/brain/tabs/MemoryTab.jsxindex efa769d6ab..e24935c2f5 100644--- a/client/src/components/brain/tabs/MemoryTab.jsx+++ b/client/src/components/brain/tabs/MemoryTab.jsx@@ -9,6 +9,7 @@ import {Plus,Search,AlertTriangle} from 'lucide-react';import toast from '../../ui/Toast';+import Banner from '../../ui/Banner';import {MEMORY_TABS,@@ -567,22 +568,25 @@ export default function MemoryTab({ onRefresh }) {<div className="space-y-4">{/* Backend status banner */}{backendStatus?.backend === 'file' && (- <div className="bg-port-warning/10 border border-port-warning/30 rounded-lg p-4 flex items-start gap-3">- <AlertTriangle className="text-port-warning shrink-0 mt-0.5" size={20} />- <div className="flex-1">- <p className="text-port-warning font-medium">PostgreSQL unavailable — using file storage</p>- {backendStatus.db?.error && (- <p className="text-sm text-gray-400 mt-1">{backendStatus.db.error}</p>- )}- <p className="text-sm text-gray-500 mt-1">Some PostgreSQL-only features like cross-instance sync and DB snapshots are unavailable.</p>- </div>- <button- onClick={fetchBackendStatus}- className="px-3 py-1.5 text-sm bg-port-warning/20 text-port-warning hover:bg-port-warning/30 rounded-lg transition-colors shrink-0"- >- Retry- </button>- </div>+ <Banner+ tone="warning"+ size="lg"+ icon={AlertTriangle}+ title="PostgreSQL unavailable — using file storage"+ actions={(+ <button+ onClick={fetchBackendStatus}+ className="px-3 py-1.5 text-sm bg-port-warning/20 text-port-warning hover:bg-port-warning/30 rounded-lg transition-colors"+ >+ Retry+ </button>+ )}+ >+ {backendStatus.db?.error && (+ <p className="text-sm text-gray-400 mt-1">{backendStatus.db.error}</p>+ )}+ <p className="text-sm text-gray-500 mt-1">Some PostgreSQL-only features like cross-instance sync and DB snapshots are unavailable.</p>+ </Banner>)}{/* Type tabs */}diff --git a/client/src/components/cos/tabs/DigestTab.jsx b/client/src/components/cos/tabs/DigestTab.jsxindex 3f0d7fc6c7..6745cae631 100644--- a/client/src/components/cos/tabs/DigestTab.jsx+++ b/client/src/components/cos/tabs/DigestTab.jsx@@ -17,6 +17,7 @@ import {} from 'lucide-react';import * as api from '../../../services/api';import BrailleSpinner from '../../BrailleSpinner';+import Banner from '../../ui/Banner';export default function DigestTab() {const [currentDigest, setCurrentDigest] = useState(null);@@ -381,20 +382,19 @@ export default function DigestTab() {{expandedSections.issues && (<div className="space-y-2">{currentDigest.issues.map((issue, idx) => (- <div+ <Bannerkey={idx}- className="bg-port-error/10 border border-port-error/30 rounded-lg p-3"+ tone="error"+ size="md"+ actions={<span className="text-xs text-gray-500">{issue.count}x</span>}>- <div className="flex items-center justify-between mb-2">- <span className="text-port-error font-medium">{issue.error}</span>- <span className="text-xs text-gray-500">{issue.count}x</span>- </div>+ <span className="font-medium">{issue.error}</span>{issue.tasks?.length > 0 && (- <div className="text-xs text-gray-500">+ <div className="text-xs text-gray-500 mt-2">Affected: {issue.tasks.map(t => t.description || t.id).join(', ')}</div>)}- </div>+ </Banner>))}</div>)}diff --git a/client/src/components/cos/tabs/MemoryTab.jsx b/client/src/components/cos/tabs/MemoryTab.jsxindex 2326d447c5..bab57a7b96 100644--- a/client/src/components/cos/tabs/MemoryTab.jsx+++ b/client/src/components/cos/tabs/MemoryTab.jsx@@ -334,9 +334,8 @@ export default function MemoryTab({ apps = [] }) {<div className="space-y-4"><p>No memories yet.</p>{!embeddingStatus?.available && (- <div className="bg-port-warning/10 border border-port-warning/30 rounded-lg p-4 text-left max-w-md mx-auto">- <p className="text-port-warning font-medium mb-2">Embedding Service Unavailable</p>- <p className="text-sm text-gray-400">+ <Banner tone="warning" size="lg" title="Embedding Service Unavailable" className="text-left max-w-md mx-auto">+ <p className="text-sm text-gray-400 mt-2">Cannot connect to embedding service{embeddingStatus?.endpoint && (<span>: <code className="text-port-accent">{embeddingStatus.endpoint}</code></span>)}@@ -373,7 +372,7 @@ export default function MemoryTab({ apps = [] }) {>Save & Retry</button>- </div>+ </Banner>)}{embeddingStatus?.available && (<p className="text-sm">diff --git a/client/src/components/cos/tabs/ScheduleTab.jsx b/client/src/components/cos/tabs/ScheduleTab.jsxindex 69f793a5cf..365d8f1606 100644--- a/client/src/components/cos/tabs/ScheduleTab.jsx+++ b/client/src/components/cos/tabs/ScheduleTab.jsx@@ -1126,16 +1126,15 @@ export default function ScheduleTab({ apps }) {)}{schedule.onDemandRequests?.length > 0 && (- <div className="bg-port-accent/10 border border-port-accent/30 rounded-lg p-4">- <h4 className="text-sm font-medium text-port-accent mb-2">Pending On-Demand Tasks</h4>- <div className="space-y-1">+ <Banner tone="info" size="lg" title="Pending On-Demand Tasks">+ <div className="space-y-1 mt-2">{schedule.onDemandRequests.map(req => (<div key={req.id} className="text-sm text-gray-300">{req.taskType}{req.appId ? ` (${req.appId})` : ''} - requested {new Date(req.requestedAt).toLocaleTimeString()}</div>))}</div>- </div>+ </Banner>)}<AppTaskTypeSectiondiff --git a/client/src/components/digital-twin/tabs/TasteTab.jsx b/client/src/components/digital-twin/tabs/TasteTab.jsxindex d1cd06657c..1ce12eb3ab 100644--- a/client/src/components/digital-twin/tabs/TasteTab.jsx+++ b/client/src/components/digital-twin/tabs/TasteTab.jsx@@ -23,6 +23,7 @@ import {Palette,import BrailleSpinner from '../../BrailleSpinner';import * as api from '../../../services/api';import toast from '../../ui/Toast';+import Banner from '../../ui/Banner';import MarkdownOutput from '../../cos/MarkdownOutput';import { isApiProvider } from '../../../utils/providers';@@ -410,13 +411,13 @@ export default function TasteTab({ onRefresh }) {</div>)}{!selectedProvider && (- <div className="p-4 bg-port-warning/10 border border-port-warning/30 rounded-lg mb-4 text-sm text-port-warning">+ <Banner tone="warning" size="lg" className="mb-4">No API-based provider configured — Go Deeper and Generate Summary need one.{' '}<a href="/ai" className="underline hover:text-yellow-300">Open AI Providers</a>{' '}and add LM Studio, OpenAI, or Anthropic to enable these.- </div>+ </Banner>)}<div className="flex flex-col sm:flex-row gap-3"><buttondiff --git a/client/src/components/meatspace/tabs/SettingsTab.jsx b/client/src/components/meatspace/tabs/SettingsTab.jsxindex b5db4f1b43..8e94551efb 100644--- a/client/src/components/meatspace/tabs/SettingsTab.jsx+++ b/client/src/components/meatspace/tabs/SettingsTab.jsx@@ -3,6 +3,7 @@ import { Upload, Download, FileJson, HeartPulse, CheckCircle, AlertCircle } fromimport * as api from '../../../services/api';import socket from '../../../services/socket';import BrailleSpinner from '../../BrailleSpinner';+import Banner from '../../ui/Banner';export default function SettingsTab({ onRefresh }) {// JSON import state@@ -180,12 +181,8 @@ export default function SettingsTab({ onRefresh }) {{/* Success */}{jsonResult && (- <div className="mt-4 p-4 bg-port-success/10 border border-port-success/30 rounded-lg">- <div className="flex items-center gap-2 mb-2">- <CheckCircle size={16} className="text-port-success" />- <span className="text-port-success font-medium">Import successful</span>- </div>- <div className="grid grid-cols-2 md:grid-cols-4 gap-3 text-sm">+ <Banner tone="success" size="lg" icon={CheckCircle} title="Import successful" className="mt-4">+ <div className="grid grid-cols-2 md:grid-cols-4 gap-3 text-sm mt-2"><div><span className="text-gray-500">Metrics processed</span><p className="text-white font-semibold">{jsonResult.metricsProcessed?.toLocaleString()}</p>@@ -203,17 +200,12 @@ export default function SettingsTab({ onRefresh }) {<p className="text-white font-semibold">{jsonResult.daysAffected?.toLocaleString()}</p></div></div>- </div>+ </Banner>)}{/* Error */}{jsonError && (- <div className="mt-4 p-4 bg-port-error/10 border border-port-error/30 rounded-lg">- <div className="flex items-center gap-2">- <AlertCircle size={16} className="text-port-error" />- <span className="text-port-error">{jsonError}</span>- </div>- </div>+ <Banner tone="error" size="lg" icon={AlertCircle} align="center" className="mt-4">{jsonError}</Banner>)}</div>@@ -281,12 +273,8 @@ export default function SettingsTab({ onRefresh }) {{/* Success */}{xmlResult && (- <div className="mt-4 p-4 bg-port-success/10 border border-port-success/30 rounded-lg">- <div className="flex items-center gap-2 mb-2">- <CheckCircle size={16} className="text-port-success" />- <span className="text-port-success font-medium">Import successful</span>- </div>- <div className="grid grid-cols-2 gap-3 text-sm">+ <Banner tone="success" size="lg" icon={CheckCircle} title="Import successful" className="mt-4">+ <div className="grid grid-cols-2 gap-3 text-sm mt-2"><div><span className="text-gray-500">Records imported</span><p className="text-white font-semibold">{xmlResult.records?.toLocaleString()}</p>@@ -296,17 +284,12 @@ export default function SettingsTab({ onRefresh }) {<p className="text-white font-semibold">{xmlResult.days?.toLocaleString()}</p></div></div>- </div>+ </Banner>)}{/* Error */}{xmlError && (- <div className="mt-4 p-4 bg-port-error/10 border border-port-error/30 rounded-lg">- <div className="flex items-center gap-2">- <AlertCircle size={16} className="text-port-error" />- <span className="text-port-error">{xmlError}</span>- </div>- </div>+ <Banner tone="error" size="lg" icon={AlertCircle} align="center" className="mt-4">{xmlError}</Banner>)}</div></div>diff --git a/client/src/components/pipeline/stages/EpisodeVideoStage.jsx b/client/src/components/pipeline/stages/EpisodeVideoStage.jsxindex 470ced101a..0bf4735f35 100644--- a/client/src/components/pipeline/stages/EpisodeVideoStage.jsx+++ b/client/src/components/pipeline/stages/EpisodeVideoStage.jsx@@ -2,6 +2,7 @@ import { useEffect, useMemo, useRef, useState } from 'react';import { Link } from 'react-router-dom';import { Film, ExternalLink, Loader2, Sparkles, AlertCircle, CheckCircle2 } from 'lucide-react';import toast from '../../ui/Toast';+import Banner from '../../ui/Banner';import { generatePipelineVisualImage } from '../../../services/api';import { getCreativeDirectorProject } from '../../../services/apiCreativeDirector';import { getSceneStatusBadge, PROJECT_STATUS_LABEL } from '../../creative-director/sceneStatus';@@ -282,9 +283,7 @@ export default function EpisodeVideoStage({ issue, series, onStageUpdate }) {</div>{isFailed && cdProject?.failureReason && (- <p className="text-xs text-port-error bg-port-error/10 border border-port-error/30 rounded p-2">- {cdProject.failureReason}- </p>+ <Banner tone="error" size="sm">{cdProject.failureReason}</Banner>)}{total > 0 && (diff --git a/client/src/pages/CreateApp.jsx b/client/src/pages/CreateApp.jsxindex dd771241e0..92293c21d1 100644--- a/client/src/pages/CreateApp.jsx+++ b/client/src/pages/CreateApp.jsx@@ -6,6 +6,7 @@ import toast from '../components/ui/Toast';import * as api from '../services/api';import IconPicker from '../components/IconPicker';import FolderPicker from '../components/FolderPicker';+import Banner from '../components/ui/Banner';import { NON_PM2_TYPES } from '../components/apps/constants';const DETECTION_STEPS_PM2 = [@@ -293,32 +294,32 @@ export default function CreateApp() {{/* App Type Badge */}{detected && isNonPm2 && (- <div className="mt-3 p-3 bg-port-accent/10 border border-port-accent/30 rounded-lg">- <p className="text-sm text-port-accent font-medium">+ <Banner tone="info" size="md" className="mt-3">+ <p className="font-medium">{appType === 'ios-native' ? '📱 iOS App' :appType === 'macos-native' ? '🖥️ macOS App' :appType === 'swift' ? '🐦 Swift Package' :'🔨 Xcode Project'} — not managed by PM2</p>- </div>+ </Banner>)}{/* PM2 Running Status */}{pm2Status && pm2Status.length > 0 && !isNonPm2 && (- <div className="mt-3 p-3 bg-port-warning/10 border border-port-warning/30 rounded-lg">- <p className="text-sm text-port-warning font-medium flex items-center gap-2">+ <Banner tone="warning" size="md" className="mt-3">+ <p className="font-medium flex items-center gap-2"><Play size={14} /> Already running in PM2</p><p className="text-xs text-gray-400 mt-1">{pm2Status.map(p => `${p.name} (${p.status})`).join(', ')}</p>- </div>+ </Banner>)}{/* Standardization Result */}{standardizeResult && (- <div className="mt-3 p-3 bg-port-success/10 border border-port-success/30 rounded-lg">- <p className="text-sm text-port-success font-medium flex items-center gap-2">+ <Banner tone="success" size="md" className="mt-3">+ <p className="font-medium flex items-center gap-2"><Wrench size={14} /> PM2 Config Standardized</p>{standardizeResult.backupBranch && (@@ -331,7 +332,7 @@ export default function CreateApp() {Modified: {standardizeResult.filesModified.join(', ')}</p>)}- </div>+ </Banner>)}{/* No Provider Warning */}diff --git a/client/src/pages/HistoryPage.jsx b/client/src/pages/HistoryPage.jsxindex 1cbfc73d0d..edc915438d 100644--- a/client/src/pages/HistoryPage.jsx+++ b/client/src/pages/HistoryPage.jsx@@ -3,6 +3,7 @@ import { Trash2 } from 'lucide-react';import * as api from '../services/api';import { formatTime, formatRuntime } from '../utils/formatters';import BrailleSpinner from '../components/BrailleSpinner';+import Banner from '../components/ui/Banner';export function HistoryPage() {const [history, setHistory] = useState([]);@@ -271,11 +272,11 @@ export function HistoryPage() {{entry.error && (<div><div className="text-xs text-gray-500 uppercase tracking-wide mb-2">Error</div>- <div className="bg-port-error/10 border border-port-error/30 rounded-lg p-3">- <pre className="text-sm text-port-error font-mono whitespace-pre-wrap">+ <Banner tone="error" size="md">+ <pre className="text-sm font-mono whitespace-pre-wrap">{entry.error}</pre>- </div>+ </Banner></div>)}diff --git a/client/src/pages/Loras.jsx b/client/src/pages/Loras.jsxindex ec4f3f96ef..f187b6dc85 100644--- a/client/src/pages/Loras.jsx+++ b/client/src/pages/Loras.jsx@@ -207,10 +207,7 @@ export default function Loras() {<h2 className="text-lg font-semibold text-white mb-3">Installed</h2>{loading && <div className="text-sm text-gray-500">Loading…</div>}{error && (- <div className="bg-port-error/10 border border-port-error/30 rounded p-3 text-sm text-port-error flex items-center gap-2">- <AlertTriangle size={16} />- {error}- </div>+ <Banner tone="error" size="md" icon={AlertTriangle} align="center">{error}</Banner>)}{!loading && !error && loras.length === 0 && (<div className="text-sm text-gray-500 italic">diff --git a/client/src/pages/RunsHistoryPage.jsx b/client/src/pages/RunsHistoryPage.jsxindex fc411040b4..9994897294 100644--- a/client/src/pages/RunsHistoryPage.jsx+++ b/client/src/pages/RunsHistoryPage.jsx@@ -4,6 +4,7 @@ import { Trash2, RotateCcw, MessageSquarePlus } from 'lucide-react';import * as api from '../services/api';import { formatTime, formatRuntime } from '../utils/formatters';import BrailleSpinner from '../components/BrailleSpinner';+import Banner from '../components/ui/Banner';import { writeClipboardSilently } from '../lib/clipboard';export function RunsHistoryPage() {@@ -395,11 +396,11 @@ export function RunsHistoryPage() {</span>)}</div>- <div className="bg-port-error/10 border border-port-error/30 rounded-lg p-3">- <pre className="text-sm text-port-error font-mono whitespace-pre-wrap break-all">+ <Banner tone="error" size="md">+ <pre className="text-sm font-mono whitespace-pre-wrap break-all">{run.error || exitInfo.description}</pre>- </div>+ </Banner>{/* Show additional error details if available and different from error */}{run.errorDetails && run.errorDetails !== run.error && (<div className="mt-2 bg-port-error/5 border border-port-error/20 rounded-lg p-3">@@ -411,12 +412,11 @@ export function RunsHistoryPage() {)}{/* Show suggested fix if available, or fallback to exit code info */}{(run.suggestedFix || (!run.error && exitInfo.description)) && (- <div className="mt-2 bg-port-warning/10 border border-port-warning/30 rounded-lg p-3">- <div className="text-xs text-port-warning mb-1 font-medium">Suggested Fix</div>- <div className="text-sm text-gray-300">+ <Banner tone="warning" size="md" className="mt-2" title="Suggested Fix">+ <div className="text-sm text-gray-300 mt-1">{run.suggestedFix || 'Check the output above for specific error details. If the output is empty, the process may have been terminated before producing output.'}</div>- </div>+ </Banner>)}</div>);diff --git a/client/src/pages/Security.jsx b/client/src/pages/Security.jsxindex 170f4509f7..d7008bb785 100644--- a/client/src/pages/Security.jsx+++ b/client/src/pages/Security.jsx@@ -270,9 +270,7 @@ export default function Security() {{/* Error display */}{error && (- <div className="mb-6 p-4 bg-port-error/10 border border-port-error/30 rounded-lg text-port-error">- {error}- </div>+ <Banner tone="error" size="lg" className="mb-6">{error}</Banner>)}{/* Audio interaction prompt for mobile browsers */}diff --git a/client/src/pages/StoryBuilder.jsx b/client/src/pages/StoryBuilder.jsxindex b705b11d12..20415bdc68 100644--- a/client/src/pages/StoryBuilder.jsx+++ b/client/src/pages/StoryBuilder.jsx@@ -12,6 +12,7 @@ import {Plus, RefreshCw, Loader2, ExternalLink, Wand2,} from 'lucide-react';import toast from '../components/ui/Toast';+import Banner from '../components/ui/Banner';import { useLockToggle } from '../hooks/useLockToggle';import {getStoryBuilderSteps, listStorySessions, getStorySession, createStorySession,@@ -852,9 +853,9 @@ function StoryBuilderDetail({ storyId, stepParam }) {</div>{isStale && (- <div className="flex items-center gap-2 text-sm text-port-warning bg-port-warning/10 border border-port-warning/30 rounded px-3 py-2">- <AlertTriangle className="w-4 h-4" /> An earlier step changed after you locked this — re-review and re-lock to continue.- </div>+ <Banner tone="warning" size="md" icon={AlertTriangle} align="center">+ An earlier step changed after you locked this — re-review and re-lock to continue.+ </Banner>)}<StepPaneldiff --git a/client/src/pages/SystemHealthPage.jsx b/client/src/pages/SystemHealthPage.jsxindex e5f3336fec..6b05cc5b6f 100644--- a/client/src/pages/SystemHealthPage.jsx+++ b/client/src/pages/SystemHealthPage.jsx@@ -4,6 +4,7 @@ import { Activity, AlertTriangle, CheckCircle, XCircle, HardDrive, Cpu, Databaseimport * as api from '../services/api';import toast from '../components/ui/Toast';import BrailleSpinner from '../components/BrailleSpinner';+import Banner from '../components/ui/Banner';import { useAutoRefetch } from '../hooks/useAutoRefetch';const HEALTH_STYLE = {@@ -108,10 +109,7 @@ export default function SystemHealthPage() {{health.warnings.length > 0 && (<section className="space-y-2">{health.warnings.map((w, i) => (- <div key={i} className="flex items-center gap-2 px-3 py-2 rounded-lg bg-port-warning/10 border border-port-warning/30 text-port-warning text-sm">- <AlertTriangle size={14} />- <span>{w.message}</span>- </div>+ <Banner key={i} tone="warning" size="md" icon={AlertTriangle} align="center">{w.message}</Banner>))}</section>)}