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

[issue-1909] remap cos/ off-token colors onto port-* semantic tokens

[._.]/ Adam Eivy36a8ba9fd690
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 4dc4e9ca24..99bd1d096f 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -64,6 +64,7 @@
- **[issue-1909] New `--port-accent-2` (purple/violet) semantic token, plus the rest of the recharts cards now follow the active theme** — the remaining 8 chart files without `useChartColors()` (`ActivityBloodCorrelation`, `AlcoholHrvCorrelation`, `BloodPressureCard`, `BodyCompChart`, `NicotineChart`, `NicotineHealthCorrelation`, POST history, sleep stages) are converted, leaving every recharts site in the app theme-aware. Purple/violet/indigo had no `--port-*` equivalent, so AI-recommendation and secondary-emphasis highlights (Epigenetic Tracker's curated recommendations, the Chief of Staff "Learning: good" indicator) stayed a fixed purple regardless of theme; `--port-accent-2` is now defined and tuned per-theme across all 8 PortOS themes. The `cos/tabs/AgentCard.jsx` JIRA ticket badge and link (base + hover) are remapped onto `--port-accent`. This is one bounded, reviewable slice of the ~900-site sweep — the remainder is tracked by feature area in #1924, including a caution against blindly remapping the several category-color enum files (e.g. `GenomeCategoryCard.jsx`, `bucketColors.js`) that use multi-hue palettes to differentiate categories rather than express theme drift. (#1909)
- **[issue-1924] Digital Twin theme consistency** — remapped off-token colors across the Digital Twin UI (overview, identity, enrichment, taste, testing, goals, and the rest of its tabs) onto the existing `--port-*` theme tokens, so status badges, score gradients, and AI-content highlights now follow the active theme instead of staying a fixed hue. Per-platform/per-category color palettes that intentionally differentiate unrelated items (e.g. social-account platform badges, test-category badges) were left as-is. (#1924)
- **[issue-1909] `cos/TerminalCoSPanel.jsx` foreground+background re-themed together** — the panel's background had been intentionally left pinned to a fixed dark hex because the inner content hardcoded light text and status colors, so swapping the background alone onto the (lighter, in day themes) `--port-terminal-bg` token would have rendered light-on-light. The background now uses that token and the inner text uses opacity tiers of the paired `--port-terminal-text` token — blending foreground into background keeps contrast correct whether the active theme's terminal surface is dark or light — while the traffic-light dots, status indicators, log levels, and start/stop buttons move onto the existing `port-success`/`port-warning`/`port-error`/`port-accent` tokens. Refs #1909 — the remainder of the ~900-site sweep stays tracked there.
+- **[issue-1924] Chief of Staff panel theme consistency** — remapped off-token colors across the Chief of Staff dashboard (task list, agent cards, memory/learning/productivity/health/digest tabs, schedule editor, terminal event log) onto the existing `--port-*` theme tokens, so status badges, metric highlights, and AI-content accents now follow the active theme instead of staying a fixed blue/green/cyan/purple. Fixed 7-hue category-color palettes that intentionally differentiate unrelated categories — the per-agent-state mood colors (`AGENT_STATES`), the memory-type badge palette (`MEMORY_TYPE_COLORS`), and the workflow-stage palette (`STAGE_COLORS`) — were deliberately left as raw hues; collapsing them onto the ~4-5 available semantic tokens would make several of those categories render identically. Also documented (not yet fixed) a known contrast gap: the mood-color enum's amber "thinking" state is hard to read against light day themes in the 2 consumers with a theme-aware background; a full per-theme fix is blocked because most consumers feed the color straight into three.js material props, which can't resolve CSS custom properties. Refs #1909, Refs #1924 — remaining feature areas (`meatspace/` remainder, `city/`, `ui/`, `goals/`, `brain/`, `apps/`, `pipeline/`, `messages/`, `agents/`, `writers-room/`, `wiki/`, `settings/`, `gsd/`, `voice/`, and the rest of `client/src/pages/`) stay tracked there.
## UX & Accessibility
diff --git a/client/src/components/cos/DailyTrendsChart.jsx b/client/src/components/cos/DailyTrendsChart.jsx
index 6cbdba6b04..0f0aa9bfb4 100644
--- a/client/src/components/cos/DailyTrendsChart.jsx
+++ b/client/src/components/cos/DailyTrendsChart.jsx
@@ -113,7 +113,7 @@ export default function DailyTrendsChart({ days = 30, initialExpanded = true })
<div className="text-xs text-gray-500">Active Days</div>
</div>
<div className="text-center">
- <div className="text-lg font-bold text-cyan-400">{summary.avgTasksPerActiveDay}</div>
+ <div className="text-lg font-bold text-port-accent">{summary.avgTasksPerActiveDay}</div>
<div className="text-xs text-gray-500">Avg/Day</div>
</div>
<div className="text-center">
diff --git a/client/src/components/cos/EventLog.jsx b/client/src/components/cos/EventLog.jsx
index 4257167b18..a5eaf42a14 100644
--- a/client/src/components/cos/EventLog.jsx
+++ b/client/src/components/cos/EventLog.jsx
@@ -1,8 +1,8 @@
const levelColors = {
- info: 'text-blue-400',
- warn: 'text-yellow-400',
- error: 'text-red-400',
- success: 'text-green-400',
+ info: 'text-port-accent',
+ warn: 'text-port-warning',
+ error: 'text-port-error',
+ success: 'text-port-success',
debug: 'text-gray-500'
};
@@ -20,7 +20,7 @@ export default function EventLog({ logs }) {
return (
<div className="mt-4 w-full min-w-0 flex-1 min-h-0 flex flex-col">
<div className="text-xs text-gray-500 mb-1 font-mono">Event Log</div>
- <div className="bg-slate-900/80 border border-slate-700/50 rounded-lg p-2 flex-1 min-w-0 min-h-[8rem] max-h-[32rem] overflow-y-auto">
+ <div className="bg-port-bg/80 border border-port-border/50 rounded-lg p-2 flex-1 min-w-0 min-h-[8rem] max-h-[32rem] overflow-y-auto">
{logs.slice(-25).reverse().map((log, i) => (
<div key={i} className={`text-xs font-mono py-0.5 break-all ${levelColors[log.level] || 'text-gray-400'}`}>
<span className="mr-1">[{levelIcons[log.level] || '*'}]</span>
diff --git a/client/src/components/cos/MiniCharacterCoSAvatar.jsx b/client/src/components/cos/MiniCharacterCoSAvatar.jsx
index 11b132313a..6e64d213e6 100644
--- a/client/src/components/cos/MiniCharacterCoSAvatar.jsx
+++ b/client/src/components/cos/MiniCharacterCoSAvatar.jsx
@@ -142,13 +142,13 @@ function MissingModelHint({ background = false, bundled = false }) {
<div className="text-3xl mb-2">🧍</div>
{bundled ? (
<>
- <div className="text-xs font-semibold text-slate-200 mb-1">Model not yet seeded</div>
- <div className="text-[10px] text-slate-400 mb-1.5">Run</div>
+ <div className="text-xs font-semibold text-gray-200 mb-1">Model not yet seeded</div>
+ <div className="text-[10px] text-gray-400 mb-1.5">Run</div>
<code className="text-[9px] text-port-accent break-all leading-tight">npm run setup:data</code>
</>
) : (
<>
- <div className="text-xs font-semibold text-slate-200 mb-1">No mini-character model</div>
+ <div className="text-xs font-semibold text-gray-200 mb-1">No mini-character model</div>
<code className="text-[9px] text-port-accent break-all leading-tight">data/avatar/&lt;variant&gt;.glb</code>
</>
)}
@@ -178,7 +178,7 @@ class AvatarErrorBoundary extends Component {
function LoadingPlaceholder({ background = false }) {
return (
<div className={`${background ? 'relative w-full h-full min-h-full' : 'relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]'} flex items-center justify-center`}>
- <div className="text-xs text-slate-500 animate-pulse">loading…</div>
+ <div className="text-xs text-gray-500 animate-pulse">loading…</div>
</div>
);
}
diff --git a/client/src/components/cos/MuseCoSAvatar.jsx b/client/src/components/cos/MuseCoSAvatar.jsx
index bfa2f6380c..dff3fc2573 100644
--- a/client/src/components/cos/MuseCoSAvatar.jsx
+++ b/client/src/components/cos/MuseCoSAvatar.jsx
@@ -151,8 +151,8 @@ function MissingModelHint({ background = false }) {
return (
<div className={`${background ? 'relative w-full h-full min-h-full' : 'relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]'} flex flex-col items-center justify-center rounded-lg border border-port-border bg-port-card/60 text-center p-3`}>
<div className="text-3xl mb-2">🎭</div>
- <div className="text-xs font-semibold text-slate-200 mb-1">No avatar model</div>
- <div className="text-[10px] text-slate-400 mb-1.5">Drop a GLB at</div>
+ <div className="text-xs font-semibold text-gray-200 mb-1">No avatar model</div>
+ <div className="text-[10px] text-gray-400 mb-1.5">Drop a GLB at</div>
<code className="text-[9px] text-port-accent break-all leading-tight">
data/avatar/model.glb
</code>
@@ -163,7 +163,7 @@ function MissingModelHint({ background = false }) {
function LoadingPlaceholder({ background = false }) {
return (
<div className={`${background ? 'relative w-full h-full min-h-full' : 'relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]'} flex items-center justify-center`}>
- <div className="text-xs text-slate-500 animate-pulse">loading…</div>
+ <div className="text-xs text-gray-500 animate-pulse">loading…</div>
</div>
);
}
diff --git a/client/src/components/cos/QuickSummary.jsx b/client/src/components/cos/QuickSummary.jsx
index 462b1ea6c9..a151f4bb60 100644
--- a/client/src/components/cos/QuickSummary.jsx
+++ b/client/src/components/cos/QuickSummary.jsx
@@ -231,9 +231,9 @@ export default function QuickSummary() {
{/* Queue Estimate */}
{queue.estimate?.taskCount > 0 && (
<div className="flex items-center gap-1.5" title={`Based on ${queue.estimate.confidence}% historical data`}>
- <Hourglass size={14} className="text-purple-400" />
+ <Hourglass size={14} className="text-port-accent-2" />
<span className="text-gray-400">ETA:</span>
- <span className="font-medium text-purple-300">
+ <span className="font-medium text-port-accent-2">
{queue.estimate.formatted}
</span>
{queue.estimate.runningCount > 0 && (
diff --git a/client/src/components/cos/StatusBubble.jsx b/client/src/components/cos/StatusBubble.jsx
index ffc17b47ad..fae1087424 100644
--- a/client/src/components/cos/StatusBubble.jsx
+++ b/client/src/components/cos/StatusBubble.jsx
@@ -1,8 +1,8 @@
export default function StatusBubble({ message }) {
return (
- <div className="relative mt-4 px-4 py-3 rounded-2xl max-w-[280px] text-center text-sm leading-relaxed bg-indigo-500/10 border border-indigo-500/30">
+ <div className="relative mt-4 px-4 py-3 rounded-2xl max-w-[280px] text-center text-sm leading-relaxed bg-port-accent-2/10 border border-port-accent-2/30">
<div
- className="absolute -top-2 left-1/2 -translate-x-1/2 rotate-45 w-3.5 h-3.5 bg-indigo-500/10 border-l border-t border-indigo-500/30"
+ className="absolute -top-2 left-1/2 -translate-x-1/2 rotate-45 w-3.5 h-3.5 bg-port-accent-2/10 border-l border-t border-port-accent-2/30"
/>
<div>{message}</div>
</div>
diff --git a/client/src/components/cos/TaskAddForm.jsx b/client/src/components/cos/TaskAddForm.jsx
index 3fd3859916..d988561607 100644
--- a/client/src/components/cos/TaskAddForm.jsx
+++ b/client/src/components/cos/TaskAddForm.jsx
@@ -468,7 +468,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa
className="w-4 h-4 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent focus:ring-offset-0 disabled:opacity-40"
/>
<span className={`flex items-center gap-1.5 text-sm ${useWorktree ? 'text-gray-400' : 'text-gray-600'}`} title="Open a pull request to the default branch. If unchecked with worktree enabled, auto-merges on completion.">
- <GitPullRequest size={14} className={useWorktree ? 'text-blue-400' : 'text-gray-600'} />
+ <GitPullRequest size={14} className={useWorktree ? 'text-port-accent' : 'text-gray-600'} />
Open PR
</span>
</label>
@@ -480,7 +480,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa
className="w-4 h-4 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent focus:ring-offset-0"
/>
<span className="flex items-center gap-1.5 text-sm text-gray-400">
- <Wand2 size={14} className="text-purple-400" />
+ <Wand2 size={14} className="text-port-accent-2" />
Simplify
</span>
</label>
@@ -519,7 +519,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa
className="w-4 h-4 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent focus:ring-offset-0"
/>
<span className="flex items-center gap-1.5 text-sm text-gray-400">
- <Ticket size={14} className="text-blue-400" />
+ <Ticket size={14} className="text-port-accent" />
JIRA ticket
</span>
</label>
diff --git a/client/src/components/cos/constants.js b/client/src/components/cos/constants.js
index 083a5f9da2..6cc59ad05a 100644
--- a/client/src/components/cos/constants.js
+++ b/client/src/components/cos/constants.js
@@ -30,6 +30,27 @@ export const TABS = [
{ id: 'config', label: 'Config', icon: Settings }
];
+// Intentional category-color enum (#1909/#1924 caution), NOT off-token theme
+// inconsistency: 9 files (CoSCharacter, CyberCoSAvatar, EsotericCoSAvatar,
+// MiniCharacterCoSAvatar, MuseCoSAvatar, NexusCoSAvatar, SigilCoSAvatar,
+// StateLabel, TerminalCoSPanel) key their glow/fill/border color off `color`
+// so all 7 agent states stay visually distinguishable at a glance. The app
+// only has ~4-5 semantic tokens (accent/accent-2/success/warning/error) —
+// collapsing 7 states onto them would make at least 2-3 states render
+// identically, destroying the thing this enum exists for. Left as raw hex.
+//
+// Known issue (flagged on #1909 by codex review of PR #1935): `thinking`'s
+// amber (#f59e0b) has poor contrast (~2.1:1) against light day-theme surfaces
+// (e.g. Classic Noon) in the 2 consumers whose background is theme-aware
+// (StateLabel's border, TerminalCoSPanel's ASCII art over --port-terminal-bg);
+// against near-black surfaces (the default theme, and the fixed-dark 3D/SVG
+// canvases the other 7 consumers render on) it's ~9.8:1, so the bug is
+// day-theme-specific. A full per-theme-mode color swap was evaluated and
+// deferred: 6 of the 9 consumers feed this value straight into three.js
+// `<meshStandardMaterial color={...}>` props, which cannot resolve CSS custom
+// properties (`var(--port-mood-thinking)`) — parity would need a resolved-hex
+// lookup (via `getComputedStyle`) threaded through every 3D avatar, not just a
+// CSS variable swap. See PLAN.md for the scoped follow-up.
export const AGENT_STATES = {
sleeping: { label: 'Sleeping', color: '#6366f1', icon: '💤' },
thinking: { label: 'Thinking', color: '#f59e0b', icon: '🧠' },
@@ -199,6 +220,11 @@ export function toggleAppMetadataOverride(overrideMetadata, globalMetadata, fiel
export const MEMORY_TYPES = ['fact', 'learning', 'observation', 'decision', 'preference', 'context'];
+// Intentional category-color enum (#1909/#1924 caution): a fixed 6-hue palette
+// so each memory type reads as a distinct badge at a glance (fact vs learning
+// vs observation etc.). Left as raw Tailwind hues rather than port-* tokens —
+// the app only has ~4-5 semantic tokens (accent/accent-2/success/warning/error),
+// which isn't enough to keep 6 categories visually distinct without collisions.
export const MEMORY_TYPE_COLORS = {
fact: 'bg-blue-500/20 text-blue-400 border-blue-500/30',
learning: 'bg-green-500/20 text-green-400 border-green-500/30',
diff --git a/client/src/components/cos/tabs/BriefingTab.jsx b/client/src/components/cos/tabs/BriefingTab.jsx
index dab3e3ed79..092caad37f 100644
--- a/client/src/components/cos/tabs/BriefingTab.jsx
+++ b/client/src/components/cos/tabs/BriefingTab.jsx
@@ -144,7 +144,7 @@ const renderInlineFormatting = (text) => {
const codeParts = part.split(/(`[^`]+`)/g);
return codeParts.map((cp, j) => {
if (cp.startsWith('`') && cp.endsWith('`')) {
- return <code key={`${i}-${j}`} className="text-xs bg-port-bg px-1 py-0.5 rounded text-cyan-400 font-mono">{cp.slice(1, -1)}</code>;
+ return <code key={`${i}-${j}`} className="text-xs bg-port-bg px-1 py-0.5 rounded text-port-accent font-mono">{cp.slice(1, -1)}</code>;
}
return cp;
});
diff --git a/client/src/components/cos/tabs/ConfigTab.jsx b/client/src/components/cos/tabs/ConfigTab.jsx
index 8466088b85..4299e471a1 100644
--- a/client/src/components/cos/tabs/ConfigTab.jsx
+++ b/client/src/components/cos/tabs/ConfigTab.jsx
@@ -10,12 +10,12 @@ import useProviderModels from '../../../hooks/useProviderModels';
// Color classes for autonomy level buttons
const LEVEL_COLORS = {
green: {
- base: 'border-green-500/40 bg-green-500/5 text-green-600 hover:bg-green-500/10',
- active: 'ring-2 ring-green-600 border-green-600 bg-green-500 text-white shadow-sm'
+ base: 'border-port-success/40 bg-port-success/5 text-port-success hover:bg-port-success/10',
+ active: 'ring-2 ring-port-success border-port-success bg-port-success text-white shadow-sm'
},
blue: {
- base: 'border-blue-500/30 bg-blue-500/10 text-blue-400 hover:bg-blue-500/20',
- active: 'ring-2 ring-blue-600 border-blue-600 bg-blue-500 text-white shadow-sm'
+ base: 'border-port-accent/30 bg-port-accent/10 text-port-accent hover:bg-port-accent/20',
+ active: 'ring-2 ring-port-accent border-port-accent bg-port-accent text-white shadow-sm'
},
yellow: {
base: 'border-yellow-500/30 bg-yellow-500/10 text-yellow-400 hover:bg-yellow-500/20',
@@ -140,8 +140,8 @@ const DOMAIN_MODE_COLORS = {
active: 'ring-2 ring-yellow-500 border-yellow-500 bg-yellow-400 text-yellow-950'
},
execute: {
- base: 'border-green-500/30 bg-green-500/10 text-green-500 hover:bg-green-500/20',
- active: 'ring-2 ring-green-600 border-green-600 bg-green-500 text-white'
+ base: 'border-port-success/30 bg-port-success/10 text-port-success hover:bg-port-success/20',
+ active: 'ring-2 ring-port-success border-port-success bg-port-success text-white'
}
};
diff --git a/client/src/components/cos/tabs/DigestTab.jsx b/client/src/components/cos/tabs/DigestTab.jsx
index 734d3358e1..4f37ec4fd1 100644
--- a/client/src/components/cos/tabs/DigestTab.jsx
+++ b/client/src/components/cos/tabs/DigestTab.jsx
@@ -148,7 +148,7 @@ export default function DigestTab() {
<div className="bg-port-card border border-port-border rounded-lg p-4">
<div className="flex items-center justify-between mb-3">
<h4 className="text-sm font-medium text-gray-400 flex items-center gap-2">
- <BarChart2 size={14} className="text-cyan-400" />
+ <BarChart2 size={14} className="text-port-accent" />
Live Week Progress
</h4>
<span className="text-xs text-gray-500">
@@ -171,11 +171,11 @@ export default function DigestTab() {
<div className="text-xs text-gray-500">Success Rate</div>
</div>
<div className="text-center">
- <div className="text-2xl font-bold text-cyan-400">{weekProgress.current.totalWorkTime}</div>
+ <div className="text-2xl font-bold text-port-accent">{weekProgress.current.totalWorkTime}</div>
<div className="text-xs text-gray-500">Work Time</div>
</div>
<div className="text-center">
- <div className="text-2xl font-bold text-purple-400">{weekProgress.projected.tasks}</div>
+ <div className="text-2xl font-bold text-port-accent-2">{weekProgress.projected.tasks}</div>
<div className="text-xs text-gray-500">Projected Total</div>
</div>
</div>
@@ -235,10 +235,10 @@ export default function DigestTab() {
<div className="bg-port-card border border-port-border rounded-lg p-4">
<div className="flex items-center gap-2 mb-1">
- <Clock size={14} className="text-cyan-400" />
+ <Clock size={14} className="text-port-accent" />
<span className="text-xs text-gray-500">Work Time</span>
</div>
- <div className="text-2xl font-bold text-cyan-400">{currentDigest.summary.totalWorkTime}</div>
+ <div className="text-2xl font-bold text-port-accent">{currentDigest.summary.totalWorkTime}</div>
{currentDigest.weekOverWeek?.workTimeChange !== null && (
<div className="mt-2 text-xs">
{formatChange(currentDigest.weekOverWeek.workTimeChange)}
@@ -329,7 +329,7 @@ export default function DigestTab() {
className="flex items-center gap-2 w-full text-left mb-3"
>
{expandedSections.byTaskType ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
- <BarChart2 size={16} className="text-purple-400" />
+ <BarChart2 size={16} className="text-port-accent-2" />
<span className="font-medium text-white">By Task Type</span>
<span className="text-xs text-gray-500">({currentDigest.byTaskType.length} types)</span>
</button>
diff --git a/client/src/components/cos/tabs/HealthTab.jsx b/client/src/components/cos/tabs/HealthTab.jsx
index ae3083452b..3e10ca885a 100644
--- a/client/src/components/cos/tabs/HealthTab.jsx
+++ b/client/src/components/cos/tabs/HealthTab.jsx
@@ -95,10 +95,10 @@ export default function HealthTab({ health, onCheck }) {
<div className="bg-port-bg/50 rounded-lg p-3">
<div className="flex items-center gap-2 mb-1">
- <Clock size={12} className="text-cyan-400" />
+ <Clock size={12} className="text-port-accent" />
<span className="text-xs text-gray-500">Time Worked</span>
</div>
- <div className="text-xl font-bold text-cyan-400">{todayActivity.time.combined}</div>
+ <div className="text-xl font-bold text-port-accent">{todayActivity.time.combined}</div>
<div className="text-xs text-gray-500">
{todayActivity.stats.running > 0 && `${todayActivity.stats.running} active`}
</div>
@@ -214,7 +214,7 @@ export default function HealthTab({ health, onCheck }) {
<div className="bg-port-card border border-port-border rounded-xl p-4">
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2">
- <Brain size={12} className="text-purple-400" />
+ <Brain size={12} className="text-port-accent-2" />
<h3 className="text-sm font-semibold text-white">Task Learning</h3>
</div>
<div className="flex gap-2">
@@ -222,7 +222,7 @@ export default function HealthTab({ health, onCheck }) {
<button
onClick={handleBackfill}
disabled={backfilling}
- className="flex items-center gap-1.5 px-2.5 py-1 text-xs bg-purple-500/20 hover:bg-purple-500/30 text-purple-400 rounded-lg transition-colors disabled:opacity-50"
+ className="flex items-center gap-1.5 px-2.5 py-1 text-xs bg-port-accent-2/20 hover:bg-port-accent-2/30 text-port-accent-2 rounded-lg transition-colors disabled:opacity-50"
>
<Database size={12} />
{backfilling ? 'Backfilling...' : 'Backfill History'}
@@ -253,7 +253,7 @@ export default function HealthTab({ health, onCheck }) {
<div className="text-xs text-gray-500">Success Rate</div>
</div>
<div className="bg-port-bg/50 rounded-lg p-3">
- <div className="text-xl font-bold text-cyan-400">{learning.totals?.avgDurationMin || 0}m</div>
+ <div className="text-xl font-bold text-port-accent">{learning.totals?.avgDurationMin || 0}m</div>
<div className="text-xs text-gray-500">Avg Duration</div>
</div>
<div className="bg-port-bg/50 rounded-lg p-3">
@@ -272,14 +272,14 @@ export default function HealthTab({ health, onCheck }) {
{learning.insights?.bestPerforming?.length > 0 && (
<div className="bg-port-card border border-port-border rounded-xl p-4">
<h4 className="text-sm font-medium text-gray-400 mb-3 flex items-center gap-2">
- <TrendingUp size={12} className="text-green-400" />
+ <TrendingUp size={12} className="text-port-success" />
Best Performing
</h4>
<div className="space-y-2">
{learning.insights.bestPerforming.map((item, idx) => (
<div key={idx} className="flex items-center justify-between text-sm">
<span className="text-gray-300 truncate">{item.type}</span>
- <span className="text-green-400 font-mono">{item.successRate}%</span>
+ <span className="text-port-success font-mono">{item.successRate}%</span>
</div>
))}
</div>
@@ -294,7 +294,7 @@ export default function HealthTab({ health, onCheck }) {
<div key={idx} className="flex items-center justify-between text-sm p-2 bg-port-bg/50 rounded">
<span className="text-gray-300 capitalize">{model.tier}</span>
<div className="flex items-center gap-2">
- <span className={`font-mono ${model.successRate >= 80 ? 'text-green-400' : model.successRate >= 60 ? 'text-yellow-400' : 'text-red-400'}`}>
+ <span className={`font-mono ${model.successRate >= 80 ? 'text-port-success' : model.successRate >= 60 ? 'text-yellow-400' : 'text-red-400'}`}>
{model.successRate}%
</span>
<span className="text-gray-500 text-xs">({model.completed})</span>
@@ -352,8 +352,8 @@ export default function HealthTab({ health, onCheck }) {
className={`text-sm p-2.5 rounded-lg border ${
rec.type === 'warning' ? 'bg-yellow-500/10 border-yellow-500/30 text-yellow-400' :
rec.type === 'action' ? 'bg-red-500/10 border-red-500/30 text-red-400' :
- rec.type === 'optimization' ? 'bg-green-500/10 border-green-500/30 text-green-400' :
- rec.type === 'suggestion' ? 'bg-blue-500/10 border-blue-500/30 text-blue-400' :
+ rec.type === 'optimization' ? 'bg-port-success/10 border-port-success/30 text-port-success' :
+ rec.type === 'suggestion' ? 'bg-port-accent/10 border-port-accent/30 text-port-accent' :
'bg-gray-500/10 border-gray-500/30 text-gray-400'
}`}
>
diff --git a/client/src/components/cos/tabs/JobsTab.jsx b/client/src/components/cos/tabs/JobsTab.jsx
index dfacf5c9d5..d05d53c835 100644
--- a/client/src/components/cos/tabs/JobsTab.jsx
+++ b/client/src/components/cos/tabs/JobsTab.jsx
@@ -348,7 +348,7 @@ function JobCard({ job, apps, providers, onToggle, onTrigger, onDelete, onUpdate
)}
<span className={`px-1.5 py-0.5 text-xs rounded ${
isShell ? 'bg-emerald-500/20 text-emerald-400' :
- isScript ? 'bg-purple-500/20 text-purple-400' :
+ isScript ? 'bg-port-accent-2/20 text-port-accent-2' :
'bg-port-bg text-gray-400'
}`}>
{getJobTypeLabel(job)}
diff --git a/client/src/components/cos/tabs/LearningTab.jsx b/client/src/components/cos/tabs/LearningTab.jsx
index 17b90763f9..1e65ac7902 100644
--- a/client/src/components/cos/tabs/LearningTab.jsx
+++ b/client/src/components/cos/tabs/LearningTab.jsx
@@ -162,7 +162,7 @@ export default function LearningTab() {
{/* Header */}
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
<div className="flex items-center gap-3">
- <Brain className="w-5 h-5 text-purple-400" />
+ <Brain className="w-5 h-5 text-port-accent-2" />
<h3 className="text-lg font-semibold text-white">Learning Analytics</h3>
</div>
<div className="flex gap-2">
@@ -170,7 +170,7 @@ export default function LearningTab() {
<button
onClick={handleBackfill}
disabled={backfilling}
- className="flex items-center gap-2 px-3 py-1.5 text-sm bg-purple-500/20 hover:bg-purple-500/30 text-purple-400 rounded-lg transition-colors disabled:opacity-50"
+ className="flex items-center gap-2 px-3 py-1.5 text-sm bg-port-accent-2/20 hover:bg-port-accent-2/30 text-port-accent-2 rounded-lg transition-colors disabled:opacity-50"
>
<Database size={14} />
{backfilling ? 'Backfilling...' : 'Backfill History'}
@@ -232,10 +232,10 @@ export default function LearningTab() {
<div className="bg-port-card border border-port-border rounded-lg p-4">
<div className="flex items-center gap-2 mb-1">
- <Clock size={14} className="text-cyan-400" />
+ <Clock size={14} className="text-port-accent" />
<span className="text-xs text-gray-500">Avg Duration</span>
</div>
- <div className="text-2xl font-bold text-cyan-400">{learning.totals.avgDurationMin}m</div>
+ <div className="text-2xl font-bold text-port-accent">{learning.totals.avgDurationMin}m</div>
<div className="text-xs text-gray-500">per task</div>
</div>
@@ -253,7 +253,7 @@ export default function LearningTab() {
{/* Recommendations */}
{(learning.recommendations?.length > 0 || dismissed.length > 0) && (
- <div className="bg-gradient-to-r from-purple-500/10 to-blue-500/10 border border-purple-500/30 rounded-lg p-4">
+ <div className="bg-gradient-to-r from-port-accent-2/10 to-port-accent/10 border border-port-accent-2/30 rounded-lg p-4">
<div className="flex items-center justify-between mb-3">
<h4 className="text-sm font-medium text-white flex items-center gap-2">
<Zap size={14} className="text-yellow-400" />
@@ -278,8 +278,8 @@ export default function LearningTab() {
className={`text-sm p-2 rounded flex items-start gap-2 ${
rec.type === 'warning' ? 'bg-yellow-500/10 text-yellow-400' :
rec.type === 'action' ? 'bg-red-500/10 text-red-400' :
- rec.type === 'optimization' ? 'bg-green-500/10 text-green-400' :
- rec.type === 'suggestion' ? 'bg-blue-500/10 text-blue-400' :
+ rec.type === 'optimization' ? 'bg-port-success/10 text-port-success' :
+ rec.type === 'suggestion' ? 'bg-port-accent/10 text-port-accent' :
'bg-gray-500/10 text-gray-400'
}`}
>
@@ -582,7 +582,7 @@ export default function LearningTab() {
className="flex items-center gap-2 w-full text-left mb-3"
>
{expandedSections.durations ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
- <Timer size={16} className="text-cyan-400" />
+ <Timer size={16} className="text-port-accent" />
<span className="font-medium text-white">Duration Estimates</span>
<span className="text-xs text-gray-500">
({Object.keys(durations).length - 1} task types)
@@ -607,7 +607,7 @@ export default function LearningTab() {
<td className="p-3 text-right text-gray-500 font-mono">
{data.avgDurationMs ? formatDurationMin(Math.round(data.avgDurationMs / 60000)) || '—' : '—'}
</td>
- <td className="p-3 text-right text-cyan-400 font-mono" title="P80 estimate used for progress bars and ETAs">
+ <td className="p-3 text-right text-port-accent font-mono" title="P80 estimate used for progress bars and ETAs">
{(data.p80DurationMs || data.avgDurationMs) ? formatDurationMin(Math.round((data.p80DurationMs || data.avgDurationMs) / 60000)) || '—' : '—'}
</td>
<td className="p-3 text-right text-gray-500 hidden sm:table-cell">
diff --git a/client/src/components/cos/tabs/MemoryGraph.jsx b/client/src/components/cos/tabs/MemoryGraph.jsx
index 4d10d73eeb..11ed1b2e81 100644
--- a/client/src/components/cos/tabs/MemoryGraph.jsx
+++ b/client/src/components/cos/tabs/MemoryGraph.jsx
@@ -248,7 +248,7 @@ export default function MemoryGraph() {
))}
<div className="border-t border-port-border pt-1.5 mt-1.5 space-y-1">
<div className="flex items-center gap-2">
- <span className="inline-block w-4 h-0 border-t border-blue-400" />
+ <span className="inline-block w-4 h-0 border-t border-port-accent" />
<span className="text-gray-500">linked</span>
</div>
<div className="flex items-center gap-2">
diff --git a/client/src/components/cos/tabs/MemoryTab.jsx b/client/src/components/cos/tabs/MemoryTab.jsx
index 4b80e71724..0bade1ba9f 100644
--- a/client/src/components/cos/tabs/MemoryTab.jsx
+++ b/client/src/components/cos/tabs/MemoryTab.jsx
@@ -306,7 +306,7 @@ export default function MemoryTab({ apps = [] }) {
<button
onClick={() => handleApprove(memory.id)}
disabled={!!actionInFlight}
- className="flex-1 sm:flex-none p-3 min-h-[44px] min-w-[44px] flex items-center justify-center bg-green-500/20 text-green-400 hover:bg-green-500/30 active:bg-green-500/40 rounded-lg transition-colors disabled:opacity-50"
+ className="flex-1 sm:flex-none p-3 min-h-[44px] min-w-[44px] flex items-center justify-center bg-port-success/20 text-port-success hover:bg-port-success/30 active:bg-port-success/40 rounded-lg transition-colors disabled:opacity-50"
title="Approve"
aria-label="Approve memory"
>
@@ -402,7 +402,7 @@ export default function MemoryTab({ apps = [] }) {
</span>
<span className="text-xs text-gray-500">{memory.category}</span>
{memory.sourceAppId === 'brain' ? (
- <span className="flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-purple-500/10 text-purple-400 border border-purple-500/30">
+ <span className="flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-port-accent-2/10 text-port-accent-2 border border-port-accent-2/30">
<Brain size={10} /> Brain
</span>
) : (
diff --git a/client/src/components/cos/tabs/ProductivityTab.jsx b/client/src/components/cos/tabs/ProductivityTab.jsx
index 649ee0a91a..b884c7e9e6 100644
--- a/client/src/components/cos/tabs/ProductivityTab.jsx
+++ b/client/src/components/cos/tabs/ProductivityTab.jsx
@@ -183,10 +183,10 @@ export default function ProductivityTab() {
{/* Weekly Streak */}
<div className="bg-port-card border border-port-border rounded-lg p-4">
<div className="flex items-center gap-2 mb-1">
- <Calendar size={14} className="text-cyan-400" />
+ <Calendar size={14} className="text-port-accent" />
<span className="text-xs text-gray-400">Weekly Streak</span>
</div>
- <div className="text-3xl font-bold text-cyan-400">
+ <div className="text-3xl font-bold text-port-accent">
{data.streaks?.currentWeekly || 0}
</div>
<div className="text-xs text-gray-500">weeks</div>
@@ -230,14 +230,14 @@ export default function ProductivityTab() {
className={`border rounded-lg p-3 ${
insight.type === 'success' ? 'bg-port-success/10 border-port-success/30' :
insight.type === 'warning' ? 'bg-port-warning/10 border-port-warning/30' :
- insight.type === 'optimization' ? 'bg-green-500/10 border-green-500/30' :
+ insight.type === 'optimization' ? 'bg-port-success/10 border-port-success/30' :
'bg-port-accent/10 border-port-accent/30'
}`}
>
<div className="flex items-start gap-2">
{insight.type === 'success' && <CheckCircle size={14} className="text-port-success mt-0.5" />}
{insight.type === 'warning' && <AlertTriangle size={14} className="text-port-warning mt-0.5" />}
- {insight.type === 'optimization' && <TrendingUp size={14} className="text-green-400 mt-0.5" />}
+ {insight.type === 'optimization' && <TrendingUp size={14} className="text-port-success mt-0.5" />}
{insight.type === 'info' && <Target size={14} className="text-port-accent mt-0.5" />}
<div>
<div className="font-medium text-sm text-white">{insight.title}</div>
@@ -258,7 +258,7 @@ export default function ProductivityTab() {
className="flex items-center gap-2 w-full text-left mb-3"
>
{expandedSections.patterns ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
- <BarChart2 size={16} className="text-purple-400" />
+ <BarChart2 size={16} className="text-port-accent-2" />
<span className="font-medium text-white">Work Patterns</span>
</button>
{expandedSections.patterns && (
@@ -266,7 +266,7 @@ export default function ProductivityTab() {
{/* Best Hours */}
<div className="bg-port-card border border-port-border rounded-lg p-4">
<h4 className="text-sm font-medium text-gray-400 mb-3 flex items-center gap-2">
- <Clock size={14} className="text-cyan-400" />
+ <Clock size={14} className="text-port-accent" />
Hourly Performance
</h4>
{sortedHourlyPatterns.length > 0 ? (
@@ -299,7 +299,7 @@ export default function ProductivityTab() {
{/* Best Days */}
<div className="bg-port-card border border-port-border rounded-lg p-4">
<h4 className="text-sm font-medium text-gray-400 mb-3 flex items-center gap-2">
- <Calendar size={14} className="text-purple-400" />
+ <Calendar size={14} className="text-port-accent-2" />
Daily Performance
</h4>
{sortedDailyPatterns.length > 0 ? (
@@ -331,7 +331,7 @@ export default function ProductivityTab() {
{/* Best Hour/Day Highlight */}
{(data.bestHour || data.bestDay) && (
- <div className="lg:col-span-2 bg-gradient-to-r from-purple-500/10 to-cyan-500/10 border border-purple-500/30 rounded-lg p-4">
+ <div className="lg:col-span-2 bg-gradient-to-r from-port-accent-2/10 to-port-accent/10 border border-port-accent-2/30 rounded-lg p-4">
<h4 className="text-sm font-medium text-white mb-3 flex items-center gap-2">
<Award size={14} className="text-yellow-400" />
Optimal Work Times
@@ -340,7 +340,7 @@ export default function ProductivityTab() {
{data.bestHour && (
<div>
<div className="text-xs text-gray-500">Best Hour</div>
- <div className="text-lg font-semibold text-cyan-400">
+ <div className="text-lg font-semibold text-port-accent">
{formatHour(data.bestHour.hour)}
</div>
<div className="text-xs text-gray-400">
@@ -351,7 +351,7 @@ export default function ProductivityTab() {
{data.bestDay && (
<div>
<div className="text-xs text-gray-500">Best Day</div>
- <div className="text-lg font-semibold text-purple-400">
+ <div className="text-lg font-semibold text-port-accent-2">
{FULL_DAY_NAMES[data.bestDay.day]}
</div>
<div className="text-xs text-gray-400">
diff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsx
index 9e5d5f6cd2..2bce81e2a6 100644
--- a/client/src/components/cos/tabs/TaskItem.jsx
+++ b/client/src/components/cos/tabs/TaskItem.jsx
@@ -242,7 +242,7 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,
<div className="flex items-center gap-2 mb-1 flex-wrap">
<span className="text-sm font-mono text-gray-500">{task.id}</span>
{task.metadata?.app && apps?.find(a => a.id === task.metadata.app)?.name && (
- <span className="px-1.5 py-0.5 text-xs bg-cyan-500/20 text-cyan-400 rounded shrink-0" title={task.metadata.app}>
+ <span className="px-1.5 py-0.5 text-xs bg-port-accent/20 text-port-accent rounded shrink-0" title={task.metadata.app}>
{apps.find(a => a.id === task.metadata.app).name}
</span>
)}
@@ -347,12 +347,12 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,
{(task.metadata?.model || task.metadata?.provider) && (
<div className="flex items-center gap-2 mt-1">
{task.metadata?.model && (
- <span className="px-1.5 py-0.5 text-xs bg-purple-500/20 text-purple-400 rounded font-mono">
+ <span className="px-1.5 py-0.5 text-xs bg-port-accent-2/20 text-port-accent-2 rounded font-mono">
{task.metadata.model}
</span>
)}
{task.metadata?.provider && (
- <span className="px-1.5 py-0.5 text-xs bg-cyan-500/20 text-cyan-400 rounded">
+ <span className="px-1.5 py-0.5 text-xs bg-port-accent/20 text-port-accent rounded">
{task.metadata.provider}
</span>
)}
diff --git a/client/src/components/cos/tabs/WorkflowTab.jsx b/client/src/components/cos/tabs/WorkflowTab.jsx
index 3e4423966a..aeb2cff406 100644
--- a/client/src/components/cos/tabs/WorkflowTab.jsx
+++ b/client/src/components/cos/tabs/WorkflowTab.jsx
@@ -4,7 +4,11 @@ import * as api from '../../../services/api';
import { timeAgo } from '../../../utils/formatters';
import { describeCron } from '../../../utils/cronHelpers';
-// Stage palette — matches port-* tokens used elsewhere.
+// Intentional category-color enum (#1909/#1924 caution), left as raw Tailwind
+// hues on purpose: 7 mutually-exclusive workflow stages need to stay visually
+// distinct in the graph view, and the app's ~4-5 semantic tokens
+// (accent/accent-2/success/warning/error) aren't enough to differentiate all 7
+// without at least two stages rendering identically.
// Keys are stage ids from the server's WORKFLOW_STAGES; ordering is server-driven (graph.stages).
const STAGE_COLORS = {
hygiene: { ring: 'border-cyan-500/40', bg: 'bg-cyan-500/5', text: 'text-cyan-300', dot: 'bg-cyan-500' },
diff --git a/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx b/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx
index b47954f24b..c3ed10e2f6 100644
--- a/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx
+++ b/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx
@@ -37,7 +37,7 @@ export default function PipelineStageConfig({ taskType, config, providers, onUpd
return (
<div key={i} className="bg-port-card border border-port-border rounded-lg p-3">
<div className="flex items-center gap-2 mb-3">
- <span className="text-xs font-medium text-purple-400">Stage {i + 1}</span>
+ <span className="text-xs font-medium text-port-accent-2">Stage {i + 1}</span>
{stage.readOnly && (
<span className="text-[10px] px-1 py-0.5 bg-gray-600/30 text-gray-400 rounded">read-only</span>
)}
diff --git a/client/src/components/cos/tabs/schedule/PromptEditor.jsx b/client/src/components/cos/tabs/schedule/PromptEditor.jsx
index 48b9aa2529..3182ddbcc5 100644
--- a/client/src/components/cos/tabs/schedule/PromptEditor.jsx
+++ b/client/src/components/cos/tabs/schedule/PromptEditor.jsx
@@ -67,7 +67,7 @@ export default function PromptEditor({ config, promptValue, setPromptValue, edit
onClick={() => setActiveTab(i)}
className={`flex-1 px-3 py-2 text-xs font-medium transition-colors ${
activeTab === i
- ? 'text-purple-400 bg-purple-500/10 border-b-2 border-purple-400'
+ ? 'text-port-accent bg-port-accent/10 border-b-2 border-port-accent'
: 'text-gray-400 hover:text-gray-300 hover:bg-port-border/30'
}`}
>
diff --git a/client/src/components/cos/tabs/schedule/scheduleConstants.js b/client/src/components/cos/tabs/schedule/scheduleConstants.js
index 9d023195e1..2ea7c4e686 100644
--- a/client/src/components/cos/tabs/schedule/scheduleConstants.js
+++ b/client/src/components/cos/tabs/schedule/scheduleConstants.js
@@ -23,9 +23,15 @@ export const INTERVAL_DESCRIPTIONS = {
perpetual: 'Drains actionable work back-to-back until none remains, then rechecks on a cadence'
};
+// `cyan` is kept as a raw Tailwind hue (not a port-* token) on purpose: this is
+// a fixed 7-tone badge palette differentiating mutually-exclusive interval
+// variants (INTERVAL_BADGE_VARIANT below); every other tone here already maps
+// onto a port-* token ('accent' covers the blue/info role), so collapsing
+// cyan onto 'accent' too would make 'cron' badges visually indistinguishable
+// from 'daily' badges. See the #1909/#1924 category-color-enum caution.
const BADGE_COLORS = {
accent: 'bg-port-accent/15 text-port-accent border-port-accent/30',
- purple: 'bg-purple-500/15 text-purple-400 border-purple-500/30',
+ purple: 'bg-port-accent-2/15 text-port-accent-2 border-port-accent-2/30',
warning: 'bg-port-warning/15 text-port-warning border-port-warning/30',
gray: 'bg-gray-600/30 text-gray-400 border-gray-500/30',
cyan: 'bg-cyan-500/15 text-cyan-400 border-cyan-500/30',