Add GitHub and Catppuccin theme variants, improve theme handling - #204
Merged
Conversation
Adds six themes to the picker: - GitHub Dark / GitHub Light, using Primer's palette and GitHub's own diff swatches so a PR reads the way it does on github.com. These are stronger-contrast than the existing generic dark/light themes, which keep their subtle line fills and One Dark/One Light syntax. - Monokai. - Catppuccin split into its four official flavors — Latte, Frappe, Macchiato and Mocha. The old 'catppuccin' value was Mocha; a stored preference naming it now resolves to 'catppuccin-mocha' via resolveTheme() instead of falling back to the default theme. Along the way: - Pull the app-theme -> Prism-style mapping into a shared getSyntaxTheme(), which CodeViewerModal had duplicated. SynthWave '84 now gets the matching Prism style it always had available, and the light flavors get a light syntax theme rather than One Dark. - Give Solarized Light the --shadow-glow it was missing. - Cover the theme table with tests: the picker and VALID_THEMES agree, and every theme defines the full set of CSS variables. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KApMy6Scs1iqBTi5gaRMs4
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
Expands the theme system with new GitHub-branded themes (light and dark) and all four Catppuccin flavor variants (Latte, Frappé, Macchiato, Mocha). Refactors theme resolution to handle legacy theme names and adds comprehensive test coverage for theme definitions.
Changes
catppuccintocatppuccin-mochawith automatic migration for persisted user preferences viaresolveTheme()isTheme()type guard andresolveTheme()function to safely normalize stored theme valuesgetSyntaxTheme()to map all new themes to appropriate Prism syntax highlighter stylestheme.test.tswith comprehensive validation that all themes define required CSS variables and are properly registeredCodeViewerModal.tsxinto sharedgetSyntaxTheme()functionTest Plan
bun run testpasses (new theme validation tests verify all themes have required CSS variables)bun run type-checkpasses (newisThemetype guard andresolveThemefunction properly typed)catppuccinpreference automatically migrates tocatppuccin-mochahttps://claude.ai/code/session_01KApMy6Scs1iqBTi5gaRMs4