Fix theme source not resetting when using system theme#3756
Conversation
The condition checking isUsingSystemTheme was inverted, preventing the theme source from being reset when the user switches to the system theme. This ensures resetThemeSource() is called correctly.
|
@fmartingr: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsI understand the commands that are listed here |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
ThemeManagerwhereisUsingSystemThemewas negated, preventingresetThemeSource()from being called when the user switches to the system themeTest plan
Change Impact: 🟡 Medium
Regression Risk: The change corrects an inverted conditional in
updateMainViews(), flipping whenresetThemeSource()is called based on theisUsingSystemThemeflag. While the code modification is minimal and isolated to a single method, it addresses a logic bug that affects user-facing theme behavior. Potential risks include: (1) if existing workarounds or dependencies exist around the broken behavior, this fix could surface unexpected issues; (2) theme state transitions between system and custom themes need to work correctly across both main and popout views; (3) the fix changes the path through whichnativeTheme.themeSourcegets updated, which could have side effects with Electron's native theme handling if there are edge cases not covered by tests.QA Recommendation: Manual QA is essential. Verify both code paths thoroughly following the test plan provided in the PR: confirm system theme correctly follows OS dark/light mode changes, verify custom theme application uses proper light/dark modes based on server colors, and stress-test repeated toggling between system and custom themes. A test file exists (
src/main/themeManager.test.js), but coverage verification is recommended to ensure both conditional branches are tested. Pay particular attention to theme persistence and visual consistency when switching between themes.