Title: fix(sidebar): reset drag state on dragend so edge drop zones can't strand over first/last rows by waleedlatif1 · Pull Request #5774 · simstudioai/sim · GitHub
Open Graph Title: fix(sidebar): reset drag state on dragend so edge drop zones can't strand over first/last rows by waleedlatif1 · Pull Request #5774 · simstudioai/sim
X Title: fix(sidebar): reset drag state on dragend so edge drop zones can't strand over first/last rows by waleedlatif1 · Pull Request #5774 · simstudioai/sim
Description: Summary Fixes the reported bug where you can only start dragging the top-most / bottom-most workflow or folder in the sidebar by grabbing the far edge of the row. Root cause: the two absolutely-positioned edge drop zones (workflow-list.tsx) render at z-30 over the top/bottom 12px of the first/last row, but only while isDragging is true. isDragging could get stranded true: any non-sidebar drag that passes over the list flips it on via initDragOver, and the drag-active reset only listened for drop — never dragend. A drag that ended without a drop inside the list (Esc-cancel or a drop on a non-droppable target) left isDragging stuck, so the overlays stayed mounted at rest and stole the grab band of the first/last rows. This is the "collision of collider boxes," why it's specific to top/bottom, and why folder-expansion state made it come and go. Fix: add a window-level dragend reset alongside the existing drop reset. dragend fires on the source at the end of every drag operation, so isDragging can never be stranded for an in-document drag source. Type of Change Bug fix Testing Added use-drag-drop.test.tsx: reproduces the stranded-drag scenario — fails without the fix (isDragging stays true after dragend), passes with it — plus a guard that a plain dragover doesn't tear down an active drag. Type-check clean; new tests green. Behavior-preserving: the listener attaches only during an active sidebar drag, only resets this hook's own state, doesn't preventDefault/stopPropagation, is idempotent with the existing drop/item-onDragEnd resets, fires only at the true end of a drag, and is cleaned up on unmount. Note: covers all in-document drag sources (the realistic trigger). An OS-file drag that enters the list and then leaves the window without dropping is a theoretical residual not addressed here, since resetting on window dragleave would risk tearing down legitimate in-progress drags. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Fixes the reported bug where you can only start dragging the top-most / bottom-most workflow or folder in the sidebar by grabbing the far edge of the row. Root cause: the two absolutely-po...
X Description: Summary Fixes the reported bug where you can only start dragging the top-most / bottom-most workflow or folder in the sidebar by grabbing the far edge of the row. Root cause: the two absolutely-po...
Opengraph URL: https://github.com/simstudioai/sim/pull/5774
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9710ef46-5a47-4841-7c86-b1edd894d56c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A9F0:189C83:C7BA9B:11D4FEB:6A632B68 |
| html-safe-nonce | 95bff9f1e929ecf02efb75a44ec65d5144f66c03c9555b7a61df232816bcdbe9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUYwOjE4OUM4MzpDN0JBOUI6MTFENEZFQjo2QTYzMkI2OCIsInZpc2l0b3JfaWQiOiIyODYxOTc1NTQ5OTQ2MDQ3MzM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6c5cda78b6ef7030d876152f2ce5ecefa67c1c3776ec645e48818ef5d26220b2 |
| hovercard-subject-tag | pull_request:4094458134 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5774/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Fixes the reported bug where you can only start dragging the top-most / bottom-most workflow or folder in the sidebar by grabbing the far edge of the row. Root cause: the two absolutely-po... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 30c644d502bce6cd2e59f9000b4744f2b64819abea8e8f959b18e3ad793125aa |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 331492a48ebd91d66ef2de38e1901bb911c9fe9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width