Skip to content

clarify desktop theme picker behavior#391

Closed
tellaho wants to merge 2 commits intomainfrom
codex/explicit-theme-selection
Closed

clarify desktop theme picker behavior#391
tellaho wants to merge 2 commits intomainfrom
codex/explicit-theme-selection

Conversation

@tellaho
Copy link
Copy Markdown
Collaborator

@tellaho tellaho commented Apr 23, 2026

Category: fix
User Impact: Desktop users now choose a theme directly, and Sprout keeps using that theme until they pick a different one.
Problem: The Appearance settings copy implied that Sprout would auto-detect light and dark mode, but the desktop app was really persisting a concrete theme selection. That made the theme picker feel misleading even when it was mostly working.
Solution: Update the desktop theme flow so the saved theme is treated as the explicit source of truth from startup, rewrite the Appearance copy to match that behavior, and keep the existing user accent override intact.

File changes

desktop/src/features/settings/ui/SettingsPanels.tsx
Rewords Appearance so it describes an explicit theme choice instead of system-driven mode switching. Keeps the theme selector and accent swatches behaving the way users already expect.

desktop/src/main.tsx
Removes the redundant default theme prop now that the provider owns the default selection internally.

desktop/src/shared/theme/ThemeProvider.tsx
Makes the saved theme the startup source of truth, keeps cached theme vars versioned, and reapplies the saved accent after theme changes. This is the core behavior change that makes the picker mean “this is your theme” while preserving accent customization.

desktop/src/shared/theme/theme-loader.ts
Cleans up theme metadata extraction helpers used by the provider during theme application.

desktop/tests/e2e/profile.spec.ts
Updates the settings Playwright coverage to assert the real contract: theme selection persists, and a user-picked accent survives later theme changes.

  1. Open the desktop app and use Cmd+, on macOS or Ctrl+, on other platforms.
  2. Open the Appearance section in Settings.
  3. Confirm the copy says your theme stays active until you choose another one.
  4. Pick GitHub Light and confirm the app switches to that theme.
  5. Pick a non-default accent color and confirm the accent changes.
  6. Pick Dracula and confirm the theme changes while the chosen accent stays in place.
  7. Reopen the app and confirm the same theme and accent are restored.

Remove the auto-detected light/dark promise from Appearance and treat the
saved theme as the source of truth during startup so the shell comes up
with the selected palette instead of a system-driven fallback.

Keep user-selected accent colors layered on top of the chosen theme and
cover both theme persistence and accent persistence in the Playwright
settings flow.
@tellaho tellaho changed the title make desktop theme selection explicit fix: make desktop theme selection explicit Apr 23, 2026
@tellaho tellaho changed the title fix: make desktop theme selection explicit clarify desktop theme picker behavior Apr 23, 2026
@tellaho
Copy link
Copy Markdown
Collaborator Author

tellaho commented Apr 23, 2026

Closing, I was running into theme-switching not working. But it looks like I just needed to rebuild and get the latest from main? ¯_(ツ)_/¯

@tellaho tellaho closed this Apr 23, 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.

1 participant