fix: disable reset grid checks for restored blocks on Windows#9987
fix: disable reset grid checks for restored blocks on Windows#9987
Conversation
On Windows, ConPTY maintains an internal grid that must be kept in sync with Warp's grids via a Reset Grid OSC. A debug assert in GridHandler::input() verifies this OSC was received before any input. When a conversation is handed off from Web to native (or blocks are restored from serialized data), the block content is parsed from serialized bytes rather than from ConPTY output, so the Reset Grid OSC is never sent. This caused the debug assert to fire with the panic message 'Grid received input but did not receive Reset Grid OSC'. Fix: call disable_reset_grid_checks() on restored blocks after start(), matching the existing pattern used for background blocks. This applies to both restore_block() (session restoration, shared session scrollback, web-to-native handoff) and create_restored_command_block() (AI conversation command blocks). Co-Authored-By: Oz <oz-agent@warp.dev>
71c1327 to
7c56cdb
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR exposes the existing reset-grid-check disable helper within the terminal model module and applies it to restored non-background blocks before serialized command/output bytes are replayed. That matches the existing background-block behavior for code paths that reconstruct grids without ConPTY output.
Concerns
- No correctness, security, or error-handling 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
Description
Fix a Windows-only debug assert panic ("Grid received input but did not receive Reset Grid OSC") that fires when viewing a conversation on Web is handed off to the native client.
On Windows, ConPTY maintains an internal grid model that must be kept in sync with Warp's grids via a Reset Grid OSC. A
debug_assert!inGridHandler::input()verifies this OSC was received before any character input is processed.When a conversation is handed off from Web to native, the blocks are created from serialized data rather than from ConPTY output. Since no actual commands execute through ConPTY, the Reset Grid OSC is never sent, causing the assert to fire.
Fix: Call
disable_reset_grid_checks()on restored blocks afterstart(), matching the existing pattern already used for background blocks. This is applied in two code paths:restore_block()— used for session restoration, shared session scrollback, and web-to-native conversation handoffcreate_restored_command_block()— used for AI conversation command blocksLinked Issue
ready-to-specorready-to-implement.Testing
This is a targeted fix that disables a debug assert for code paths that don't go through ConPTY. The existing pattern (
start_backgroundalready callsdisable_reset_grid_checks) validates the approach. The code compiles and passescargo fmtchecks.Agent Mode
Conversation: https://staging.warp.dev/conversation/c1ffab67-45e7-4b0c-8641-ac6508585a21
Run: https://oz.staging.warp.dev/runs/019def4c-a123-716d-8018-4c82964c8137
This PR was generated with Oz.