feat(settings): in-app settings panel with live theme and terminal colours - #334
Open
guillaumejay wants to merge 2 commits into
Open
guillaumejay wants to merge 2 commits into
guillaumejay wants to merge 2 commits into
Conversation
theme now accepts solarized-dark, solarized-light, gruvbox-dark and gruvbox-light alongside dark/light, mapping to iced's built-in themes so the chrome can match the terminal grid it frames.
…live A gear in the sidebar header, or mod+, (open-settings), opens a modal panel with the chrome theme and the terminal scheme. A pick applies at once — the chrome on the next frame, every running terminal through a palette the PTY manager now shares with its terminal threads and repaints on demand — and persists only its own key to settings.json, leaving the rest of the file (and any key this build does not understand) as written. Light themes, made to read properly: - the theme key degrades alone on an unknown value instead of resetting the whole file; - status dots darken on a light surface, held to the WCAG 3:1 floor for UI components by a test over every light theme; - the unfocused-window scrim fades toward the grid's own background rather than black, which turned a light grid grey. The panel is a rung of the keyboard ladder, so escape leaves it and the overlay sweep covers it.
This branch has not been deployed
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.
What
A settings panel — ⚙ in the sidebar header, or
mod+,(open-settings,rebindable) — with two pickers:
dark,light, and four new presets named after theterminal schemes (
solarized-dark,solarized-light,gruvbox-dark,gruvbox-light), mapped to iced's built-in themes.Built-inor one of the four schemes.A pick applies immediately and saves itself — no Apply button, no
restart:
Shell::themereads it every frame);PtyManagernow shares its palette withthe terminal threads (
Arc<RwLock<Palette>>) andset_palettesends each aRepaint. OSC 10/11 colour queries answer from the new palette too;themeorterminal.colors.scheme) is written; the restof
settings.json— explicit colour overrides, unknown keys — is preserved.A file that is not a JSON object is left alone rather than rewritten.
The panel and saving go through an injected
AppearanceSinkport, so testsneither recolour real terminals nor touch the user's
settings.json.Light themes made usable
themenow degrades alone on an unknown value (ornull, which MCPset_optionwrites to unset) instead of failing serde for the whole file andresetting every setting.
light theme to WCAG's 3:1 non-text floor (Busy on Solarized Light was 2.89
before the tuning).
of black, which turned a light grid grey.
Known limit
A program reads the terminal's background once at startup to pick a light
or dark look — Claude Code does. A Claude session already running keeps its
look until restarted; the panel says so, and so does the book.
Docs
New book page
workspace/settings-panel.md; keyboard reference(
open-settings),settings.md,stdio.mdtheme values,settings.example.jsonc,README, sidebar diagram. Roadmap: new
F-settings-panel,F-settingsupdated.Testing
cargo fmt --check,clippy -D warnings,cargo test --workspace,check-deps,check-arch,markdownlint,roadmark validateall passlocally. New tests: settings round-trip and per-key persistence, lenient theme
parse, dot contrast, live repaint of a running PTY session, chord → panel →
escape, pick → repaint/persist via the sink. The overlay escape sweep covers the
new rung.
Not verified on screen: Windows' single-instance mutex prevents running a
second instance beside the one this was developed in. Needs a visual pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Br9mLSj4WaKSCWw7noUrAe