From 8ea40260ad51e24603411aa1e7527e9c7643249a Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Thu, 24 Sep 2026 09:50:44 +0700 Subject: [PATCH] feat(ui): terminal, charts and low-contrast text follow the selected theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The lane terminal (xterm) takes its palette from the selected DARK theme — it stays dark in light mode, as a terminal should — and repaints live when the theme changes (`client/src/lib/terminalTheme.ts`). - Charts on the Dashboard and Workflows pages draw their grid, axes, labels and tooltips from theme tokens instead of hardcoded near-black/white, and the activity heatmap ramps from the page surface to the accent, so it reads on every theme instead of going near-black on light ones. - Status/brand text that only worked on dark backgrounds (`text-*-300/400`) gets a darker light-mode shade (`text-*-700 dark:text-*-300`) across sessions, conversations, workflows, config and settings. Categorical chart colours are kept. --- CLAUDE.md | 2 +- client/src/components/AgentCard.tsx | 4 +- client/src/components/EventDetail.tsx | 2 +- client/src/components/ImportHistory.tsx | 8 +- client/src/components/SessionOverview.tsx | 24 +- client/src/components/StatusBadge.tsx | 2 +- client/src/components/config/ScopeBadge.tsx | 4 +- .../conversation/MarkdownContent.tsx | 9 +- .../components/conversation/MessageList.tsx | 30 +- .../components/conversation/ToolCallBlock.tsx | 6 +- .../src/components/conversation/toolStyle.ts | 60 +- .../src/components/event-views/primitives.tsx | 8 +- .../components/lanes/FolderBrowseModal.tsx | 2 +- client/src/components/run/RunHistory.tsx | 4 +- client/src/components/run/RunSetup.tsx | 2 +- client/src/components/run/TerminalView.tsx | 30 +- .../run/__tests__/TerminalView.test.tsx | 34 +- .../components/workflows/CompactionImpact.tsx | 18 +- .../workflows/ErrorPropagationMap.tsx | 4 +- .../components/workflows/OrchestrationDAG.tsx | 6 +- .../workflows/SessionComplexityScatter.tsx | 18 +- .../components/workflows/SessionDrillIn.tsx | 12 +- .../workflows/WorkflowRunsPanel.tsx | 18 +- .../components/workflows/WorkflowStats.tsx | 8 +- .../src/lib/__tests__/terminalTheme.test.ts | 71 ++ client/src/lib/terminalTheme.ts | 94 ++ client/src/lib/types.ts | 18 +- client/src/pages/ActivityFeed.tsx | 4 +- client/src/pages/CcConfig.tsx | 28 +- client/src/pages/Dashboard.tsx | 96 +- client/src/pages/SessionDetail.tsx | 30 +- client/src/pages/Sessions.tsx | 2 +- client/src/pages/Settings.tsx | 32 +- client/src/pages/Workflows.tsx | 2 +- .../pages/__tests__/Dashboard.heatmap.test.ts | 30 + .../screens.snapshot.test.tsx.snap | 832 +++++++++--------- 36 files changed, 919 insertions(+), 635 deletions(-) create mode 100644 client/src/lib/__tests__/terminalTheme.test.ts create mode 100644 client/src/lib/terminalTheme.ts create mode 100644 client/src/pages/__tests__/Dashboard.heatmap.test.ts diff --git a/CLAUDE.md b/CLAUDE.md index 0d95eb96..c83ee206 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # Claude Code Working Guide -_Last synced: v1.8.3 (2026-09-23) + `GET /api/settings/info` reporting `server.memory.heapLimit` (V8's `heap_size_limit`), which the Dashboard's V8 Heap bar and Health Score now divide by instead of `heapTotal` + every `claude plugin install|update -y` (`cc-plugin-cli.js`, `skill-plugins.js`, both detached update helpers, `/agenthub-update`) retrying WITHOUT `-y` when an older Claude Code answers `unknown option '-y'` + the Add-lane modal asking `POST /api/lanes/ensure` with `exact: true` (#42) — without it a directory NESTED inside an existing lane resolves to that parent lane with `created: false`, so the modal closed on the parent and no new card ever appeared; `exact` counts only a lane on that very directory, and a `created: false` answer now names the lane that owns the folder instead of closing. The CLI, the run console and Sagi keep the parent lookup + Settings → **Appearance** (`client/src/components/settings/AppearanceSettings.tsx`: mode Dark/Light/**System** — `prefers-color-scheme`, followed live — plus one NAMED theme remembered per mode: dark Default/Darcula/Apple Dark, light Default/Apple Light/IntelliJ Light/Canvas). A theme is a CSS-variable override block in `client/src/index.css` keyed by `data-theme` on `` (`.dark[data-theme=…]` / `[data-mode="light"][data-theme=…]`, `data-mode` is set on `` too), and `--tint-base`/light `--syn-plain` are now `var(--surface-3)`/`var(--fg-primary)` so no theme restates them; `hooks/useTheme.ts` is a `useSyncExternalStore` reader over `localStorage` (`theme` = `dark|light|system`, `agenthub.theme.dark|light`) that caches NOTHING in the module, so the Sidebar and Settings can never disagree — do not reintroduce per-instance `useState` there; an inline `