-
Notifications
You must be signed in to change notification settings - Fork 43
🤖 feat: add system theme matching (light/dark based on OS) #1707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1eaac5a31
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
3d826c6 to
f9630be
Compare
- Add 'System' theme preference that follows OS light/dark live - Persisted preference: 'system' | 'light' | 'dark' (defaults to 'system') - Live updates: subscribe to matchMedia changes when preference is 'system' - Update index.html and terminal.html early bootstrap for FOUC prevention - Wrap terminal window in ThemeProvider for theme consistency - Remove flexoki themes, keeping only light/dark - Self-heal invalid/legacy stored values to 'system'
When preference is 'system', toggling now switches to the opposite of the currently displayed theme, making the toggle button behavior intuitive. Clicking 'Switch to dark theme' always switches to dark.
Keep Flexoki Light/Dark themes alongside System/Light/Dark options. Toggle now cycles between light/dark variants of the current theme family: - light ↔ dark - flexoki-light ↔ flexoki-dark
…tTheme - ThemeMode now includes 'system' (user's selection) - ResolvedThemeMode for the actual applied theme (never 'system') - setTheme/theme for the user's preference - resolvedTheme for places that need the actual applied theme - Net LoC reduction (-36 lines)
f9630be to
a3e1d4f
Compare
Summary
Add a System theme option that follows the OS light/dark setting live (no reload). Keeps existing explicit themes (Light/Dark/Flexoki Light/Flexoki Dark).
Changes
theme("system" | "light" | "dark" | "flexoki-light" | "flexoki-dark") inlocalStorage["uiTheme"](default:"system")matchMedia("(prefers-color-scheme: light)")and exposeresolvedTheme(never"system")"system"index.html,terminal.html): resolve"system"to"light"/"dark"before React renders (avoid FOUC)ThemeProviderso it matches the app + follows OS in System moderesolvedThemeTesting
Generated with
mux• Model:openai:gpt-5.2• Thinking:xhigh• Cost:$14.21