Repository navigation
fix(tui): undo pending prompts and active sessions - #47343
Merged
Merged
Conversation
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
Co-authored-by: nexxeln <[email protected]>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix
/undoin the V2 TUI while a session is running:session.wait()before staging the revert. Interrupt acknowledgment alone does not mean execution cleanup has settled.Limited to the existing TUI undo handler; no Core/API changes or added tests.
Validation
Validated with OpenCode Drive 2.1.0 against the real TUI and isolated backend, using controlled simulated model responses:
Session is busyor missing-message error in the successful runs.Checks:
bun typecheckinpackages/tui, Prettier check on the changed file, andgit diff --checkall pass.Validated head:
a0154bcf7c30fcf2326e2dff226ec86c5e56492a(base:0e143437c88385fa69e233c3084fe1ca55415f70).Requested by: @nexxeln (nexxel via Slack)