Skip to content

feat: Solarized Dark Theme#532

Open
chrisscott wants to merge 4 commits intoRunMaestro:mainfrom
chrisscott:fix/solarized-dark-contrast
Open

feat: Solarized Dark Theme#532
chrisscott wants to merge 4 commits intoRunMaestro:mainfrom
chrisscott:fix/solarized-dark-contrast

Conversation

@chrisscott
Copy link
Copy Markdown

@chrisscott chrisscott commented Mar 7, 2026

Adds the Solarized Dark theme.

Test with dev server.

Screenshot 2026-03-07 at 16 44 37

Summary by CodeRabbit

  • New Features

    • Added a "solarized-dark" theme option.
  • Style

    • Improved session origin, session ID, and search-match pills for better contrast and readability.
    • Enhanced code block and inline code styling so syntax highlighting adapts correctly across themes.
  • Tests

    • Updated test expectations to reflect the new total number of available themes.

Add 'solarized-dark' to ThemeId union type, isValidThemeId guard,
and THEMES registry using canonical Solarized Dark palette colors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c55e84ea-48e3-482e-a7de-5c58865a6e98

📥 Commits

Reviewing files that changed from the base of the PR and between 7dcc59e and 5514865.

📒 Files selected for processing (4)
  • src/__tests__/renderer/constants/themes.test.ts
  • src/renderer/components/SessionListItem.tsx
  • src/renderer/utils/markdownConfig.ts
  • src/shared/themes.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/tests/renderer/constants/themes.test.ts
  • src/renderer/utils/markdownConfig.ts
  • src/renderer/components/SessionListItem.tsx

📝 Walkthrough

Walkthrough

Adds a new "solarized-dark" theme and registers it in the theme registry; updates ThemeId validation and a unit test to expect 18 themes. Adjusts pills' styling in SessionListItem and changes code-block rendering to compute theme-aware syntax styles.

Changes

Cohort / File(s) Summary
Theme Registry & Types
src/shared/theme-types.ts, src/shared/themes.ts
Added solarized-dark to the ThemeId union and validIds; registered a new solarized-dark entry in THEMES with a full set of color tokens.
Component Styling
src/renderer/components/SessionListItem.tsx
Adjusted pill backgrounds and text colors: increased opacity for user/auto/accent-related pills; switched several pill text colors to accentText or textMain; simplified session ID pill background.
Markdown Configuration
src/renderer/utils/markdownConfig.ts
Block code rendering now builds a themedStyle by deriving a base syntax style from theme mode and layering theme-aware overrides for pre[class*="language-"] and code[class*="language-"]; SyntaxHighlighter uses themedStyle.
Tests
src/__tests__/renderer/constants/themes.test.ts
Updated test expectation for total themes from 17 to 18 to reflect the added solarized-dark theme.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

"I hopped in code with tiny feet,
New solarized shadows make the UI sweet,
Pills polished bright, blocks dressed in theme,
Eighteen hues now dance and gleam,
— a rabbit’s cheer for every commit!" 🐇

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Solarized Dark Theme' directly and clearly describes the main change: adding a new solarized dark theme to the application.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can validate your CodeRabbit configuration file in your editor.

If your editor has YAML language server, you can enable auto-completion and validation by adding # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json at the top of your CodeRabbit configuration file.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 7, 2026

Greptile Summary

This PR adds the Solarized Dark theme, correctly wiring it through all required layers: the ThemeId union type, the isValidThemeId runtime guard, and the canonical THEMES record in src/shared/themes.ts (which is re-exported to the renderer via src/renderer/constants/themes.ts). The test count is updated accordingly.

Two supporting changes accompany the new theme:

  • SessionListItem.tsx — Increases pill background opacity ('30''40') and switches the MAESTRO pill text from accent to accentText, and the CLI / Session ID pills from textDim to textMain. These are cross-theme readability improvements, not specific to Solarized Dark.
  • markdownConfig.ts — Introduces a themedStyle object that overrides the base text color and background of vscDarkPlus syntax-highlighted code blocks with per-theme values, so plain-text code blocks match inline code styling for all themes.

Key observations:

  • The Solarized Dark palette closely follows the canonical Solarized spec. bgActivity: '#0a4050' and accentText: '#5fddd5' are intentional deviations — the former is a smooth intermediate between bgMain/bgSidebar, and the latter is a brighter cyan chosen for contrast against dark backgrounds (matching the convention used in other dark themes like Nord, Catppuccin Mocha, etc.).
  • The markdownConfig.ts change is a global change that improves all themes — plain-text / unknown-language code blocks will now respect the theme's textMain and bgActivity rather than defaulting to vscDarkPlus's hard-coded near-white text. Light themes benefit as well (previously, a light bgActivity was paired with vscDarkPlus's near-white default text, which was near-invisible).
  • The customStyle.background prop on SyntaxHighlighter already overrode the block background before this PR; the new themedStyle['pre[class*="language-"]'].background entry is redundant but harmless since customStyle takes precedence as an inline style.

Confidence Score: 5/5

  • Safe to merge — all theme wiring is correct, tests pass, and supporting UI changes are net improvements across all themes.
  • The new theme is fully and correctly registered in every required location (type union, runtime guard, THEMES record, test count). The supporting changes to SessionListItem and markdownConfig are improvements with no regressions. No logic errors, type issues, or missing fields were found.
  • No files require special attention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["ThemeId union type\nsrc/shared/theme-types.ts"] -->|"'solarized-dark' added"| B["isValidThemeId guard\nsrc/shared/theme-types.ts"]
    A --> C["THEMES record\nsrc/shared/themes.ts"]
    C -->|"re-exported via"| D["src/renderer/constants/themes.ts"]
    D -->|"consumed by"| E["SessionListItem.tsx\npill colors use accentText / textMain"]
    D -->|"consumed by"| F["markdownConfig.ts\nthemedStyle overrides vscDarkPlus\nbase color + background"]
    C --> G["themes.test.ts\ncount: 17 → 18"]
Loading

Last reviewed commit: 7dcc59e

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/renderer/components/SessionListItem.tsx (1)

281-289: Consider updating the search match pill for consistency.

The content search match pill (line 284) still uses theme.colors.accent for both background and text color, while similar pills in this file were updated to use more readable text colors. This may have contrast issues on certain themes.

Note that similar patterns exist in Toast.tsx (lines 194-200) and ShortcutsHelpModal.tsx (lines 84-87) per the relevant code snippets provided.

♻️ Optional: Update for consistency
 {searchResultInfo && searchResultInfo.matchCount > 0 && searchMode !== 'title' && (
 	<span
 		className="flex items-center gap-1 px-1.5 py-0.5 rounded"
-		style={{ backgroundColor: theme.colors.accent + '20', color: theme.colors.accent }}
+		style={{ backgroundColor: theme.colors.accent + '30', color: theme.colors.accentText }}
 	>
 		<Search className="w-3 h-3" />
 		{searchResultInfo.matchCount}
 	</span>
 )}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/SessionListItem.tsx` around lines 281 - 289, The
search match pill in SessionListItem (rendering when searchResultInfo &&
searchResultInfo.matchCount > 0 && searchMode !== 'title') uses
theme.colors.accent for both background and text causing contrast issues; update
the inline style so the background remains theme.colors.accent + '20' but the
text color uses a readable color (e.g., theme.colors.textPrimary or a dedicated
on-accent color) instead of theme.colors.accent, and apply the same consistent
change pattern to the similar pills in Toast.tsx and ShortcutsHelpModal.tsx to
ensure consistent contrast across components.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/renderer/components/SessionListItem.tsx`:
- Around line 281-289: The search match pill in SessionListItem (rendering when
searchResultInfo && searchResultInfo.matchCount > 0 && searchMode !== 'title')
uses theme.colors.accent for both background and text causing contrast issues;
update the inline style so the background remains theme.colors.accent + '20' but
the text color uses a readable color (e.g., theme.colors.textPrimary or a
dedicated on-accent color) instead of theme.colors.accent, and apply the same
consistent change pattern to the similar pills in Toast.tsx and
ShortcutsHelpModal.tsx to ensure consistent contrast across components.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4148c7f4-cc2d-4273-8d34-6de7aea1eb27

📥 Commits

Reviewing files that changed from the base of the PR and between 7acc502 and 7dcc59e.

📒 Files selected for processing (5)
  • src/__tests__/renderer/constants/themes.test.ts
  • src/renderer/components/SessionListItem.tsx
  • src/renderer/utils/markdownConfig.ts
  • src/shared/theme-types.ts
  • src/shared/themes.ts

@chrisscott
Copy link
Copy Markdown
Author

🧹 Nitpick comments (1)

src/renderer/components/SessionListItem.tsx (1)> 281-289: Consider updating the search match pill for consistency.

The content search match pill (line 284) still uses theme.colors.accent for both background and text color, while similar pills in this file were updated to use more readable text colors. This may have contrast issues on certain themes.
Note that similar patterns exist in Toast.tsx (lines 194-200) and ShortcutsHelpModal.tsx (lines 84-87) per the relevant code snippets provided.

♻️ Optional: Update for consistency

 {searchResultInfo && searchResultInfo.matchCount > 0 && searchMode !== 'title' && (
 	<span
 		className="flex items-center gap-1 px-1.5 py-0.5 rounded"
-		style={{ backgroundColor: theme.colors.accent + '20', color: theme.colors.accent }}
+		style={{ backgroundColor: theme.colors.accent + '30', color: theme.colors.accentText }}
 	>
 		<Search className="w-3 h-3" />
 		{searchResultInfo.matchCount}
 	</span>
 )}

🤖 Prompt for AI Agents

Verify each finding against the current code and only fix it if needed.

In `@src/renderer/components/SessionListItem.tsx` around lines 281 - 289, The
search match pill in SessionListItem (rendering when searchResultInfo &&
searchResultInfo.matchCount > 0 && searchMode !== 'title') uses
theme.colors.accent for both background and text causing contrast issues; update
the inline style so the background remains theme.colors.accent + '20' but the
text color uses a readable color (e.g., theme.colors.textPrimary or a dedicated
on-accent color) instead of theme.colors.accent, and apply the same consistent
change pattern to the similar pills in Toast.tsx and ShortcutsHelpModal.tsx to
ensure consistent contrast across components.

🤖 Prompt for all review comments with AI agents

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/renderer/components/SessionListItem.tsx`:
- Around line 281-289: The search match pill in SessionListItem (rendering when
searchResultInfo && searchResultInfo.matchCount > 0 && searchMode !== 'title')
uses theme.colors.accent for both background and text causing contrast issues;
update the inline style so the background remains theme.colors.accent + '20' but
the text color uses a readable color (e.g., theme.colors.textPrimary or a
dedicated on-accent color) instead of theme.colors.accent, and apply the same
consistent change pattern to the similar pills in Toast.tsx and
ShortcutsHelpModal.tsx to ensure consistent contrast across components.

ℹ️ Review info

Same pattern — accent text on faint accent background. This is fine. The accent color (#268bd2) has good contrast against the dark backgrounds in Solarized Dark. The + '20' background tint is subtle enough that the effective background is still essentially the parent's dark color.

No changes needed. These pills use a well-established pattern (accent-colored text with a faint accent wash) that provides adequate contrast across all themes, including Solarized Dark. The text color contrasts against the underlying dark background, not against the semi-transparent tint.

@pedramamini
Copy link
Copy Markdown
Collaborator

Hey @chrisscott — thanks for this PR! The Solarized Dark theme and contrast improvements look great.

There's a merge conflict in src/renderer/utils/markdownConfig.ts — since your branch was opened, main introduced a getSyntaxStyle() helper that switches between light/dark syntax styles based on theme mode. Your themedStyle wrapper just needs to use getSyntaxStyle(theme.mode) instead of the hardcoded vscDarkPlus reference, and it should resolve cleanly.

If you get a chance to rebase and fix that up, that'd be ideal. But if you're busy, we're happy to take care of it on our end — we'll make sure you get full credit for the work either way.

Thanks again for the contribution! 🙏

chrisscott and others added 3 commits March 18, 2026 16:22
- Darken border color (#586e75 → #2f4f56) so pill backgrounds contrast
  better with text
- Brighten textMain (#839496 → #93a1a1) and accentText (#2aa198 →
  #5fddd5) for readable tag labels
- Override SyntaxHighlighter base text color with theme's textMain so
  code blocks match inline code across all themes
- Update pill styles in SessionListItem for better contrast
- Bump theme count assertion from 17 → 18

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chrisscott chrisscott force-pushed the fix/solarized-dark-contrast branch from 7dcc59e to 5514865 Compare March 18, 2026 20:40
@chrisscott
Copy link
Copy Markdown
Author

Thanks for the review @pedramamini! I've pushed up the requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants