feat(settings): a real theme selector, and Graphite as a third theme - #449
Merged
Conversation
The General tab's two-state toggle could only flip between light and dark. It becomes a three-entry select (Light / Graphite / Dark), and UiThemeMode gains Graphite: a mid-tone graphite palette bundled in MoonUI, dark-leaning so every existing dark colour set (badges, lines, orders, chart theme) is reused through one UiThemeMode::is_light() helper instead of a third set and a settings migration. The login window now shares the one mode-to-theme mapping with the main window, and a MoonBot import that carries a theme rebuilds the badge pickers too, so the picker cannot show one variant and write the other. Note for release notes: an older build reading a settings.toml with ui_theme_mode = "graphite" treats the file as corrupt, renames it to settings.toml.bak and starts from defaults. Claude-Session: https://claude.ai/code/session_01UwfcDHWtKBKG6NP21YsNZM
Only the MoonUI source revision moves (23 entries, e60d5e89 -> 997de7eb, Moonbot-Tech/MoonUI#62); no third-party version changes, proven with `cargo fetch --locked`. Claude-Session: https://claude.ai/code/session_01UwfcDHWtKBKG6NP21YsNZM
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 & why
The General tab's theme control was a two-state toggle, so a third theme had nowhere to go. It becomes a three-entry select — Light / Graphite / Dark — laid out like the language row, with the same live preview and the same Save/rollback behaviour.
UiThemeModegainsGraphite, a mid-tone palette bundled in MoonUI (Moonbot-Tech/MoonUI#62, re-pinned here). Graphite is dark-leaning, so every existing dark colour set (badges, lines, orders, chart theme) is reused through oneUiThemeMode::is_light()helper instead of a third set and a settings migration; the login window now shares the one mode-to-theme mapping with the main window, and a MoonBot import carrying a theme rebuilds the badge pickers too.Release-notes item. A
settings.tomlsaved withui_theme_mode = "graphite"and then read by an OLDER build is treated as corrupt: the file is renamed tosettings.toml.bakand defaults are written on the next save. Downgrading after choosing Graphite therefore resets every setting, not only the theme.How to verify
cargo test -p moon-core(1657),cargo test -p moon-ui-gpui --bin moonterminal(1499),--test theme_contract(323, incl. the newtheme_selectorcontract),cargo fmt --all -- --check,cargo fetch --locked— all green on this tree. By eye: Settings → General shows the three-entry select; picking Graphite repaints the shell before Save; closing without saving rolls back; Interface / Lines / Badges edit the dark set while Graphite is active.https://claude.ai/code/session_01UwfcDHWtKBKG6NP21YsNZM