Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion codex-rs/tui/src/terminal_palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ mod imp {
use super::DefaultColors;

pub(super) fn default_colors() -> Option<DefaultColors> {
None
// Windows terminals don't support ANSI color queries (OSC 10/11).
// Use a dark fallback since most modern terminals default to dark themes.
Some(DefaultColors {
fg: (255, 255, 255), // White foreground
bg: (0, 0, 0), // Black background (dark theme)
Comment on lines +148 to +150
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid forcing black background on light-themed Windows

On Windows terminals configured with a light background (common when users switch to light themes), this hardcoded (0,0,0) fallback causes user_message_style_for to always apply a dark background while leaving the foreground at the terminal default (often dark text), producing low‑contrast/near‑invisible user input blocks. Previously returning None avoided setting any background in this case. Consider preserving None or making the fallback configurable/detectable so light‑theme terminals don’t end up with dark‑on‑dark text.

Useful? React with 👍 / 👎.

})
}

pub(super) fn requery_default_colors() {}
Expand Down
Loading