Skip to content

feat(settings): a real theme selector, and Graphite as a third theme - #449

Merged
kirillDevPro merged 2 commits into
mainfrom
feat/theme-graphite
Sep 7, 2026
Merged

feat(settings): a real theme selector, and Graphite as a third theme#449
kirillDevPro merged 2 commits into
mainfrom
feat/theme-graphite

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

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. UiThemeMode gains Graphite, 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 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 carrying a theme rebuilds the badge pickers too.

Release-notes item. A settings.toml saved with ui_theme_mode = "graphite" and then read by an OLDER build is treated as corrupt: the file is renamed to settings.toml.bak and 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 new theme_selector contract), 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

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
@kirillDevPro
kirillDevPro merged commit d8903f1 into main Sep 7, 2026
6 checks passed
@kirillDevPro
kirillDevPro deleted the feat/theme-graphite branch September 7, 2026 13:51
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