improvement(canvas): cancel an in-flight edge drag with Escape - #6669
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview While a handle drag is active, a capture-phase
Reviewed by Cursor Bugbot for commit d969652. Configure here. |
Greptile SummaryThe PR adds Escape-key cancellation for active canvas connection drags.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx | Adds scoped Escape handling and cancellation state to terminate an active connection drag without creating an edge or opening the block selector. |
Sequence Diagram
sequenceDiagram
participant User
participant Workflow as Workflow Canvas
participant RF as React Flow
User->>Workflow: Start connection drag
Workflow->>Workflow: Arm Escape listener
User->>Workflow: Press Escape
Workflow->>Workflow: Mark connection cancelled
Workflow->>RF: Dispatch synthetic mouseup
RF->>RF: Tear down connection drag
RF->>Workflow: onConnect / onConnectEnd
Workflow->>Workflow: Suppress edge and selector
Reviews (2): Last reviewed commit: "improvement(canvas): cancel an in-flight..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d969652. Configure here.
Summary
onConnect/onConnectEndare no-ops, so the drag leaves behind neither an edge nor the block selector, and the real mouseup that follows is inertType of Change
Testing
Type-check and lint pass. Not yet exercised in a browser — needs a manual pass on the canvas.
Checklist