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

feat(theme): add day/night toggle + 4 daytime theme variants

Adam Eivy5beae383f749
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index d715607db6..ff77e7442c 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -2,6 +2,8 @@
## Added
+- **Day/night theme toggle + 4 daytime theme variants.** Each existing theme now ships with a paired light-scheme counterpart: `classic-midnight ↔ classic-noon`, `lumen-glass ↔ lumen-glass-day` (cream/cyan glass on a drifting peach mesh — the daytime glassmorphic delivered from a Claude Design handoff), `black-ice-terminal ↔ black-ice-terminal-day` (Phosphor Paper — green ink on cream paper, pixel grid, line-printer report aesthetic), `blueprint-ops ↔ blueprint-ops-day` (Drafting Paper — pale cyan grid on white, navy headings, amber annotations). The picker (`Settings → General`) now groups themes by family and shows a Sun/Moon switch on each card; a global Sun/Moon button in the sidebar footer (and mobile header) toggles the active theme to its pair without leaving the page. Pairing is derived at runtime from `family + opposite-mode` — no per-theme `pair` field to maintain. Day mode surfaces as `data-port-theme-mode="day"` on `<html>`, letting one CSS layer remap hardcoded Tailwind dark utilities (`text-white`, `bg-slate-900/X`, `from-slate-900/X` gradient stops, `border-indigo-500/X`, `text-indigo-400`, etc.) onto theme tokens (`--port-card`, `--port-border`, `--port-accent`) so existing dark-only components — including the CoS avatar pane and `StateLabel` "Thinking" pill — render correctly under day themes without touching JSX. Inter + IBM Plex Mono load globally via Google Fonts. `LEGACY_THEME_ALIASES` redirects any pre-migration `pastel-*` ids onto their nearest day-mode equivalent so persisted settings don't break.
+
- **Writers Room — manual AI passes (Evaluate / Format / Adapt to Screenplay).** Three new prompt stages in `data.sample/prompts/stages/writers-room-{evaluate,format,script}.md` (registered in `stage-config.json`, seeded into `data/prompts/` by `npm run setup:data`) drive a new evaluator service (`server/services/writersRoom/evaluator.js`). Triggered by user click from a new AI tab in the WorkEditor right sidebar — never auto-runs. **Evaluate** returns a structured editorial critique (logline, summary, themes, strengths, severity-tagged issues with verbatim excerpts, target-anchored suggestions). **Format** returns cleaned prose with paragraphing, dialogue formatting, whitespace, punctuation, and consistent chapter/scene markdown headings; an "Apply to draft" button replaces the editor buffer (no autosave — user still has to hit Save). **Adapt to Screenplay** returns a scene-by-scene breakdown with sluglines, action, dialogue, and a self-contained `visualPrompt` per scene that the per-scene "Generate image" button feeds into the existing `/api/image-gen/generate` queue — making Writers Room the first surface that hands prose-driven prompts straight into the FLUX.2 image pipeline. Snapshots are immutable and pinned to the source draft's `contentHash`; the analyses list shows a stale-warning badge when the draft has moved on since the analysis ran. Storage: `data/writers-room/works/<id>/analysis/<analysisId>.json`. Routes: `POST /api/writers-room/works/:id/analysis` (kind required), `GET /api/writers-room/works/:id/analysis`, `GET /api/writers-room/works/:id/analysis/:analysisId`. Boot recovery (`recoverStuckAnalyses` in `server/index.js`) marks any `running` snapshot as `failed` after a server restart so the UI never spins on a phantom row. Single source of truth for analysis kinds (`ANALYSIS_KINDS` in `writersRoomPresets.js`) shared by Zod and the evaluator. Reuses `stripCodeFences` from `server/lib/aiProvider.js` instead of carrying its own fence regex.
- **Writers Room — drag-and-drop works between folders.** Each work row in the Library pane now has a grip handle (left edge) — drag from there to drop the work onto any folder header to file it, or onto the Unfiled zone to remove it from a folder. Built on `@dnd-kit/core` (already a dependency, same pattern as `KanbanBoard.jsx` / `goals/GoalsListView.jsx`). PointerSensor uses a 6px activation distance so a normal click still selects the work. Dropping into a closed folder auto-expands it so the moved work is immediately visible. While a drag is in flight the Unfiled zone always renders (even when empty) with a "Drop here to unfile" hint so a user can unfile the only work in a folder. A `<DragOverlay>` chip follows the cursor while the source row dims to 30% opacity. Toast confirms the move (`Moved "Bad Curry" to Dream Machine` / `Moved "Bad Curry" to Unfiled`). Backend was already wired — the existing `PATCH /api/writers-room/works/:id` accepts `{ folderId }`.
- **Writers Room (`/writers-room`) — Phase 1 authoring core.** New top-level `Create` sidebar group bundles **Media Gen** (default landing) with **Writers Room**, the new file-backed workspace for prose/short-story/screenplay/novel/essay drafts. Library pane manages folders + works; Markdown editor with live word count, segment-index outline (auto-derived from `#` chapters and `##`/`###` scenes), version snapshots, and Cmd/Ctrl+S save; "Write for 10" sprint timer with 5/10/15/25-min presets, prompt field, and per-session word-delta logging. Storage lives under `data/writers-room/` (`folders.json`, `exercises.json`, `works/<id>/manifest.json` + `drafts/*.md`) — driven by a single writer (`server/services/writersRoom/local.js`) following the Creative Director pattern. New routes under `/api/writers-room/*` cover folder/work CRUD, draft body I/O, version snapshot/switch, and exercise lifecycle. Backend tests cover word counting, content-hash determinism, segment-index splitting, folder/work CRUD with cross-validation (deleting a non-empty folder, missing-parent rejection), draft round-trip + version pointer-switching across multiple snapshots, exercise duration clamping + word-delta math + settled-state rejection, and the strict Zod schemas at the route boundary. Mobile/touch-friendly: library pane caps height on mobile, delete buttons stay reachable without hover. Phases 2-5 (manual AI analysis, Creative Director handoff, synced prose/script/media review, realtime CD feedback) tracked in `docs/features/writers-room.md`.
diff --git a/client/index.html b/client/index.html
index e49656de9e..ec98289445 100644
--- a/client/index.html
+++ b/client/index.html
@@ -10,6 +10,12 @@
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#01051F" />
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
+ <link
+ rel="stylesheet"
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap"
+ />
</head>
<body>
<div id="root"></div>
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 49b9bd53e3..76f438a049 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -75,7 +75,9 @@ import {
Search,
Mic,
Rss,
- Archive
+ Archive,
+ Sun,
+ Moon
} from 'lucide-react';
/* global __APP_VERSION__ */
import Logo from './Logo';
@@ -84,11 +86,30 @@ import { useNotifications } from '../hooks/useNotifications';
import { useAgentFeedbackToast } from '../hooks/useAgentFeedbackToast';
import { useUpdateChecker } from '../hooks/useUpdateChecker';
import { useAIStatusNotifications } from '../hooks/useAIStatusNotifications';
+import { useThemeContext } from './ThemeContext';
import NotificationDropdown from './NotificationDropdown';
import VoiceToggleButton from './voice/VoiceToggleButton';
import CmdKSearch from './CmdKSearch';
import KeyboardHelp from './KeyboardHelp';
import VoiceWidget from './voice/VoiceWidget';
+
+function ThemeModeToggle({ className = '' }) {
+ const { theme, toggleMode } = useThemeContext();
+ const isDay = theme?.mode === 'day';
+ const Icon = isDay ? Sun : Moon;
+ const pairLabel = theme?.pair ? ` (${isDay ? 'switch to night' : 'switch to day'})` : '';
+ return (
+ <button
+ type="button"
+ onClick={toggleMode}
+ title={`${theme?.label ?? 'Theme'}${pairLabel}`}
+ aria-label={`Toggle day/night mode${pairLabel}`}
+ className={`p-1.5 rounded-lg text-gray-500 hover:text-port-accent transition-colors ${className}`}
+ >
+ <Icon size={18} />
+ </button>
+ );
+}
import * as api from '../services/api';
import socket from '../services/socket';
@@ -690,6 +711,7 @@ export default function Layout() {
>
<Monitor size={18} />
</NavLink>
+ <ThemeModeToggle />
<VoiceToggleButton className={collapsed ? 'lg:hidden' : ''} />
<NotificationDropdown
notifications={notifications}
@@ -732,6 +754,7 @@ export default function Layout() {
>
<Monitor size={16} />
</NavLink>
+ <ThemeModeToggle />
<VoiceToggleButton />
<NotificationDropdown
notifications={notifications}
diff --git a/client/src/components/ThemeContext.jsx b/client/src/components/ThemeContext.jsx
index 4c9874b97c..5f87d14314 100644
--- a/client/src/components/ThemeContext.jsx
+++ b/client/src/components/ThemeContext.jsx
@@ -7,6 +7,7 @@ const FALLBACK_CONTEXT = {
theme: THEMES[DEFAULT_THEME_ID],
themeList: THEME_LIST,
setTheme: () => {},
+ toggleMode: () => {},
};
const ThemeContext = createContext(null);
diff --git a/client/src/components/ThemePickerPanel.jsx b/client/src/components/ThemePickerPanel.jsx
index 03e02ed9ba..0689d90a85 100644
--- a/client/src/components/ThemePickerPanel.jsx
+++ b/client/src/components/ThemePickerPanel.jsx
@@ -1,54 +1,58 @@
-import { Check } from 'lucide-react';
+import { Sun, Moon } from 'lucide-react';
import { useThemeContext } from './ThemeContext';
import { getFamilyIcon } from '../themes/familyIcons';
+import { groupThemesByFamily } from '../themes/portosThemes';
+
+const FAMILIES = groupThemesByFamily();
export default function ThemePickerPanel({ compact = false }) {
- const { themeId, themeList, setTheme } = useThemeContext();
+ const { themeId, setTheme } = useThemeContext();
return (
- <div className={compact ? 'grid gap-2' : 'grid gap-3 sm:grid-cols-2 xl:grid-cols-4'}>
- {themeList.map(theme => {
- const Icon = getFamilyIcon(theme.family);
- const active = theme.id === themeId;
+ <div className={compact ? 'grid gap-2' : 'grid gap-3 sm:grid-cols-2 xl:grid-cols-2'}>
+ {FAMILIES.map(group => {
+ const Icon = getFamilyIcon(group.family);
+ const activeMode = themeId === group.day?.id ? 'day' : themeId === group.night?.id ? 'night' : null;
+ const displayed = activeMode === 'day' ? group.day : group.night ?? group.day;
+ const cardActive = activeMode !== null;
return (
- <button
- key={theme.id}
- type="button"
- onClick={() => setTheme(theme.id)}
- aria-pressed={active}
- className={`group text-left border transition-colors ${
- compact ? 'rounded-lg p-3' : 'rounded-xl p-4'
- } ${
- active
- ? 'bg-port-accent/10 border-port-accent/60 text-white'
- : 'bg-port-card border-port-border text-gray-300 hover:text-white hover:border-port-accent/50'
+ <div
+ key={group.family}
+ className={`text-left border transition-colors ${compact ? 'rounded-lg p-3' : 'rounded-xl p-4'} ${
+ cardActive
+ ? 'bg-port-accent/10 border-port-accent/60'
+ : 'bg-port-card border-port-border'
}`}
>
<div className="flex items-start justify-between gap-3">
- <div className="flex items-center gap-2 min-w-0">
+ <button
+ type="button"
+ onClick={() => setTheme(displayed.id)}
+ aria-pressed={cardActive}
+ className="flex items-center gap-2 min-w-0 flex-1 text-left group"
+ >
<span className="inline-flex items-center justify-center w-8 h-8 rounded-lg bg-port-bg border border-port-border text-port-accent shrink-0">
<Icon size={16} />
</span>
<div className="min-w-0">
- <div className="font-semibold truncate">{theme.label}</div>
- <div className="text-xs text-gray-500 capitalize">{theme.density}</div>
+ <div className="font-semibold truncate group-hover:text-port-accent transition-colors">
+ {displayed.label}
+ </div>
+ <div className="text-xs text-port-text-muted capitalize">{displayed.density}</div>
</div>
- </div>
- {active && (
- <span className="inline-flex items-center justify-center w-5 h-5 rounded-full bg-port-accent text-white shrink-0">
- <Check size={13} />
- </span>
- )}
+ </button>
+
+ <ModeSwitch group={group} activeMode={activeMode} onPick={setTheme} />
</div>
{!compact && (
- <p className="mt-3 text-sm text-gray-400 line-clamp-3 min-h-[60px]">
- {theme.concept}
+ <p className="mt-3 text-sm text-port-text-muted line-clamp-3 min-h-[60px]">
+ {displayed.concept}
</p>
)}
<div className="mt-3 flex items-center gap-1.5">
- {theme.swatches.map(color => (
+ {displayed.swatches.map(color => (
<span
key={color}
className="h-4 flex-1 rounded border border-white/15"
@@ -56,9 +60,49 @@ export default function ThemePickerPanel({ compact = false }) {
/>
))}
</div>
- </button>
+ </div>
);
})}
</div>
);
}
+
+function ModeSwitch({ group, activeMode, onPick }) {
+ const has = (mode) => Boolean(group[mode]);
+ return (
+ <div
+ role="group"
+ aria-label="Day/night mode"
+ className="inline-flex items-center bg-port-bg border border-port-border rounded-full p-0.5 shrink-0"
+ >
+ <button
+ type="button"
+ onClick={() => has('night') && onPick(group.night.id)}
+ aria-label={`Use ${group.night?.label ?? 'night'} mode`}
+ aria-pressed={activeMode === 'night'}
+ disabled={!has('night')}
+ className={`p-1.5 rounded-full transition-colors ${
+ activeMode === 'night'
+ ? 'bg-port-accent text-port-on-accent'
+ : 'text-port-text-muted hover:text-port-text disabled:opacity-40'
+ }`}
+ >
+ <Moon size={14} />
+ </button>
+ <button
+ type="button"
+ onClick={() => has('day') && onPick(group.day.id)}
+ aria-label={`Use ${group.day?.label ?? 'day'} mode`}
+ aria-pressed={activeMode === 'day'}
+ disabled={!has('day')}
+ className={`p-1.5 rounded-full transition-colors ${
+ activeMode === 'day'
+ ? 'bg-port-accent text-port-on-accent'
+ : 'text-port-text-muted hover:text-port-text disabled:opacity-40'
+ }`}
+ >
+ <Sun size={14} />
+ </button>
+ </div>
+ );
+}
diff --git a/client/src/components/cos/StateLabel.jsx b/client/src/components/cos/StateLabel.jsx
index aef58086a0..d2642d0a51 100644
--- a/client/src/components/cos/StateLabel.jsx
+++ b/client/src/components/cos/StateLabel.jsx
@@ -8,7 +8,7 @@ export default function StateLabel({ state, compact = false }) {
<div
className="flex items-center gap-1 px-1.5 py-0.5 rounded-full font-mono text-[10px]"
style={{
- background: 'rgba(15, 23, 42, 0.8)',
+ background: 'rgb(var(--port-card) / 0.8)',
border: `1px solid ${stateConfig.color}`
}}
>
@@ -22,9 +22,9 @@ export default function StateLabel({ state, compact = false }) {
<div
className="flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-1 sm:py-2 rounded-full mt-1 sm:mt-4 font-mono text-[10px] sm:text-xs"
style={{
- background: 'rgba(15, 23, 42, 0.8)',
+ background: 'rgb(var(--port-card) / 0.8)',
border: `1px solid ${stateConfig.color}`,
- boxShadow: `0 0 20px rgba(99, 102, 241, 0.2)`
+ boxShadow: '0 0 20px rgb(var(--port-accent) / 0.2)'
}}
>
<span className="text-xs sm:text-base">{stateConfig.icon}</span>
diff --git a/client/src/hooks/useTheme.js b/client/src/hooks/useTheme.js
index b35dec51c9..78ceb5b974 100644
--- a/client/src/hooks/useTheme.js
+++ b/client/src/hooks/useTheme.js
@@ -3,6 +3,7 @@ import {
THEMES,
THEME_LIST,
getTheme,
+ getPairedThemeId,
normalizeThemeId,
} from '../themes/portosThemes';
@@ -18,6 +19,7 @@ const applyTheme = (id) => {
document.documentElement.dataset.portTheme = theme.id;
document.documentElement.dataset.portThemeFamily = theme.family;
document.documentElement.dataset.portThemeDensity = theme.density;
+ document.documentElement.dataset.portThemeMode = theme.mode;
document.documentElement.style.colorScheme = theme.colorScheme ?? 'dark';
return theme.id;
};
@@ -66,5 +68,11 @@ export default function useTheme() {
}).catch(() => console.warn('Theme sync to server failed'));
}, []);
- return { themeId, theme: THEMES[themeId], themeList: THEME_LIST, setTheme };
+ const toggleMode = useCallback(() => {
+ const paired = getPairedThemeId(themeId);
+ if (paired === themeId) return;
+ setTheme(paired);
+ }, [themeId, setTheme]);
+
+ return { themeId, theme: THEMES[themeId], themeList: THEME_LIST, setTheme, toggleMode };
}
diff --git a/client/src/index.css b/client/src/index.css
index 0616541979..c327061443 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -426,6 +426,184 @@ html[data-port-theme="blueprint-ops"] header :is(h1, h2, h3) {
padding-left: 0;
}
+/* === Day mode: remap hardcoded Tailwind dark utilities onto theme tokens. */
+html[data-port-theme-mode="day"] :is(.text-white, .text-zinc-50, .text-zinc-100, .text-neutral-50, .text-neutral-100, .text-gray-50, .text-gray-100, .text-slate-50, .text-slate-100) {
+ color: rgb(var(--port-text)) !important;
+}
+
+html[data-port-theme-mode="day"] :is(.text-zinc-200, .text-zinc-300, .text-neutral-200, .text-neutral-300, .text-gray-200, .text-gray-300, .text-slate-200, .text-slate-300) {
+ color: rgb(var(--port-text) / 0.85) !important;
+}
+
+html[data-port-theme-mode="day"] :is(.text-zinc-400, .text-zinc-500, .text-neutral-400, .text-neutral-500, .text-gray-400, .text-gray-500, .text-slate-400, .text-slate-500) {
+ color: rgb(var(--port-text-muted)) !important;
+}
+
+html[data-port-theme-mode="day"] :is(.bg-white, .bg-zinc-50, .bg-neutral-50, .bg-gray-50, .bg-slate-50) {
+ background-color: rgb(var(--port-card) / var(--port-card-alpha)) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="bg-slate-900/40"],
+html[data-port-theme-mode="day"] [class~="bg-slate-900/60"],
+html[data-port-theme-mode="day"] [class~="bg-slate-900/80"],
+html[data-port-theme-mode="day"] [class~="bg-slate-950/40"],
+html[data-port-theme-mode="day"] [class~="bg-gray-900/50"],
+html[data-port-theme-mode="day"] [class~="bg-zinc-950/40"],
+html[data-port-theme-mode="day"] [class~="bg-stone-950/40"],
+html[data-port-theme-mode="day"] [class~="bg-indigo-950/40"] {
+ background-color: rgb(var(--port-card) / 0.6) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="bg-slate-800/80"]:hover {
+ background-color: rgb(var(--port-card) / 0.85) !important;
+}
+
+/* Tailwind gradient utilities resolve to --tw-gradient-from/-to; override
+ * the resolved values, not the class. */
+html[data-port-theme-mode="day"] [class~="from-slate-900/80"] {
+ --tw-gradient-from: rgb(var(--port-card) / 0.6) !important;
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(var(--port-card) / 0)) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="to-slate-900/40"] {
+ --tw-gradient-to: rgb(var(--port-card) / 0.3) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="border-gray-700"],
+html[data-port-theme-mode="day"] [class~="border-gray-700/40"],
+html[data-port-theme-mode="day"] [class~="border-gray-700/50"],
+html[data-port-theme-mode="day"] [class~="border-slate-700/50"] {
+ border-color: rgb(var(--port-border) / calc(var(--port-border-alpha) * 1.4)) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="border-indigo-500/20"],
+html[data-port-theme-mode="day"] [class~="border-indigo-500/30"],
+html[data-port-theme-mode="day"] [class~="border-indigo-500/40"] {
+ border-color: rgb(var(--port-accent) / 0.32) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="bg-indigo-500/10"] {
+ background-color: rgb(var(--port-accent) / 0.1) !important;
+}
+html[data-port-theme-mode="day"] [class~="bg-indigo-500/15"] {
+ background-color: rgb(var(--port-accent) / 0.14) !important;
+}
+html[data-port-theme-mode="day"] [class~="bg-indigo-500/20"] {
+ background-color: rgb(var(--port-accent) / 0.18) !important;
+}
+
+html[data-port-theme-mode="day"] [class~="text-indigo-400"],
+html[data-port-theme-mode="day"] [class~="text-indigo-400/70"] {
+ color: rgb(var(--port-accent)) !important;
+}
+
+/* === Lumen Glass Day === */
+html[data-port-theme="lumen-glass-day"] :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
+ border-color: rgb(var(--port-border) / 0.22) !important;
+ box-shadow: var(--port-shadow-card);
+}
+
+html[data-port-theme="lumen-glass-day"] :is(input, textarea, select):focus,
+html[data-port-theme="lumen-glass-day"] button:focus-visible,
+html[data-port-theme="lumen-glass-day"] a:focus-visible {
+ box-shadow: 0 0 0 3px rgb(var(--port-focus-ring) / 0.22), 0 0 24px rgb(var(--port-focus-ring) / 0.16);
+}
+
+html[data-port-theme="lumen-glass-day"] aside nav [aria-current="page"] {
+ background: rgb(var(--port-accent) / 0.16);
+ color: rgb(var(--port-accent));
+}
+
+html[data-port-theme="lumen-glass-day"] body::before {
+ background-attachment: fixed;
+ animation: portos-glass-drift-a 32s ease-in-out infinite alternate;
+ will-change: background-position;
+}
+
+html[data-port-theme="lumen-glass-day"] body::after {
+ content: "";
+ position: fixed;
+ inset: -10vh -10vw;
+ z-index: -1;
+ pointer-events: none;
+ background: radial-gradient(40vw 40vw at 30vw 70vh, rgb(var(--port-accent) / 0.16) 0%, transparent 60%);
+ filter: blur(80px);
+ opacity: 0.7;
+ animation: portos-glass-drift-b 44s ease-in-out -8s infinite alternate;
+ will-change: transform;
+}
+
+@keyframes portos-glass-drift-a {
+ 0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
+ 100% { background-position: 0 0, 0 0, 0 0, 10vw -5vh, -8vw 6vh; }
+}
+
+@keyframes portos-glass-drift-b {
+ 0% { transform: translate(0, 0) scale(1); }
+ 100% { transform: translate(8vw, -4vh) scale(1.15); }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ html[data-port-theme="lumen-glass-day"] body::before,
+ html[data-port-theme="lumen-glass-day"] body::after {
+ animation: none;
+ }
+}
+
+/* === Phosphor Paper (Black ICE Day) === */
+html[data-port-theme="black-ice-terminal-day"] body {
+ text-shadow: 0 0 8px rgb(var(--port-accent) / 0.04);
+}
+
+html[data-port-theme="black-ice-terminal-day"] body::after {
+ content: "";
+ position: fixed;
+ inset: 0;
+ z-index: 9998;
+ pointer-events: none;
+ background: repeating-linear-gradient(
+ 180deg,
+ rgb(10 60 30 / 0.04) 0,
+ rgb(10 60 30 / 0.04) 1px,
+ transparent 1px,
+ transparent 5px
+ );
+ mix-blend-mode: multiply;
+ opacity: 0.4;
+}
+
+html[data-port-theme="black-ice-terminal-day"] :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
+ border-color: rgb(var(--port-border) / 0.32) !important;
+ background-image: linear-gradient(180deg, rgb(255 255 255 / 0.5), transparent 38px);
+}
+
+html[data-port-theme="black-ice-terminal-day"] :is(pre, code, textarea, input) {
+ text-shadow: 0 0 6px rgb(var(--port-accent) / 0.06);
+}
+
+html[data-port-theme="black-ice-terminal-day"] aside nav [aria-current="page"] {
+ border-left: 2px solid rgb(var(--port-accent));
+}
+
+/* === Drafting Paper (Blueprint Day) === */
+html[data-port-theme="blueprint-ops-day"] :is(.bg-port-card, [class~="bg-port-card/50"]):is(.border, .rounded, .rounded-lg, .rounded-xl, .rounded-2xl) {
+ background-image:
+ linear-gradient(90deg, rgb(var(--port-border) / 0.05) 1px, transparent 1px),
+ linear-gradient(180deg, rgb(var(--port-border) / 0.04) 1px, transparent 1px);
+ background-size: 20px 20px;
+}
+
+html[data-port-theme="blueprint-ops-day"] :is(h1, h2, h3) {
+ border-left: 3px solid rgb(var(--port-accent) / 0.72);
+ padding-left: 0.55rem;
+}
+
+html[data-port-theme="blueprint-ops-day"] aside :is(h1, h2, h3),
+html[data-port-theme="blueprint-ops-day"] header :is(h1, h2, h3) {
+ border-left: 0;
+ padding-left: 0;
+}
+
/* Accessibility: Global focus styles for keyboard navigation */
*:focus-visible {
outline: 2px solid rgb(var(--port-focus-ring));
diff --git a/client/src/themes/portosThemes.js b/client/src/themes/portosThemes.js
index 99a92f23a8..694bc7a1cf 100644
--- a/client/src/themes/portosThemes.js
+++ b/client/src/themes/portosThemes.js
@@ -30,6 +30,7 @@ export const THEMES = {
shortLabel: 'Classic',
concept: 'The existing PortOS interface, kept as the stable baseline.',
family: 'classic',
+ mode: 'night',
accent: '#3b82f6',
doc: '/docs/themes/classic-midnight.md',
colorScheme: 'dark',
@@ -86,12 +87,77 @@ export const THEMES = {
},
},
+ 'classic-noon': {
+ id: 'classic-noon',
+ label: 'Classic Noon',
+ shortLabel: 'Classic',
+ concept: 'Classic Midnight reflected to a clean white workspace — same blue accent, daylight legibility.',
+ family: 'classic',
+ mode: 'day',
+ accent: '#3b82f6',
+ colorScheme: 'light',
+ density: 'comfortable',
+ swatches: ['#fafafa', '#ffffff', '#3b82f6', '#16a34a'],
+ colors: {
+ '--port-bg': '250 250 250',
+ '--port-card': '255 255 255',
+ '--port-border': '212 212 216',
+ '--port-accent': '37 99 235',
+ '--port-text': '23 23 23',
+ '--port-text-muted': '82 82 91',
+ '--port-control-text': '38 38 38',
+ '--port-focus-ring': '37 99 235',
+ '--port-on-accent': '255 255 255',
+ ...baseStatusColors,
+ '--port-success': '22 163 74',
+ '--port-error': '220 38 38',
+ },
+ tokens: {
+ ...classicShapeTokens,
+ ...baseMotionTokens,
+ '--port-bg-alpha': '1',
+ '--port-card-alpha': '1',
+ '--port-border-alpha': '1',
+ '--port-sidebar-alpha': '1',
+ '--port-overlay-alpha': '0.72',
+ '--port-panel-padding-scale': '1',
+ '--port-font-ui': "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
+ '--port-font-display': 'var(--port-font-ui)',
+ '--port-font-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
+ '--port-shadow-card': '0 1px 2px rgb(0 0 0 / 0.04), 0 1px 1px rgb(0 0 0 / 0.03)',
+ '--port-shadow-elevated': '0 14px 40px -12px rgb(15 23 42 / 0.18), 0 4px 10px -2px rgb(15 23 42 / 0.08)',
+ '--port-shadow-interactive': '0 0 0 1px rgb(var(--port-accent) / 0.4)',
+ '--port-backdrop-filter': 'none',
+ '--port-border-style': 'solid',
+ '--port-body-gradient': 'none',
+ '--port-body-texture': 'none',
+ '--port-body-size': 'cover, cover',
+ '--port-body-overlay-opacity': '0',
+ '--port-app-backdrop': 'rgb(var(--port-bg))',
+ '--port-sidebar-bg': 'rgb(var(--port-card))',
+ '--port-input-bg': 'rgb(255 255 255)',
+ '--port-control-bg': 'rgb(244 244 245)',
+ '--port-control-bg-hover': 'rgb(228 228 231)',
+ '--port-control-border': 'rgb(var(--port-border))',
+ '--port-active-bg': 'rgb(var(--port-accent) / 0.1)',
+ '--port-hover-bg': 'rgb(0 0 0 / 0.04)',
+ '--port-terminal-bg': 'rgb(247 247 248)',
+ '--port-terminal-text': 'rgb(23 23 23)',
+ '--port-chart-1': '37 99 235',
+ '--port-chart-2': '22 163 74',
+ '--port-chart-3': '202 138 4',
+ '--port-chart-4': '219 39 119',
+ '--port-chart-grid': '212 212 216',
+ },
+ },
+
'lumen-glass': {
id: 'lumen-glass',
label: 'Lumen Glass',
shortLabel: 'Glass',
concept: 'A translucent local-first command deck with layered glass panes and soft luminous depth.',
family: 'glass',
+ mode: 'night',
accent: '#67e8f9',
doc: '/docs/themes/lumen-glass.md',
colorScheme: 'dark',
@@ -157,12 +223,84 @@ export const THEMES = {
},
},
+ 'lumen-glass-day': {
+ id: 'lumen-glass-day',
+ label: 'Lumen Glass Day',
+ shortLabel: 'Glass',
+ concept: 'Lumen Glass at noon — cream-and-cyan glass panels floating on a sunlit drifting mesh.',
+ family: 'glass',
+ mode: 'day',
+ accent: '#0891b2',
+ colorScheme: 'light',
+ density: 'spacious',
+ swatches: ['#f5efe6', '#ffffff', '#0891b2', '#fb7185'],
+ colors: {
+ '--port-bg': '245 239 230',
+ '--port-card': '255 255 255',
+ '--port-border': '8 145 178',
+ '--port-accent': '8 145 178',
+ '--port-success': '22 163 74',
+ '--port-warning': '202 138 4',
+ '--port-error': '225 29 72',
+ '--port-on-accent': '255 255 255',
+ '--port-on-success': '255 255 255',
+ '--port-on-warning': '255 255 255',
+ '--port-on-error': '255 255 255',
+ '--port-text': '12 30 36',
+ '--port-text-muted': '78 102 110',
+ '--port-control-text': '36 60 70',
+ '--port-focus-ring': '8 145 178',
+ },
+ tokens: {
+ ...baseMotionTokens,
+ '--port-radius-sm': '0.5rem',
+ '--port-radius-md': '0.75rem',
+ '--port-radius-lg': '1rem',
+ '--port-radius-xl': '1.25rem',
+ '--port-radius-pill': '9999px',
+ '--port-bg-alpha': '1',
+ '--port-card-alpha': '0.6',
+ '--port-border-alpha': '0.2',
+ '--port-sidebar-alpha': '0.72',
+ '--port-overlay-alpha': '0.6',
+ '--port-panel-padding-scale': '1.08',
+ '--port-font-ui': "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
+ '--port-font-display': 'var(--port-font-ui)',
+ '--port-font-mono': "'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
+ '--port-shadow-card': 'inset 0 1px 0 0 rgb(255 255 255 / 0.6), 0 10px 30px -12px rgb(8 80 110 / 0.16), 0 2px 6px -2px rgb(8 80 110 / 0.08)',
+ '--port-shadow-elevated': 'inset 0 1px 0 0 rgb(255 255 255 / 0.7), 0 22px 56px -16px rgb(8 80 110 / 0.24), 0 6px 14px -4px rgb(8 80 110 / 0.12)',
+ '--port-shadow-interactive': '0 0 0 1px rgb(var(--port-accent) / 0.3), 0 0 28px rgb(var(--port-accent) / 0.16)',
+ '--port-backdrop-filter': 'blur(22px) saturate(1.4)',
+ '--port-border-style': 'solid',
+ '--port-body-gradient': 'radial-gradient(ellipse at top, rgb(249 233 222) 0%, rgb(245 239 230) 60%), radial-gradient(70vw 70vw at -10vw -20vw, rgb(178 230 238 / 0.7) 0%, transparent 60%), radial-gradient(60vw 60vw at 110vw 115vw, rgb(255 200 210 / 0.55) 0%, transparent 60%)',
+ '--port-body-texture': 'linear-gradient(90deg, rgb(8 80 110 / 0.018) 1px, transparent 1px), linear-gradient(180deg, rgb(8 80 110 / 0.014) 1px, transparent 1px)',
+ '--port-body-size': '28px 28px, 28px 28px, 100% 100%, 100% 100%, 100% 100%',
+ '--port-body-overlay-opacity': '1',
+ '--port-app-backdrop': 'transparent',
+ '--port-sidebar-bg': 'linear-gradient(180deg, rgb(255 255 255 / 0.7), rgb(245 250 252 / 0.6))',
+ '--port-input-bg': 'rgb(255 255 255 / 0.7)',
+ '--port-control-bg': 'rgb(255 255 255 / 0.78)',
+ '--port-control-bg-hover': 'rgb(255 255 255 / 0.94)',
+ '--port-control-border': 'rgb(8 80 110 / 0.16)',
+ '--port-active-bg': 'linear-gradient(135deg, rgb(var(--port-accent) / 0.16), rgb(251 113 133 / 0.1))',
+ '--port-hover-bg': 'rgb(8 80 110 / 0.06)',
+ '--port-terminal-bg': 'rgb(255 255 255 / 0.85)',
+ '--port-terminal-text': 'rgb(36 60 70)',
+ '--port-chart-1': '8 145 178',
+ '--port-chart-2': '22 163 74',
+ '--port-chart-3': '202 138 4',
+ '--port-chart-4': '225 29 72',
+ '--port-chart-grid': '8 80 110',
+ },
+ },
+
'black-ice-terminal': {
id: 'black-ice-terminal',
label: 'Black ICE Terminal',
shortLabel: 'Terminal',
concept: 'A dense cyberpunk terminal interface for agents, logs, orchestration, and system control.',
family: 'terminal',
+ mode: 'night',
accent: '#00f5a0',
doc: '/docs/themes/black-ice-terminal.md',
colorScheme: 'dark',
@@ -230,12 +368,86 @@ export const THEMES = {
},
},
+ 'black-ice-terminal-day': {
+ id: 'black-ice-terminal-day',
+ label: 'Phosphor Paper',
+ shortLabel: 'Terminal',
+ concept: 'Black ICE Terminal printed on cream paper — green ink, pixel grid, line-printer report aesthetic.',
+ family: 'terminal',
+ mode: 'day',
+ accent: '#0a7a4a',
+ colorScheme: 'light',
+ density: 'compact',
+ swatches: ['#f3eddc', '#fbf6e8', '#0a7a4a', '#b91d6a'],
+ colors: {
+ '--port-bg': '243 237 220',
+ '--port-card': '251 246 232',
+ '--port-border': '10 122 74',
+ '--port-accent': '10 122 74',
+ '--port-success': '22 122 60',
+ '--port-warning': '170 110 0',
+ '--port-error': '185 29 106',
+ '--port-on-accent': '255 255 255',
+ '--port-on-success': '255 255 255',
+ '--port-on-warning': '255 255 255',
+ '--port-on-error': '255 255 255',
+ '--port-text': '14 56 36',
+ '--port-text-muted': '76 110 86',
+ '--port-control-text': '20 70 46',
+ '--port-focus-ring': '10 122 74',
+ },
+ tokens: {
+ '--port-motion-fast': '80ms',
+ '--port-motion-medium': '140ms',
+ '--port-motion-slow': '260ms',
+ '--port-radius-sm': '0',
+ '--port-radius-md': '0.125rem',
+ '--port-radius-lg': '0.1875rem',
+ '--port-radius-xl': '0.25rem',
+ '--port-radius-pill': '0.25rem',
+ '--port-bg-alpha': '1',
+ '--port-card-alpha': '0.94',
+ '--port-border-alpha': '0.38',
+ '--port-sidebar-alpha': '0.96',
+ '--port-overlay-alpha': '0.7',
+ '--port-panel-padding-scale': '0.9',
+ '--port-font-ui': "'GeistPixelSquare', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
+ '--port-font-display': "'GeistPixelGrid', 'SFMono-Regular', Consolas, monospace",
+ '--port-font-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
+ '--port-shadow-card': '0 0 0 1px rgb(var(--port-border) / 0.18), 0 4px 14px -6px rgb(40 60 30 / 0.18)',
+ '--port-shadow-elevated': '0 0 0 1px rgb(var(--port-border) / 0.28), 0 12px 36px -10px rgb(40 60 30 / 0.22)',
+ '--port-shadow-interactive': '0 0 0 1px rgb(var(--port-accent) / 0.5)',
+ '--port-backdrop-filter': 'none',
+ '--port-border-style': 'solid',
+ '--port-body-gradient': 'linear-gradient(180deg, rgb(248 242 226) 0%, rgb(243 237 220) 100%)',
+ '--port-body-texture': "linear-gradient(0deg, rgb(10 122 74 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(185 29 106 / 0.035) 1px, transparent 1px), url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0 0.25 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>\")",
+ '--port-body-size': '28px 28px, 28px 28px, 200px 200px, cover',
+ '--port-body-overlay-opacity': '0.9',
+ '--port-app-backdrop': 'transparent',
+ '--port-sidebar-bg': 'rgb(248 242 226 / 0.96)',
+ '--port-input-bg': 'rgb(255 252 240 / 0.85)',
+ '--port-control-bg': 'rgb(248 242 226 / 0.92)',
+ '--port-control-bg-hover': 'rgb(238 230 208 / 0.96)',
+ '--port-control-border': 'rgb(var(--port-border) / 0.38)',
+ '--port-active-bg': 'linear-gradient(90deg, rgb(var(--port-accent) / 0.16), rgb(185 29 106 / 0.08))',
+ '--port-hover-bg': 'rgb(var(--port-accent) / 0.08)',
+ '--port-terminal-bg': 'rgb(248 242 226)',
+ '--port-terminal-text': 'rgb(10 122 74)',
+ '--port-chart-1': '10 122 74',
+ '--port-chart-2': '185 29 106',
+ '--port-chart-3': '170 110 0',
+ '--port-chart-4': '8 100 134',
+ '--port-chart-grid': '10 122 74',
+ },
+ },
+
'blueprint-ops': {
id: 'blueprint-ops',
label: 'Blueprint Ops',
shortLabel: 'Blueprint',
concept: 'A systems-map aesthetic with drafting-grid structure, annotated panels, and calm operational contrast.',
family: 'blueprint',
+ mode: 'night',
accent: '#60a5fa',
doc: '/docs/themes/blueprint-ops.md',
colorScheme: 'dark',
@@ -300,6 +512,77 @@ export const THEMES = {
'--port-chart-grid': '148 163 184',
},
},
+
+ 'blueprint-ops-day': {
+ id: 'blueprint-ops-day',
+ label: 'Drafting Paper',
+ shortLabel: 'Blueprint',
+ concept: 'Blueprint Ops on white drafting paper — pale cyan grid, navy accents, amber annotations.',
+ family: 'blueprint',
+ mode: 'day',
+ accent: '#1d4ed8',
+ colorScheme: 'light',
+ density: 'compact',
+ swatches: ['#f0f4f8', '#ffffff', '#1d4ed8', '#d97706'],
+ colors: {
+ '--port-bg': '240 244 248',
+ '--port-card': '255 255 255',
+ '--port-border': '37 99 235',
+ '--port-accent': '29 78 216',
+ '--port-success': '21 128 61',
+ '--port-warning': '180 83 9',
+ '--port-error': '185 28 28',
+ '--port-on-accent': '255 255 255',
+ '--port-on-success': '255 255 255',
+ '--port-on-warning': '255 255 255',
+ '--port-on-error': '255 255 255',
+ '--port-text': '11 23 50',
+ '--port-text-muted': '71 85 105',
+ '--port-control-text': '23 37 84',
+ '--port-focus-ring': '29 78 216',
+ },
+ tokens: {
+ ...baseMotionTokens,
+ '--port-radius-sm': '0.125rem',
+ '--port-radius-md': '0.25rem',
+ '--port-radius-lg': '0.375rem',
+ '--port-radius-xl': '0.5rem',
+ '--port-radius-pill': '0.375rem',
+ '--port-bg-alpha': '1',
+ '--port-card-alpha': '0.92',
+ '--port-border-alpha': '0.18',
+ '--port-sidebar-alpha': '0.94',
+ '--port-overlay-alpha': '0.72',
+ '--port-panel-padding-scale': '0.96',
+ '--port-font-ui': "'Avenir Next', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
+ '--port-font-display': 'var(--port-font-ui)',
+ '--port-font-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
+ '--port-shadow-card': '0 0 0 1px rgb(var(--port-border) / 0.14), 0 8px 22px -8px rgb(15 23 42 / 0.12)',
+ '--port-shadow-elevated': '0 0 0 1px rgb(var(--port-border) / 0.22), 0 22px 54px -16px rgb(15 23 42 / 0.22)',
+ '--port-shadow-interactive': '0 0 0 1px rgb(var(--port-accent) / 0.45), 0 0 0 4px rgb(var(--port-accent) / 0.1)',
+ '--port-backdrop-filter': 'none',
+ '--port-border-style': 'solid',
+ '--port-body-gradient': 'linear-gradient(180deg, rgb(248 250 252) 0%, rgb(240 244 248) 100%)',
+ '--port-body-texture': 'linear-gradient(rgb(37 99 235 / 0.07) 1px, transparent 1px), linear-gradient(90deg, rgb(37 99 235 / 0.06) 1px, transparent 1px), linear-gradient(rgb(29 78 216 / 0.1) 1px, transparent 1px), linear-gradient(90deg, rgb(29 78 216 / 0.08) 1px, transparent 1px)',
+ '--port-body-size': '20px 20px, 20px 20px, 100px 100px, 100px 100px, cover',
+ '--port-body-overlay-opacity': '0.82',
+ '--port-app-backdrop': 'rgb(var(--port-bg) / 0.94)',
+ '--port-sidebar-bg': 'linear-gradient(180deg, rgb(255 255 255 / 0.94), rgb(248 250 252 / 0.9))',
+ '--port-input-bg': 'rgb(255 255 255 / 0.94)',
+ '--port-control-bg': 'rgb(255 255 255 / 0.94)',
+ '--port-control-bg-hover': 'rgb(241 245 249 / 0.98)',
+ '--port-control-border': 'rgb(var(--port-border) / 0.28)',
+ '--port-active-bg': 'linear-gradient(90deg, rgb(var(--port-accent) / 0.14), rgb(var(--port-warning) / 0.08))',
+ '--port-hover-bg': 'rgb(var(--port-border) / 0.08)',
+ '--port-terminal-bg': 'rgb(248 250 252)',
+ '--port-terminal-text': 'rgb(23 37 84)',
+ '--port-chart-1': '29 78 216',
+ '--port-chart-2': '21 128 61',
+ '--port-chart-3': '180 83 9',
+ '--port-chart-4': '185 28 28',
+ '--port-chart-grid': '148 163 184',
+ },
+ },
};
export const THEME_IDS = Object.keys(THEMES);
@@ -311,6 +594,10 @@ export const LEGACY_THEME_ALIASES = {
ember: 'blueprint-ops',
arctic: 'lumen-glass',
synthwave: 'black-ice-terminal',
+ 'pastel-dawn': 'lumen-glass-day',
+ 'pastel-paper': 'classic-noon',
+ 'pastel-void': 'classic-midnight',
+ 'pastel-submarine': 'lumen-glass',
};
export function normalizeThemeId(id) {
@@ -322,3 +609,19 @@ export function normalizeThemeId(id) {
export function getTheme(id) {
return THEMES[normalizeThemeId(id)];
}
+
+export function getPairedThemeId(id) {
+ const theme = getTheme(id);
+ const opposite = theme.mode === 'day' ? 'night' : 'day';
+ return THEME_LIST.find(t => t.family === theme.family && t.mode === opposite)?.id ?? theme.id;
+}
+
+export function groupThemesByFamily() {
+ const families = new Map();
+ for (const theme of THEME_LIST) {
+ const fam = families.get(theme.family) ?? { family: theme.family };
+ fam[theme.mode] = theme;
+ families.set(theme.family, fam);
+ }
+ return Array.from(families.values());
+}