Fix missing light theme toggle in Settings - #343
Merged
Conversation
Finesssee
force-pushed
the
fix/theme-toggle-missing-340
branch
from
August 18, 2026 16:12
3d8dbc7 to
48588cd
Compare
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.
Fixes #340. The theme toggle button was not rendered in the Settings UI, preventing users from switching to light mode. Users with keratoconus or other light sensitivity conditions need light mode.
Root cause
The theme system was complete end-to-end except for the UI control that lets the user pick a theme:
ThemePreferenceenum (auto/light/dark) and thethemesettings field exist and round-trip inrust/src/settings.useThemeappliesdata-theme="light"/"dark"and subscribes toprefers-color-schemeforauto.[data-theme="light"]and[data-theme="dark"]blocks are fully defined instyles.css.SectionTheme,ThemeLabel,ThemeHelper,ThemeAutoOption,ThemeLightOption,ThemeDarkOptionare defined in all 7 locale.ftlfiles.But no Settings tab rendered a theme selector, so users could never change the theme — the app stayed on the default (
auto) with no visible control.Fix
Add a Theme (Appearance) section to the General settings tab with a
Selectbound tosettings.theme(Auto / Light / Dark). Selecting an option callsset({ theme }), whichupdateSettingspersists andApp.tsxapplies viauseTheme.Verification
cargo fmt --all --check— cleancargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings— cleancargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings— cleancargo test --manifest-path rust/Cargo.toml --lib— 1266 passedcargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml— 342 passedpnpm install && pnpm test— 264 passed (43 files); 3 new theme-picker tests added inGeneralTab.test.tsxpnpm run build— builds clean; locale-drift check OK (771 keys match)Tests added
GeneralTab.test.tsx: renders the theme picker with all three options in general mode; persists alightchoice viaset({ theme: "light" }); confirms the picker is absent in notifications mode.