Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Jan 16, 2026

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

  • ThemeContext
    • Persist theme ("system" | "light" | "dark" | "flexoki-light" | "flexoki-dark") in localStorage["uiTheme"] (default: "system")
    • Track OS theme via matchMedia("(prefers-color-scheme: light)") and expose resolvedTheme (never "system")
    • Self-heal unknown/legacy stored values → "system"
  • Early theme bootstrap (index.html, terminal.html): resolve "system" to "light"/"dark" before React renders (avoid FOUC)
  • Terminal window: wraps in ThemeProvider so it matches the app + follows OS in System mode
  • UI wiring
    • Settings + command palette include System alongside the existing explicit themes
    • Components that depend on actual appearance (logo, syntax highlighting, etc) use resolvedTheme

Testing

  • Set theme = System; flip OS theme → UI updates without reload (main + terminal window)
  • Set theme = Light/Dark/Flexoki; flip OS theme → UI stays fixed

Generated with mux • Model: openai:gpt-5.2 • Thinking: xhigh • Cost: $14.21

@github-actions github-actions bot added enhancement New feature or functionality community issue from community member labels Jan 16, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@ibetitsmike
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ 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".

- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community issue from community member enhancement New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant