-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary
When a user selects an app theme, Canopy should automatically choose a well-matched open-source terminal color scheme for xterm.js. The terminal scheme picker should still be available for users who want a different palette, but "Match App Theme" should be the intelligent default — not just a fallback to raw CSS variables.
Problem Statement
Canopy currently has twelve app themes (Daintree, Bondi, Fiordland, Highlands, Arashiyama, Galápagos, Svalbard, Namib, Redwoods, Atacama, Serengeti, Hokkaido) and a separate set of terminal color schemes. The "Match App Theme" terminal scheme option exists in the picker, but it derives colors from CSS custom properties rather than selecting a curated, purpose-built terminal palette that complements the app theme's character and tone.
The result is a terminal that is merely consistent in background color but lacks the deliberate ANSI color quality of a well-designed terminal theme. Power users who want beautiful terminal output have to manually hunt for a matching theme in the picker, and there is currently no guidance on which terminal schemes pair well with which app themes.
Desired Behavior
- Each of Canopy's twelve app themes has a designated "best match" terminal color scheme
- The designated scheme is an existing, freely licensed open-source terminal theme (e.g. from the iTerm2-Color-Schemes collection, base16, Catppuccin, Dracula, etc.) — no bespoke color schemes should be invented
- When a user selects an app theme, the terminal automatically uses that theme's designated scheme
- The terminal scheme picker remains available and lets the user override to any scheme in the library
- The library of built-in terminal schemes grows to cover the designated matches (any scheme needed for a mapping that isn't already in the codebase must be added)
- The "Match App Theme" option in the picker should reflect the designated scheme for the currently active app theme, not a generic CSS fallback
Research Required
The implementing agent must:
- Survey publicly available, permissively licensed xterm/terminal theme collections and identify candidate schemes for each of the twelve app themes. Good starting points include mbadolato/iTerm2-Color-Schemes (MIT), base16 (MIT), Catppuccin (MIT), Dracula (MIT), and similar.
- Match candidates by visual character — background tone (deep dark vs. muted dark vs. warm light vs. cool light), accent hue, and overall contrast level — not just by dark/light type.
- Select one scheme per app theme. The selected scheme must be freely licensed and have a well-known, citable origin.
- Add any selected schemes that are not already in the built-in scheme list to the codebase with accurate color values sourced from the authoritative definition.
- Record the selected source/attribution for each scheme (name, project, license) in a code comment alongside the mapping.
Context
The existing terminal color schemes live in src/config/terminalColorSchemes.ts. Currently eight built-in schemes exist: Dracula, One Dark, Monokai, Solarized Dark, Solarized Light, GitHub Dark, Catppuccin Mocha, and the "Match App Theme" pseudo-scheme.
The twelve app themes and their IDs are defined in shared/theme/themes.ts: daintree (dark), bondi (light), fiordland (dark), highlands (dark), arashiyama (dark), galapagos (dark), svalbard (light), namib (dark), redwoods (dark), atacama (light), serengeti (light), hokkaido (light).
The useTerminalColorSchemeStore in src/store/terminalColorSchemeStore.ts manages the selected scheme. The useAppThemeStore in src/store/appThemeStore.ts tracks the active app theme. There is currently no connection between the two stores.
Acceptance Criteria
- Every Canopy app theme has a designated matching terminal scheme, and changing the app theme automatically updates the terminal to that scheme (when the user has not manually overridden the terminal scheme)
- Each designated scheme is sourced from a real, publicly available, permissively licensed terminal theme collection — no invented palettes
- Any newly added terminal schemes include a code comment citing the source project and license
- The terminal scheme picker continues to work: selecting a specific scheme overrides the automatic match and the choice is persisted
- Light app themes are matched to light-background terminal schemes; dark app themes to dark-background schemes
Edge Cases & Risks
- Users who have previously selected a custom terminal scheme must not have it silently overridden when they change app themes. The automatic match should only apply when the user is on "Match App Theme" (the default), not when they have explicitly chosen a specific scheme.
- Some app themes share a broad visual character (e.g. multiple cool dark themes). The research should still pick distinct, individually appropriate schemes rather than reusing the same scheme for all dark themes.
- Color accuracy matters: schemes should be sourced from their authoritative definition files, not approximated. Wrong hex values shipped as a named scheme is worse than no match.
Dependencies
Depends on #3335 (new terminals ignoring the selected color scheme — that bug should be fixed first so the automatic matching actually takes effect when new terminals are spawned).