Skip to content

fix(tui): detect macOS light mode for system theme#1674

Closed
Aitensa wants to merge 2 commits into
Hmbown:mainfrom
Aitensa:issue-1670-macos-system-theme
Closed

fix(tui): detect macOS light mode for system theme#1674
Aitensa wants to merge 2 commits into
Hmbown:mainfrom
Aitensa:issue-1670-macos-system-theme

Conversation

@Aitensa

@Aitensa Aitensa commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fall back to macOS appearance detection when theme = "system" cannot infer light/dark mode from COLORFGBG
  • treat a missing AppleInterfaceStyle key as Light mode, matching macOS defaults
  • add regression tests covering source precedence and the macOS fallback mapping

Testing

  • cargo fmt --all --check
  • cargo test --all-features
  • cargo clippy --all-targets --all-features
  • cargo test -p deepseek-tui --bin deepseek-tui palette_mode_ --locked
  • cargo test -p deepseek-tui --bin deepseek-tui apple_interface_style_maps_dark_and_missing_key_to_expected_modes --locked
  • cargo test -p deepseek-tui --bin deepseek-tui ui_theme_selects_light_variant --locked

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes

Fixes #1670.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@Hmbown Hmbown added this to the v0.8.39 milestone May 15, 2026
@Hmbown

Hmbown commented May 17, 2026

Copy link
Copy Markdown
Owner

Thanks for the macOS system-theme fallback. The fix was harvested into v0.8.39 via #1734 and credited in the changelog, so I am closing this PR to keep the queue clean. Please reopen if latest still detects dark mode on macOS Light with Ghostty and no COLORFGBG.

@Hmbown Hmbown closed this May 17, 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.

theme = "system" detects dark on macOS Light mode with Ghostty

2 participants