Skip to content

Conversation

@slkzgm
Copy link
Contributor

@slkzgm slkzgm commented Jan 11, 2026

Fixes #9058

Summary

When the transcript backtrack preview is armed (press Esc), allow navigating to newer user messages with the arrow, in addition to navigating backwards with Esc/, before confirming with Enter.

Changes

  • Backtrack preview navigation: Esc/ steps to older user messages, steps to newer ones, Enter edits the selected message (clamped at bounds, no wrap-around).
  • Transcript overlay footer hints updated to advertise esc/←, , and enter when a message is highlighted.

Related

Testing

  • just fmt
  • just fix -p codex-tui
  • just fix -p codex-tui2
  • cargo test -p codex-tui app_backtrack::
  • cargo test -p codex-tui pager_overlay::
  • cargo test -p codex-tui2 app_backtrack::
  • cargo test -p codex-tui2 pager_overlay::

@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@slkzgm
Copy link
Contributor Author

slkzgm commented Jan 11, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 11, 2026
@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Hooray!

ℹ️ 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".

@slkzgm
Copy link
Contributor Author

slkzgm commented Jan 15, 2026

Thanks @etraut for resolving conflicts, much appreciated.

I pushed a small follow-up commit on top to fix the forward-step highlight path and keep the WSL helper import gated under cfg(not(test)).

@joshka-oai
Copy link
Collaborator

Let’s split this PR into two parts.

The WSL-related issue is orthogonal to the Esc / backtrack behavior and would be better addressed in a separate change. Keeping them together makes the scope harder to reason about and review, and they likely have different root causes and fixes.

If we can isolate the backtrack navigation changes here and handle the WSL behavior independently, that will make both paths clearer and easier to validate.

When the backtrack preview is armed (Esc), allow moving to newer user messages with Right arrow, and to older messages with Esc/Left arrow, before confirming with Enter.

Also updates the transcript overlay footer hints and tests.
Ensure the forward step in transcript backtrack preview only updates the highlight selection.
@slkzgm
Copy link
Contributor Author

slkzgm commented Jan 16, 2026

Thanks! Split done as suggested: this PR now contains only the backtrack navigation + transcript overlay hints. The WSL snapshot determinism change is in #9359 (tracking issue: #9361).

@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ 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".

Copy link
Collaborator

@joshka-oai joshka-oai left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the PR (resolved the merge conclict and will ship)

@joshka-oai joshka-oai enabled auto-merge (squash) January 18, 2026 04:04
@joshka-oai joshka-oai merged commit 0a568a4 into openai:main Jan 18, 2026
45 of 53 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI backtrack: can't navigate forward after overshooting

3 participants