Repository navigation
Use thread rollback for Esc backtrack - #9140
Conversation
|
@codex review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7e4ee8b84
ℹ️ 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".
| self.chat_widget.submit_op(Op::ThreadRollback { num_turns }); | ||
| self.trim_transcript_for_backtrack(selection.nth_user_message); | ||
| if !selection.prefill.is_empty() { |
There was a problem hiding this comment.
Delay transcript trim until rollback is confirmed
Core rejects ThreadRollback when a turn is in progress (see handlers::thread_rollback), but apply_backtrack_rollback trims the local transcript and pre-fills the composer immediately after sending the op. If a user hits Esc quickly after submitting (before TurnStarted/is_task_running flips) and the rollback fails, the UI now hides turns that still exist in server history, so subsequent inputs are sent with a different context than what the user sees. Consider waiting for ThreadRolledBack or reverting on ThreadRollbackFailed before mutating the transcript.
Useful? React with 👍 / 👎.
| self.chat_widget.submit_op(Op::ThreadRollback { num_turns }); | ||
| self.trim_transcript_for_backtrack(selection.nth_user_message); | ||
| if !selection.prefill.is_empty() { |
There was a problem hiding this comment.
Delay transcript trim until rollback is confirmed
Core rejects ThreadRollback when a turn is in progress (see handlers::thread_rollback), but apply_backtrack_rollback trims the local transcript and pre-fills the composer immediately after sending the op. If a user hits Esc quickly after submitting (before TurnStarted/is_task_running flips) and the rollback fails, the UI now hides turns that still exist in server history, so subsequent inputs are sent with a different context than what the user sees. Consider waiting for ThreadRolledBack or reverting on ThreadRollbackFailed before mutating the transcript.
Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.