Repository navigation
Resume conversation from an earlier point in history - #2588
aibrahim-oai wants to merge 11 commits into
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
[P1] Reset backtrack state when transcript overlay closes
[app.rs:170-175] Closing the transcript overlay with “q”, Ctrl‑T or Ctrl‑C leaves esc_backtrack_primed, esc_backtrack_base and esc_backtrack_count unchanged. close_transcript_overlay sets transcript_overlay_is_backtrack to false (lines 444‑455), but handle_tui_event tries to clear the state after calling this function only if transcript_overlay_is_backtrack is still true (lines 170‑176). The check therefore never executes, leaving the application in a primed state. Subsequent presses of Enter (with an empty composer) or Esc will unexpectedly fork the earlier conversation using stale counts and IDs.
[P1] NewSession does not clear Esc‑backtrack state
[app.rs:222-375] AppEvent::NewSession replaces the ChatWidget but does not reset the backtracking fields esc_backtrack_primed, esc_backtrack_base, or esc_backtrack_count (lines 222‑233). The Esc‑handling logic (lines 360‑376) assumes these fields start fresh for each session. If the user had primed backtracking in a previous session, the first Esc in the new session immediately opens the overlay using the previous conversation id, and confirming will fork that old conversation. The user cannot backtrack the current session until the stale state is manually cleared, and accidental confirmation forks the wrong conversation.
Reply with @codex fix comments to fix any unresolved comments.
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, or 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 fix this CI failure" or "@codex address that feedback".
This can be the underlying logic in order to start a conversation from a previous message. will need some love in the UI. Base for building this: #2588
based on #2575
Screen.Recording.2025-08-22.at.10.34.59.AM.mov