fix(tui): restore TUI after suspend#28342
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8cd57a5c7b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 044954fb61
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b815ab6 to
8abb3af
Compare
etraut-openai
left a comment
There was a problem hiding this comment.
Approach looks reasonable, and code looks good.
Why
On Linux, suspending Codex with
Ctrl+Zand returning withfgcan leave the composer misaligned or inject terminal response bytes such as focus reports into the prompt. Shell job-control output moves the cursor while Codex is suspended, and terminal input polling can race with the responses used to restore the inline viewport.Fixes #26564.
What changed
fghandofffgcursor position with the tolerant terminal-response parser, then realign the inline viewport before redrawingHow to Test
just c.Ctrl+Z, run any harmless shell command, then runfg.Targeted tests:
cargo test -p codex-tui --lib parses_cursor_position_as_zero_based -j 1cargo test -p codex-tui --lib tui::event_stream::tests -j 1