feat: add Claude theme#2267
Conversation
Add a new theme aligned with Claude Code's product surface colors: deep navy surfaces (#181715), cream-tinted text (#faf9f5), coral accent (#cc785c), and teal secondary (#5db8a6). Includes cell-level remap pipeline registration and full WCAG contrast QA compliance. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a new "Claude" UI theme to the TUI, featuring a dark navy background with warm coral and teal accents. It also updates the Cargo workspace package version to 0.8.47. A review comment points out that accent_action in the new theme should be set to a distinct amber color to align with the project's theme guidelines and other community themes.
| // Coral primary (signature Anthropic accent), teal secondary | ||
| accent_primary: Color::Rgb(0xcc, 0x78, 0x5c), // coral | ||
| accent_secondary: Color::Rgb(0x5d, 0xb8, 0xa6), // accent-teal | ||
| accent_action: Color::Rgb(0xcc, 0x78, 0x5c), // coral |
There was a problem hiding this comment.
In CLAUDE_UI_THEME, accent_action is currently set to the same coral color (#cc785c) as accent_primary.\n\nAccording to the design guidelines documented in crates/tui/src/theme_qa_audit.rs (line 77):\n> Every theme must have distinct accent colors.\n\nAdditionally, in all other community themes in this codebase (Catppuccin Mocha, Tokyo Night, Dracula, Gruvbox Dark), accent_action is mapped to the same warm/orange/amber color as mode_plan to provide a distinct, warm accent for interactive actions.\n\nTo maintain visual hierarchy, design consistency, and adhere to the project's theme guidelines, we should use the amber color (#e8a55a) already defined for mode_plan as the accent_action color.
| accent_action: Color::Rgb(0xcc, 0x78, 0x5c), // coral | |
| accent_action: Color::Rgb(0xe8, 0xa5, 0x5a), // amber |
Replace the basic web-chat MVP with a full-featured single-file web frontend: - 3-column layout: icon sidebar, thread list, chat area + right panel - Thread management: create, search, switch, fork, archive, rename, export - Streaming chat with SSE: messages, tool calls, reasoning, status updates - Approval flow: allow once, allow session, deny - Right panels: Tasks, Agents, MCP & Skills, Automations, Usage, Context Inspector, Settings - Command palette (Ctrl+K) with fuzzy search - Keyboard shortcuts: Ctrl+N, Ctrl+1-6, Escape - Mode switching: Agent/Plan/YOLO - Editable thread titles (double-click) - Auto-scroll with manual override - Claude dark theme (warm navy & coral) - Markdown rendering with code blocks and copy button - File attachment support - Zero external dependencies (single HTML file)
Remove the single-file web frontend and revert runtime_api.rs changes.
|
Independent review: Palette fidelity: Coral #CC785C is close to Anthropic's brand clay #DA7756 (RGB delta ~15) — recognizable but slightly muted. Reasonable choice. WCAG contrast on surface_bg #181715 (verified):
Convention break (confirms gemini): Wiring: Clean — ThemeId enum, name/label/description, SELECTABLE_THEMES, normalize_theme_name, theme_remap_active all touched. Builds; 33 palette_audit tests pass. v0.8.48 (#2256) compatibility: clean merge (Cargo.toml bump to 0.8.47 will be superseded by 2256's 0.8.48) / sibling-PR conflict: all three (#2270 Solarized, #2276 transparent, #2129 Matrix) conflict on palette.rs — same ThemeId enum + match arms + SELECTABLE_THEMES list. Last-merged wins; others need rebase. |
reconcile_turn_liveness() had a blind spot: when TurnStarted arrived (setting runtime_turn_status to "in_progress") but TurnComplete never came (sub-agent hang, engine panic, lost event), neither existing watchdog branch fired. is_loading stayed true permanently, queuing all subsequent messages. Add Branch 3 with a 5-minute timeout (matched to stream idle timeout) that checks turn_started_at for staleness when the turn is stuck in "in_progress" with no running sub-agents. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Theme cluster coordination — this PR is one of 4 in flight that all add to
All 4 hard-conflict at the Cross-pinging the cluster: @AiurArtanis @HUQIANTAO @Hmbown @malsony — same coordination note on each PR. |
- Fix text_dim contrast: #615E58 → #72706A (2.77 → 3.62, passes WCAG AA)
- Fix error_fg/error_border contrast: #C64545 → #E06060 (3.70 → 5.13, passes AA)
- Use amber #E8A55A for accent_action (distinct from accent_primary coral)
- Fix theme_picker test expecting GruvboxDark as last theme
- Remove broken include_str!("../../../web-chat/index.html") reference
left by incomplete web-chat revert
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Adds a new Claude theme aligned with Claude Code's product surface colors. Selectable from the
/themepicker as the 9th preset.Palette
Built from the Claude.com / Claude Code dark product chrome:
#181715#252320#1f1e1b#cc785c#5db8a6#faf9f5#a09d96Details
UiThemepopulated with the Claude design token palettetheme_remap_activeso cell-level color remap applies at render timeThemeId::Claude, canonical name"claude", displayed as ClaudeGreptile Summary
This PR adds a Claude theme to the TUI palette (warm navy + coral, aligned with Claude Code's product surface colors) and also ships a new turn-stall watchdog that auto-recovers the UI after a 300-second
"in_progress"turn with no completion signal.CLAUDE_UI_THEMEpopulates all 36UiThemefields, is registered inSELECTABLE_THEMESandtheme_remap_active, and passes the existing WCAG contrast test suite.reconcile_turn_livenessaddsTURN_STALL_WATCHDOG_TIMEOUT(300 s) to surface an error toast and reset loading state when a turn stalls without a completion event and no sub-agents are running.theme_pickerwrap-around test and a newturn_liveness_recovers_stalled_in_progress_turnunit test cover both additions.Confidence Score: 5/5
Safe to merge — the theme addition is purely additive and the stall watchdog only changes UI state when a turn has been visibly stuck for 5 minutes.
The Claude theme follows every existing convention exactly, and Branch 3 is well-tested and narrowly scoped: it only fires when the UI is loading, status is "in_progress", no agents are running, and 300 s have elapsed — making accidental triggers essentially impossible in normal operation.
The inline comment for Branch 3 in
crates/tui/src/tui/ui.rsclaims the watchdog handles stuck sub-agents, but the!has_running_agentsguard prevents it from doing so — worth clarifying before the next reader is misled.Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[reconcile_turn_liveness called on poll tick] --> B{is_loading?} B -- No --> Z[return false] B -- Yes --> C{runtime_turn_status == None\nAND dispatch_started_at > 30s} C -- Yes --> D[Branch 1: Dispatch timeout\nClear is_loading + toast Error] C -- No --> E{status == completed/interrupted/failed\nAND !has_running_agents} E -- Yes --> F[Branch 2: Stale busy state\nClear is_loading + toast Warning] E -- No --> G{status == in_progress\nAND !has_running_agents\nAND turn_started_at > 300s} G -- Yes --> H[Branch 3 NEW: Stall watchdog\nClear is_loading + runtime_turn_status + toast Error] G -- No --> Z D --> Y[return true] F --> Y H --> YComments Outside Diff (1)
crates/tui/src/theme_qa_audit.rs, line 1 (link)v0.8.45but the workspace has been atv0.8.47since this PR's version bump. This will accumulate misleading drift each release if not kept in sync.Reviews (3): Last reviewed commit: "fix(theme): address review feedback on C..." | Re-trigger Greptile