[Bug]: Color theme switcher: named themes muted by window transparency, System choice can keep the old mode, native background ignores theme
What went wrong?
The color theme switcher looks broken in several ways:
1. Named themes barely change the app with window transparency on (macOS default). Window transparency has been on by default since #7647 (window-translucency.ts:10). With it on:
bodysets the canvas, sidebar and terminal backgrounds totransparent, andmuted/secondary/accentto 5–8% foreground mixes (styles.css:6384-6398);- the whole shell is one
--ao-shell-tint(70%--sidebar) over the blurred desktop (styles.css:6360-6372); - in dark mode the center panel stays clear too (only light restores solid panels,
styles.css:6427).
Switching Nord → Gruvbox → Dracula mostly changes text and accent colors, while the canvas that makes a theme recognizable hardly moves. The picker swatch shows the solid palette, so the choice looks like it did not apply.
2. Choosing System from Light or Dark can keep the old mode.
setThemePreference(ui-store.ts:589-601) resolves"system"viaprefers-color-scheme(theme.ts:16-19).- Electron's
nativeTheme.themeSourceis still the old forced value at that point, which forces the media query. It is only reset to"system"inonReveal(main.ts:3425-3430): racing the View Transition update on opaque windows (theme.ts:137-140), after it on translucent ones (theme.ts:165). - The
changelistener that would correct it registers only after React commits (_shell.tsx:1286-1293), so an early change event is lost. - The app stays in the old mode while the menu says System, until the OS appearance changes or the app restarts.
3. The native window background ignores the color theme. The effect that syncs the native background to --sidebar depends on [resolvedTheme, windowTranslucent] only (_shell.tsx:1270-1278). After a color-theme change, the native background keeps the previous theme's color, which shows during resize, full screen and reload (opaque windows, Windows/Linux).
Smaller:
- Cmd+K "Toggle theme" switches to explicit Light/Dark and drops System (
CommandPalette.tsx:888). XtermTerminal.tsx:773-774re-applies the document theme on terminal mount, which ends an in-progress theme preview.
Steps to reproduce
- macOS, default settings (transparency on), dark mode. Open Settings › Appearance and cycle color themes; compare with transparency off.
- Set the OS to Light and the app to Dark, then choose System. The app can stay dark.
- Turn transparency off, switch Orchestrate → Solarized, then resize quickly or toggle full screen. The window edge flashes the old theme's color.
Expected behavior
- A named theme is clearly recognizable with transparency on, for example via a stronger tint or a solid center panel when a named theme is active. The look of the default Orchestrate theme stays unchanged.
- Choosing System always lands on the OS appearance without a restart.
- The native window background follows both the mode and the color theme.
- Toggle theme respects System; a terminal mount does not cancel a theme preview.
Version
main at 8207c224b5.