Skip to content

Fix missing light theme toggle in Settings - #343

Merged
Finesssee merged 1 commit into
mainfrom
fix/theme-toggle-missing-340
Aug 18, 2026
Merged

Fix missing light theme toggle in Settings#343
Finesssee merged 1 commit into
mainfrom
fix/theme-toggle-missing-340

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

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:

  • Backend: ThemePreference enum (auto/light/dark) and the theme settings field exist and round-trip in rust/src/settings.
  • Frontend: useTheme applies data-theme="light"/"dark" and subscribes to prefers-color-scheme for auto.
  • CSS: [data-theme="light"] and [data-theme="dark"] blocks are fully defined in styles.css.
  • i18n: SectionTheme, ThemeLabel, ThemeHelper, ThemeAutoOption, ThemeLightOption, ThemeDarkOption are defined in all 7 locale .ftl files.

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 Select bound to settings.theme (Auto / Light / Dark). Selecting an option calls set({ theme }), which updateSettings persists and App.tsx applies via useTheme.

Verification

  • cargo fmt --all --check — clean
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings — clean
  • cargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings — clean
  • cargo test --manifest-path rust/Cargo.toml --lib — 1266 passed
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml — 342 passed
  • pnpm install && pnpm test — 264 passed (43 files); 3 new theme-picker tests added in GeneralTab.test.tsx
  • pnpm 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 a light choice via set({ theme: "light" }); confirms the picker is absent in notifications mode.

@Finesssee
Finesssee force-pushed the fix/theme-toggle-missing-340 branch from 3d8dbc7 to 48588cd Compare August 18, 2026 16:12
@Finesssee
Finesssee merged commit 847b414 into main Aug 18, 2026
1 check passed
@Finesssee
Finesssee deleted the fix/theme-toggle-missing-340 branch August 18, 2026 16:15
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.

[Feature]: No light theme mode?

1 participant