Skip to content

Add theming system with built-in palettes and custom theme editor - #1

Merged
thelooter merged 1 commit into
thelooter/mainfrom
feat/themes
Jun 28, 2026
Merged

Add theming system with built-in palettes and custom theme editor#1
thelooter merged 1 commit into
thelooter/mainfrom
feat/themes

Conversation

@thelooter

Copy link
Copy Markdown
Owner

Summary

Adds a full theming layer to the web app — built-in palettes, a custom theme editor, and palette-aware syntax highlighting.

  • 11 built-in palettes: Default, Solarized, Nord, High Contrast, Catppuccin (Latte/Frappé/Macchiato/Mocha), Rosé Pine (Dawn/main/Moon).
  • Custom themes: duplicate, edit, and delete palettes via a new ThemeEditor, persisted to localStorage with import/export transport.
  • Separate active light/dark selection wired through useTheme, with cross-tab sync.
  • New Appearance settings page — theme controls moved out of General.
  • Palette-aware syntax highlighting: Catppuccin code renders with catppuccin-* Shiki themes, Rosé Pine with rose-pine*, falling back to the generic Pierre theme. Highlighter cache keyed by theme so palette switches load the right bundled theme.
  • Scrollbar / noise styling driven by CSS variables so palettes can override them.

No new dependencies — the Catppuccin/Rosé Pine Shiki themes are already bundled in @pierre/diffs.

Testing

  • New unit tests for the registry, transport, theme editor, and syntax-theme resolution (71 theme tests).
  • Full web unit suite: 1267 passed.
  • tsgo --noEmit typecheck: clean.

🤖 Generated with Claude Code

Introduce a full theming layer for the web app:

- Theme registry (apps/web/src/themes/) with 11 built-in palettes:
  Default, Solarized, Nord, High Contrast, Catppuccin (Latte/Frappe/
  Macchiato/Mocha), and Rose Pine (Dawn/main/Moon).
- Custom themes: duplicate, edit, and delete palettes via a new
  ThemeEditor, persisted to localStorage with import/export transport.
- Separate active light/dark theme selection wired through useTheme,
  with cross-tab sync.
- New Appearance settings page (moved theme controls out of General).
- Syntax highlighting follows the active palette (Catppuccin code
  renders with catppuccin-* Shiki themes, Rose Pine with rose-pine*),
  falling back to the generic Pierre theme; highlighter cache keyed by
  theme so palette switches load the right bundled theme.
- Scrollbar/noise styling driven by CSS variables so palettes can
  override them.

Covered by unit tests for the registry, transport, theme editor, and
syntax-theme resolution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thelooter
thelooter changed the base branch from main to thelooter/main June 28, 2026 13:54
@thelooter
thelooter merged commit 17bc229 into thelooter/main Jun 28, 2026
@thelooter
thelooter deleted the feat/themes branch June 28, 2026 14:04
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.

1 participant