Fix/opencode tui exit stuck terminal#9429
Fix/opencode tui exit stuck terminal#9429nkootstra wants to merge 3 commits intowarpdotdev:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @nkootstra on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and posted feedback on this pull request. Comment Powered by Oz |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Overview
This PR adds targeted recovery for terminal presentation modes when an unexpected OSC in-band command output end marker arrives, preserving the active command/block state while exiting alternate screen and conditionally unsetting bracketed paste. The added tests cover the OSC recovery path, internal cleanup behavior, active block state preservation, and avoiding redundant bracketed-paste unset events.
Concerns
- No blocking correctness or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
Hey @nkootstra, thanks for the PR! Question to help me better understand the context here:
Some of the existing comments vis-a-vis bracketed paste have to do with what happens when there's an SSH disconnection. Is that the context for the |
|
This reproduces in a fully-local session, not over SSH. My repro was Warp on macOS with local zsh, running I also checked the PR description and linked issue context: the repro path is local Warp/macOS/zsh running P.S. This was a fresh install. Since Warp is open source, I wanted to try it on my work MacBook. This was my first experience with Warp on this machine, and I noticed the same issue once more today. |
|
gotcha, interesting. i'm not able to trivially reproduce this on my machine, unfortunately. i'd like to understand why you're getting the in-band output OSC instead of |
|
@nkootstra would you mind reproducing this again (perhaps with a local build) and then sharing the logs with us? i want to make sure we understand why your instance of warp is in this state instead of us just papering over what feels like a larger underlying bug with a fix for the symptoms. |
Description
Fixes #9426.
Recover terminal presentation modes when Warp receives an unexpected in-band command output end marker from the Warp OSC sequence. This prevents Warp from remaining stuck on a blank alternate-screen-style view after
opencodeexits or tears down without the normalCommandFinished/Precmdshell lifecycle.This intentionally only restores presentation state:
CommandFinishedThe recovery is limited to the real OSC marker path and does not run for internal cleanup calls.
Testing
Added focused terminal model tests covering:
Ran:
cargo fmt --checkDEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" cargo test -p warp in_band_command_output_endDEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" cargo test -p warp terminal::model::terminal_model::testsAlso ran:
DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" cargo test -p warpThe full
warpcrate test suite completed with unrelated existing failures:3604 passed,9 failed,6 ignored. The failures were outside the touched terminal model recovery path.Also fix your later headers/checklist formatting:
Server API dependencies
No server API dependencies.
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Fixed an issue where Warp could remain stuck on a blank alternate-screen view after
opencodeexits.