-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Defer backtrack trim until rollback confirms #9401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@codex review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d514f8089
ℹ️ 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".
| if self.backtrack.pending_rollback.is_some() { | ||
| self.chat_widget | ||
| .add_error_message("Backtrack rollback already in progress.".to_string()); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset pending rollback when session changes
The new pending_rollback guard blocks any subsequent backtrack once a rollback is in flight, but it only clears on ThreadRolledBack or ThreadRollbackFailed. If the user starts a new session/resume or the thread is shut down before that event arrives, the old thread never emits either event, so pending_rollback remains set and every future backtrack shows “already in progress.” Consider clearing pending rollback when switching/shutting down threads (or when the thread id changes) to avoid permanently disabling backtrack after an interrupted rollback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex review this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
- Added a helper to clear pending backtrack rollbacks when a thread shuts down to avoid stale rollback state across sessions. codex-rs/tui/src/app.rsL363-L370 codex-rs/tui/src/app_backtrack.rsL336-L356
Testing
- ✅
PATH="$HOME/.cargo/bin:$PATH" just fmt - ✅
PATH="$HOME/.cargo/bin:$PATH" just fix -p codex-tui - ✅
cargo test -p codex-tui(warned about legacy snapshot format in output)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d514f8089
ℹ️ 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 this |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ 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". |
|
@codex add in code docs and comments explaining the code and the overall goal. |
|
Summary
Testing
|
joshka-oai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a bit more docs in cf8fc3f
Uh oh!
There was an error while loading. Please reload this page.