Hide rewind preview when no user message exists#19510
Merged
etraut-openai merged 2 commits intomainfrom Apr 27, 2026
Merged
Conversation
Contributor
|
Awesome, thanks for the quick fix @etraut-openai! |
fcoury-oai
approved these changes
Apr 27, 2026
Contributor
fcoury-oai
left a comment
There was a problem hiding this comment.
Tested it for both cases: no messages and with some messages.
Code looks good as well. Approved.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Fixes #19508.
In a fresh TUI session, pressing
Esctwice entered the rewind transcript overlay even though there was no user message to rewind to. That produced an empty header-only transcript view and exposed a rewind flow that could not select a valid target.What changed
The backtrack flow now checks whether a user-message rewind target exists before opening the transcript preview. If no target exists, Codex stays in the main TUI and shows
No previous message to edit.instead of opening an empty overlay.The same guard applies when starting rewind preview from the transcript overlay, and the first
Escno longer advertises the “edit previous message” hint when there is no previous message available.Snapshot coverage was added for the unavailable rewind info message, along with a small target-detection test.