perf(terminal): use RestoreBlocks stage in insert_restored_block#13112
perf(terminal): use RestoreBlocks stage in insert_restored_block#13112acarl005 wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This comment was marked as resolved.
This comment was marked as resolved.
3fd5226 to
07b7b3b
Compare
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review 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 changes restored block insertion to use BootstrapStage::RestoreBlocks and removes the unconditional reset-grid-check disable from restore_block.
Concerns
- Removing
disable_reset_grid_checks()insiderestore_blockaffects existing shared-session scrollback callers that still restore blocks withBootstrapStage::PostBootstrapPrecmd, leaving Windows reset-grid assertions enabled while replaying serialized bytes. - This is user-facing terminal restoration behavior, but the PR description only includes textual manual testing. For this user-facing change, please include screenshots or a short recording demonstrating restored blocks rendering correctly end to end.
- No approved spec context was provided, and the supplemental security pass found no additional security issues.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| self.active_block_mut().start_background(None); | ||
| } else { | ||
| self.active_block_mut().start(); | ||
| self.active_block_mut().disable_reset_grid_checks(); |
There was a problem hiding this comment.
restore_block callers, but shared-session scrollback still passes BootstrapStage::PostBootstrapPrecmd; on Windows that keeps reset-grid checks enabled while replaying serialized command/output bytes that do not necessarily include a reset-grid OSC. Keep this disable for the PostBootstrapPrecmd restore paths, or otherwise limit the optimization to RestoreBlocks callers.
07b7b3b to
cc6d905
Compare
90448a3 to
75061d8
Compare

Description
Part of a stack of performance fixes for #9799.
This PR:
insert_restored_blockwas callingrestore_blockwithBootstrapStage::PostBootstrapPrecmd, which causesBlock::newto setPerformResetGridChecks::Yes(the Windows ConPTY path). This meant a redundantdisable_reset_grid_checks()call was needed afterward before parsing the serialized command/output bytes.Passing
BootstrapStage::RestoreBlocksinstead is semantically correct (these blocks are being restored, not coming in post-bootstrap), and sinceRestoreBlocks.is_done() == false,Block::newsetsPerformResetGridChecks::Noautomatically. The now-redundantdisable_reset_grid_checks()call insiderestore_blockis removed.Linked Issue
Fixes #9799
ready-to-specorready-to-implement.Testing
Manually loaded a conversation with 3014 AI exchanges and verified correct rendering of restored blocks.
./script/runAgent Mode