Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Keep the existing tint behind the composer and refresh it when the terminal's default foreground and background change during a Codex session. This addresses the Unix TUI behavior described in openai/codex#45163.
Read OSC 10/11 replies through the same input stream as keys and bracketed paste. Apply a complete color pair, invalidate cached rendering and redraw. Subscribe to terminal theme-change notifications when available. VS Code 1.138.0 reports mode 2031 as unsupported even though it answers color queries, so a focused terminal with that response checks again after two seconds. Focus loss cancels the timer. Input after a missing focus-gained report resumes checks.
Verification
Measured the composer cell in actual macOS VS Code integrated terminal sessions. Each session kept the same draft while switching themes.
#333333#333333#333333#333333#EEEEEE#333333The draft progressed from
theme-checkAtotheme-checkABtotheme-checkABC. The new PTY cases exercise notification and focus-triggered refresh, the focused fallback, and mixed key, paste and palette input.Passed on macOS with the locked Cargo dependencies:
cargo build --locked -p codex-cli -p codex-tui --bin codex --bin codex-tuicargo test --locked -p codex-tui --test all focus_palette -- --test-threads=1(15 passed)cargo test --locked -p codex-tui --lib tui::event_stream(11 passed)The separate Bazel build stopped during the download of the aws-lc archive, so Bazel verification is still pending.