Skip to content

feat(ui): add Catppuccin Frappé and Macchiato themes#395

Merged
benvinegar merged 1 commit into
modem-dev:mainfrom
rtlechow:feat/catppuccin-frappe-macchiato
Jun 5, 2026
Merged

feat(ui): add Catppuccin Frappé and Macchiato themes#395
benvinegar merged 1 commit into
modem-dev:mainfrom
rtlechow:feat/catppuccin-frappe-macchiato

Conversation

@rtlechow

@rtlechow rtlechow commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add built-in Catppuccin Frappé and Macchiato themes, completing the four official Catppuccin flavors.
  • Palette tokens match catppuccin/palette palette.json exactly; flavors keep the upstream light→dark order (Latte, Frappé, Macchiato, Mocha) in the theme menu and cycle.
  • Wire the new theme ids through app and OpenTUI theme resolution, plus custom_theme.base config validation.
  • Update docs, changelog, and theme coverage tests.

Testing

  • bun run typecheck
  • bun test
  • bun run lint / bun run format:check

@greptile-apps

greptile-apps Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds the two missing Catppuccin flavors — Frappé and Macchiato — as built-in themes, completing the full official four-flavor lineup alongside the existing Latte and Mocha themes. Palette hex values are sourced directly from the upstream catppuccin/palette palette.json, and the new flavors slot cleanly into the existing createCatppuccinTheme factory (both are dark, so the latte/dark branching in panel/panelAlt handles them correctly without any extra special-casing).

  • src/ui/themes/catppuccin.ts: Palette objects for Frappé and Macchiato added verbatim from the official source; a CATPPUCCIN_LABELS lookup replaces the old inline ternary for display names; two new exported theme constants wired through.
  • Config & OpenTUI registration: BUILT_IN_THEME_IDS in config.ts and HUNK_DIFF_THEME_NAMES in opentui/themes.ts updated in canonical flavor order (Latte → Frappé → Macchiato → Mocha); docs and README comment examples kept in sync.
  • Tests: All relevant test suites extended — palette spot-checks, theme-menu order, syntaxStyle presence, semantic add/remove distinctness, and Pierre markdown color-remap coverage for both new IDs.

Confidence Score: 5/5

Safe to merge — the change is additive, touches only theme data and registration, and does not alter any existing theme logic or user-facing defaults.

All four registration points (UI themes array, OpenTUI theme names, config allowed-ID list, custom-theme base validation) are updated consistently. The createCatppuccinTheme factory already handled the latte/dark split correctly, so Frappé and Macchiato inherit the right appearance, panel, and panelAlt values without requiring new branches. Palette hex values match the upstream Catppuccin source, and test coverage is comprehensive across palette spot-checks, menu ordering, syntax-style presence, semantic add/remove colour distinctness, and Pierre markdown remap isolation.

No files require special attention.

Important Files Changed

Filename Overview
src/ui/themes/catppuccin.ts Adds Frappé and Macchiato palette objects, a CATPPUCCIN_LABELS map for display names, and exports two new theme constants; createCatppuccinTheme reuses the existing latte/dark branching correctly for both new flavors.
src/ui/themes.ts Imports and inserts the two new theme constants into the THEMES array in the correct canonical order (Latte → Frappé → Macchiato → Mocha); no logic changes required.
src/opentui/themes.ts Adds the two new IDs to HUNK_DIFF_THEME_NAMES in the same order as the main THEMES array; consistent with other file updates.
src/core/config.ts Adds catppuccin-frappe and catppuccin-macchiato to BUILT_IN_THEME_IDS between latte and mocha, keeping the allowed-values list in sync with the new themes.
src/ui/themes.test.ts Extends palette and theme-resolution tests to cover Frappé and Macchiato, including spot-check of official palette hex values and semantic-distinctness of add/remove rows.
src/ui/diff/pierre.test.ts Adds both new flavor IDs to the reserved-color remap tests; correctly keeps Latte absent from the dark-theme-only loop while including it in the light+dark loop.
src/core/config.test.ts Extends test.each and the error-message assertion to cover the two new base IDs; no logic change, just keeping tests in sync.
src/ui/lib/ui-lib.test.ts Updates theme-menu order assertions and syntaxStyle checks to include Frappé and Macchiato; expectations match the canonical flavor order.
src/opentui/HunkDiffView.test.tsx Adds the two new IDs to the OpenTUI theme-name coverage test; straightforward update.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["createCatppuccinTheme(flavor)"] --> B{flavor === 'latte'?}
    B -- yes --> C["appearance = 'light'\npanel = base\npanelAlt = mantle"]
    B -- no --> D["appearance = 'dark'\npanel = mantle\npanelAlt = base"]
    D --> E["Frappé #303446"]
    D --> F["Macchiato #24273a"]
    D --> G["Mocha #1e1e2e"]
    C --> H["Latte #eff1f5"]
    E --> I[AppTheme]
    F --> I
    G --> I
    H --> I
    I --> J["THEMES array\nGraphite · Midnight · Paper · Ember\nLatte · Frappé · Macchiato · Mocha"]
    J --> K["resolveTheme / availableThemes"]
    J --> L["BUILT_IN_THEME_IDS (config.ts)"]
    J --> M["HUNK_DIFF_THEME_NAMES (opentui/themes.ts)"]
Loading

Reviews (1): Last reviewed commit: "feat(ui): add Catppuccin Frappé and Macc..." | Re-trigger Greptile

Complete the four official Catppuccin flavors so users can match
their editor setup, using the upstream palette tokens and the same
semantic mapping as the existing Latte and Mocha themes.
@benvinegar benvinegar force-pushed the feat/catppuccin-frappe-macchiato branch from f010934 to d2ff8c6 Compare June 5, 2026 16:14
@benvinegar

Copy link
Copy Markdown
Member

Thanks @rtlechow!

@benvinegar benvinegar merged commit ab7868b into modem-dev:main Jun 5, 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