feat(theme): dark/light mode with a Radix Colors-based palette
Adds a working Dark/Light toggle (next to the language switcher, same row
as EN/VI) and re-themes the whole dashboard, not just the handful of
components that already used semantic tokens.
- Tailwind darkMode:"class" + CSS-variable color tokens (client/src/index.css,
tailwind.config.js): surface.0-5, border/border-light, accent/accent-hover,
fg.primary/secondary/muted, status.success/danger/warning. One class flip
on <html> re-themes everything — no per-element dark: variant pairs.
- useTheme() hook: localStorage-persisted, defaults to dark, no
prefers-color-scheme fallback (client/src/hooks/useTheme.ts).
- Mechanical, table-driven migration (scripts/migrate-color-tokens.mjs,
scripts/tokenize-status-colors.mjs, scripts/darken-status-colors.mjs) of
every raw neutral/gray/slate + emerald/red/amber Tailwind utility across
client/src onto the new tokens, so every badge/button/component pulls the
same shade per status/role instead of each picking its own.
- Palette values are the literal Radix Colors (radix-ui.com/colors) scale
constants — slate/blue/green/red/amber steps 1-12 — adopted after three
rounds of hand-picked values that kept overshooting (flat, then too dark,
then glaring); see docs/superpowers/specs/2026-07-31-color-redesign-
dark-light-mode-design.md for the full history and role mapping.
- PipelineMap: done/current/failed/passed-no-evidence/detected share one
visual language (border + text + translucent wash of the same status
color); `current` alone stays a solid accent fill, the one state that
gets to look bolder ("you are here").
- LaneCard: removed the stage/kind/auto-stage chips that duplicated the
Workspace lane-detail header already showing them.
Categorical/decorative hues (violet, indigo, cyan, teal, sky, rose, pink,
orange, yellow, and blue where it plays a role-coloring part e.g. message
bubbles) are deliberately out of scope — collapsing those onto shared
tokens would erase the distinction between different kinds of thing, not
a status.
This commit is contained in:
@@ -787,7 +787,7 @@ export function OrchestrationDAG({ data, onNodeClick, selectedNode }: Orchestrat
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={1.5}
|
||||
className="w-6 h-6 text-gray-500"
|
||||
className="w-6 h-6 text-fg-muted"
|
||||
>
|
||||
<circle cx="6" cy="12" r="2" />
|
||||
<circle cx="18" cy="6" r="2" />
|
||||
@@ -796,8 +796,10 @@ export function OrchestrationDAG({ data, onNodeClick, selectedNode }: Orchestrat
|
||||
<line x1="8" y1="13" x2="16" y2="17" />
|
||||
</svg>
|
||||
</div>
|
||||
<h3 className="text-base font-medium text-gray-300 mb-2">{t("orchestration.noData")}</h3>
|
||||
<p className="text-sm text-gray-500 max-w-sm">{t("orchestration.noDataDesc")}</p>
|
||||
<h3 className="text-base font-medium text-fg-secondary mb-2">
|
||||
{t("orchestration.noData")}
|
||||
</h3>
|
||||
<p className="text-sm text-fg-muted max-w-sm">{t("orchestration.noDataDesc")}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -831,7 +833,7 @@ export function OrchestrationDAG({ data, onNodeClick, selectedNode }: Orchestrat
|
||||
|
||||
{/* Legend */}
|
||||
<div className="flex flex-wrap items-center gap-x-5 gap-y-2 px-1 mt-4">
|
||||
<span className="text-[10px] text-gray-600 uppercase tracking-widest font-medium mr-1">
|
||||
<span className="text-[10px] text-fg-muted uppercase tracking-widest font-medium mr-1">
|
||||
{t("orchestration.legend")}
|
||||
</span>
|
||||
{LEGEND_ITEMS.map((item) => (
|
||||
@@ -840,7 +842,7 @@ export function OrchestrationDAG({ data, onNodeClick, selectedNode }: Orchestrat
|
||||
className="inline-block w-3 h-3 rounded-sm flex-shrink-0"
|
||||
style={{ background: item.color, border: `1px solid ${item.border}` }}
|
||||
/>
|
||||
<span className="text-[11px] text-gray-500">{item.label}</span>
|
||||
<span className="text-[11px] text-fg-muted">{item.label}</span>
|
||||
</div>
|
||||
))}
|
||||
<div className="flex items-center gap-1.5 ml-2">
|
||||
@@ -848,7 +850,7 @@ export function OrchestrationDAG({ data, onNodeClick, selectedNode }: Orchestrat
|
||||
className="inline-block h-[2px] w-8 rounded flex-shrink-0"
|
||||
style={{ background: "linear-gradient(to right, #312e81, #4f46e5)" }}
|
||||
/>
|
||||
<span className="text-[11px] text-gray-500">{t("orchestration.edgeWeight")}</span>
|
||||
<span className="text-[11px] text-fg-muted">{t("orchestration.edgeWeight")}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -882,12 +884,12 @@ function buildDAGTooltipContent(el: HTMLDivElement, node: DAGNode, t: TFn) {
|
||||
const meta = describeNode(node, t);
|
||||
|
||||
const title = document.createElement("p");
|
||||
title.className = "text-xs font-semibold text-gray-200";
|
||||
title.className = "text-xs font-semibold text-fg-secondary";
|
||||
title.textContent = node.label;
|
||||
el.appendChild(title);
|
||||
|
||||
const subtitle = document.createElement("p");
|
||||
subtitle.className = "text-[10px] uppercase tracking-wider text-gray-600 mt-0.5 mb-2";
|
||||
subtitle.className = "text-[10px] uppercase tracking-wider text-fg-muted mt-0.5 mb-2";
|
||||
subtitle.textContent = meta.layer;
|
||||
el.appendChild(subtitle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user