Skip to content

Conversation

@aibrahim-oai
Copy link
Collaborator

@aibrahim-oai aibrahim-oai commented Jan 17, 2026

  • Defer backtrack transcript trimming until rollback success to avoid UI/core desync.
  • Track pending rollbacks, surface failures, and render after confirmed rollback.

@aibrahim-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +132 to +135
if self.backtrack.pending_rollback.is_some() {
self.chat_widget
.add_error_message("Backtrack rollback already in progress.".to_string());
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@codex review this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@codex fix

Copy link
Contributor

Choose a reason for hiding this comment

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

Summary

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)

View task →

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@aibrahim-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

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

@aibrahim-oai
Copy link
Collaborator Author

@codex add in code docs and comments explaining the code and the overall goal.

@chatgpt-codex-connector
Copy link
Contributor

Summary

  • Added module-level documentation and clarified the backtrack rollback guardrail/intent in the TUI backtrack handler to explain staged rollback confirmation and UI consistency goals. codex-rs/tui/src/app_backtrack.rsL1-L165
  • Mirrored the backtrack rollback documentation and inline comments in the TUI2 backtrack handler for consistent guidance on rollback confirmation and failure handling. codex-rs/tui2/src/app_backtrack.rsL1-L433

Testing

  • ~/.cargo/bin/just fmt
  • ~/.cargo/bin/just fix -p codex-tui
  • ~/.cargo/bin/just fix -p codex-tui2
  • cargo test -p codex-tui (failed: test suite reported failure)
  • cargo test -p codex-tui2 (failed: test suite reported failure)

View task →

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.

Added a bit more docs in cf8fc3f

@joshka-oai joshka-oai enabled auto-merge (squash) January 17, 2026 06:21
@joshka-oai joshka-oai merged commit 764f3c7 into main Jan 17, 2026
32 checks passed
@joshka-oai joshka-oai deleted the fix-backtrack-rollback-ui branch January 17, 2026 06:29
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 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.

3 participants