fix: guard terminal renderer sync during drag#224
Merged
DeadWaveWave merged 5 commits intomainfrom May 3, 2026
Merged
Conversation
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.
💡 Change Scope
📝 What Does This PR Do?
Fixes the renderer crash that could happen while dragging a task/node when the embedded terminal renderer is transiently detached.
This branch also hardens the regression coverage around the same canvas interaction surface:
🏗️ Large Change Spec (Required if "Large Change" is checked)
1. Context & Business Logic
Dragging a canvas task can temporarily detach the xterm renderer subtree while drag/geometry synchronization is still flushing. The renderer must treat that detach as a harmless transient state instead of trying to reconcile against a missing renderer and crashing the React tree. The surrounding canvas regression coverage also needs to stay stable enough for
pnpm pre-committo prove the bug stays fixed.2. State Ownership & Invariants
spaceFit=keepmust remain side-effect free when there is not enough room.3. Verification Plan & Regression Layer
pnpm pre-commit(exit 0)pnpm exec playwright test tests/e2e/workspace-canvas.arrange.space.spec.ts --project electron --reporter=line -g "warns and keeps layout unchanged when arrange-in-space keep-fit has no room" --repeat-each=8pnpm test -- --run tests/unit/contexts/workspaceCanvasNodeResizeLayout.spec.ts✅ Delivery & Compliance Checklist
pnpm pre-commitis completely green.CLA.md).DEVELOPMENT.mdarchitectural boundaries.📸 Screenshots / Visual Evidence
Not attached from CLI. Regression proof is covered by Playwright + unit tests in this branch.