Skip to content

feat(theme): support system light and dark themes - #651

Closed
Soundcreates wants to merge 1 commit into
TabularisDB:mainfrom
Soundcreates:feat/649-system-theme-sync
Closed

feat(theme): support system light and dark themes#651
Soundcreates wants to merge 1 commit into
TabularisDB:mainfrom
Soundcreates:feat/649-system-theme-sync

Conversation

@Soundcreates

Copy link
Copy Markdown

Summary

  • add persisted light and dark theme mappings
  • add optional Follow system appearance mode using prefers-color-scheme
  • expose filtered light/dark theme pickers in Appearance settings
  • preserve SQL editor Same as App synchronization

Closes #649

Validation

  • pnpm typecheck
  • pnpm lint
  • pnpm build
  • cargo check --manifest-path src-tauri/Cargo.toml
  • git diff --check

The repository-wide cargo fmt --check currently reports unrelated pre-existing formatting differences outside this change.

Add persisted light and dark theme mappings with optional system appearance tracking. Expose the mappings in Appearance settings and keep the SQL editor's Same as App mode synchronized.\n\nCloses TabularisDB#649
@kilo-code-bot

kilo-code-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • src-tauri/src/config.rs
  • src/components/settings/AppearanceTab.tsx
  • src/contexts/ThemeProvider.tsx
  • src/i18n/locales/en.json

The change adds persisted followSystemTheme, lightThemeId, and darkThemeId config fields with correct Rust Option-guarded merging in save_config, mirrors them through the AppConfig TS interface, wires the new pickers in AppearanceTab, and updates the ThemeProvider load/save/system-listener effects consistently. Defaults are applied correctly via DEFAULT_THEME_SETTINGS, the system matchMedia listener uses the configured light/dark IDs, and effect dependencies cover the read state with no stale-closure gaps. No security, runtime, or logic defects found in the changed lines.


Reviewed by glm-5.2 · Input: 27.7K · Output: 6.5K · Cached: 224.8K

@debba

debba commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Thanks a lot for this, and sorry for the timing overlap: #650 was opened by the issue author a few minutes before yours and lands the same config fields and mode switch, plus the native window chrome sync via Tauri setTheme (the Linux/GNOME CSD case discussed in #649), all 11 locales and test coverage. I've merged that one and I'm closing this to avoid two parallel implementations of the same feature.

Two things from your PR I'd genuinely like to see as follow-ups if you're up for it:

  1. hydrating settings.customThemes from the loaded custom themes in ThemeProvider (feat: follow system light/dark appearance with per-mode theme selection #650 doesn't do that and it looks like a real gap);
  2. defaulting followSystemTheme to true for fresh installs (no theme in config.json), keeping Static for existing configs, as raised in the [Feature]: Follow system light/dark appearance with per-mode theme selection #649 thread.

Happy to review either quickly.

@debba debba closed this Aug 26, 2026
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]: Follow system light/dark appearance with per-mode theme selection

2 participants