feat: extend theme system with semantic color tokens and replace hardcoded values#369
Closed
openasocket wants to merge 2 commits intoRunMaestro:mainfrom
Closed
feat: extend theme system with semantic color tokens and replace hardcoded values#369openasocket wants to merge 2 commits intoRunMaestro:mainfrom
openasocket wants to merge 2 commits intoRunMaestro:mainfrom
Conversation
Replace hardcoded #fff, #000, and 'white' color values with theme tokens (accentForeground, bgMain) across 15 component files. This ensures proper contrast ratios on accent-colored backgrounds for all themes, including high-contrast and vibe themes like dre-synth. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add info, status foregrounds (successForeground, warningForeground, errorForeground), dimmed status backgrounds (successDim, warningDim, errorDim, infoDim), git diff colors (diffAddition, diffAdditionBg, diffDeletion, diffDeletionBg), overlay/interactive states (overlay, overlayHeavy, hoverBg, activeBg), and shadow tokens to ThemeColors. All 17 theme definitions populated with palette-appropriate values. Light themes use black hover overlays and lighter shadows; dark/vibe themes use white hover overlays with heavier shadows. CSS custom property mappings, fallback themes, and tests updated accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Closing to validate all changes before resubmitting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#fff,#000,#ffffff,white) with proper theme tokens across 15 renderer component filesThemeColorsinterface with 17 new semantic tokens for status foregrounds, dimmed backgrounds, git diff colors, overlays, hover/active states, and shadowsProblem
#fff/#000/whitefor text on accent-colored backgrounds, breaking accessibility on themes where the accent color is lightinfocolor, no foreground-on-status tokens, no dimmed status backgrounds, no git diff colors, no overlay/hover/shadow tokens. Components were forced to hardcodergba(239, 68, 68, 0.15),rgba(0, 0, 0, 0.6), etc.Solution
Commit 1: Replace hardcoded color values with theme tokens (15 files)
All hardcoded
#fff/#000/whitevalues replaced with appropriate theme tokens:#fff/white/#ffffffon accent bgtheme.colors.accentForeground#000/#000000on success bgtheme.colors.accentForegroundtheme.mode === 'light' ? '#fff' : '#000'theme.colors.accentForegroundortheme.colors.bgMainFiles: AgentSessionsBrowser, AgentSessionsModal, AICommandsPanel, AutoRunDocumentSelector, AutoRunnerHelpModal, ChartErrorBoundary, CsvTableRenderer, FilePreview, GroupChatInput, HistoryHelpModal, LeaderboardRegistrationModal, PlaygroundPanel, SpecKitCommandsPanel, TerminalOutput, AgentSelectionScreen
Commit 2: Extend theme system with 17 new semantic color tokens (7 files)
New tokens added to
ThemeColorsinterface:infosuccessForeground,warningForeground,errorForegroundsuccessDim,warningDim,errorDim,infoDimdiffAddition,diffAdditionBg,diffDeletion,diffDeletionBgoverlay,overlayHeavyhoverBg,activeBgshadowAll 17 theme definitions (6 dark, 6 light, 4 vibe, 1 custom) populated with palette-matched values:
rgba(255,255,255,0.06)), heavier shadowsrgba(0,0,0,0.04)), lighter shadows#40ffddfor info, pedurple uses#b89fd0)Info colors by theme: Dracula
#8be9fd(cyan), Monokai#66d9ef, Nord#81a1c1, Tokyo Night#7dcfff, Catppuccin Mocha#89b4fa, Gruvbox Dark#83a598, GitHub#0969da, Solarized#268bd2, etc.Files: theme-types.ts, themes.ts, LightboxModal.tsx, ThemeProvider.tsx, cssCustomProperties.ts + test updates
Theme token count: 13 → 30
The
ThemeColorsinterface grows from 13 to 30 tokens. The CustomThemeBuilder automatically surfaces all new tokens since it iterates overThemeColorskeys.Test plan
npm run lint) — all 3 configsnpm run test) — 449 test files🤖 Generated with Claude Code