Repository navigation
fix(tui): guard Windows raw ANSI output - #23723
Closed
fcoury-oai wants to merge 1 commit into
Closed
fcoury-oai wants to merge 1 commit into
fcoury-oai wants to merge 1 commit into
Conversation
Contributor
|
Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
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.
Why
Several Windows reports show Codex TUI control sequences being rendered as visible text instead of being interpreted by the terminal. The affected startup shapes are still not fully pinned down: #23512 narrows one report to repo-conditioned startup, while #23031 and #23628 show the same raw-control-byte symptom in other startup contexts.
The boundary we can harden now is smaller and concrete. When Windows stdout is an inspectable console handle and VT processing is still disabled, raw ANSI-only TUI extras should not emit OSC, synchronized-update, alternate-screen, or inline-history control bytes into the user-visible terminal buffer.
What Changed
codex-terminal-detection.tui/src/raw_ansi.rs.codex doctorterminal details with Windows stdout console-mode visibility and VT-processing state without mutating terminal mode during the doctor run.When Codex has to degrade, the TUI keeps running on the safer paths and keeps transcript state in the app. The terminal scrollback/history insertion extras are the part that get skipped while Windows stdout VT output is not trustworthy.
How to Test
codex doctor --json.terminal.envdetails include Windows stdout console-mode visibility plus Windows stdout VT-processing state.ESC]0,ESC[?2026h, or scroll-region escape output.Targeted tests:
cargo test -p codex-tui raw_ansicargo test -p codex-cli terminal_check_reportscargo test -p codex-terminal-detection