fix: persist appearance theme only after save - #13
Conversation
Theme picks now preview in place and revert when leaving Appearance or Settings, so unsaved choices no longer stick across tabs. Save Changes is what commits the theme. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoPersist appearance theme only after saving settings
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
The matchMedia listener now uses in-memory preview mode instead of localStorage, so unsaved system previews track OS changes and other previews do not. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
src/lib/theme.test.ts.Why
Previously, clicking Light / Dark / System called
applyTheme()immediately, which wrotelocalStorageand applied the class globally. Navigating to General, Security, etc. kept that unsaved theme.How to test
Made with Cursor