fix(ui): stop scrolling on leaving workflow sidebar for drag-drop#4139
fix(ui): stop scrolling on leaving workflow sidebar for drag-drop#4139TheodoreSpeaks merged 6 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit e70844f. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds a Confidence Score: 5/5Safe to merge — the fix is minimal, correctly scoped, and idempotent. The new No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Browser
participant ScrollContainer
participant useDragDrop
User->>Browser: Drag file/item over sidebar
Browser->>ScrollContainer: dragover event
ScrollContainer->>useDragDrop: initDragOver() → isDragging = true
useDragDrop->>useDragDrop: useEffect attaches dragleave listener
loop Auto-scroll loop (while isDragging)
useDragDrop->>ScrollContainer: requestAnimationFrame(handleAutoScroll)
end
User->>Browser: Drag cursor leaves container boundary
Browser->>ScrollContainer: dragleave (relatedTarget = null or outside)
ScrollContainer->>useDragDrop: onLeave() → !container.contains(related)
useDragDrop->>useDragDrop: handleDragEnd() → isDragging = false
useDragDrop->>useDragDrop: useEffect cleanup removes dragleave listener
useDragDrop->>ScrollContainer: cancelAnimationFrame (auto-scroll stops)
Reviews (1): Last reviewed commit: "fix(ui): stop scrolling on leaving workf..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6d5cad0. Configure here.

Summary
Currently dragging and dropping a file past a scrollable workflow sidebar causes the sidebar to continuously scroll. Switched this to stop scrolling on leaving the container to prevent the issue.
Type of Change
Testing
Checklist
Screenshots/Videos