Skip to content

Add GitHub and Catppuccin theme variants, improve theme handling - #204

Merged
C-Hipple merged 1 commit into
mainfrom
claude/eloquent-dirac-wnjz81
Jul 31, 2026
Merged

Add GitHub and Catppuccin theme variants, improve theme handling#204
C-Hipple merged 1 commit into
mainfrom
claude/eloquent-dirac-wnjz81

Conversation

@C-Hipple

Copy link
Copy Markdown
Owner

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

  • New themes: Added GitHub Dark, GitHub Light, Monokai, and three additional Catppuccin flavors (Latte, Frappé, Macchiato)
  • Theme migration: Renamed catppuccin to catppuccin-mocha with automatic migration for persisted user preferences via resolveTheme()
  • Theme validation: Added isTheme() type guard and resolveTheme() function to safely normalize stored theme values
  • Syntax highlighting: Extended getSyntaxTheme() to map all new themes to appropriate Prism syntax highlighter styles
  • Test coverage: Added theme.test.ts with comprehensive validation that all themes define required CSS variables and are properly registered
  • Code consolidation: Extracted duplicate syntax theme selection logic from CodeViewerModal.tsx into shared getSyntaxTheme() function
  • CSS updates: Added complete theme definitions for all new themes with proper diff colors, shadows, and semantic color variables

Test Plan

  • bun run test passes (new theme validation tests verify all themes have required CSS variables)
  • bun run type-check passes (new isTheme type guard and resolveTheme function properly typed)
  • Theme picker includes all new themes with no duplicates
  • Legacy catppuccin preference automatically migrates to catppuccin-mocha

https://claude.ai/code/session_01KApMy6Scs1iqBTi5gaRMs4

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
@C-Hipple
C-Hipple merged commit dc0974b into main Jul 31, 2026
7 checks passed
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