René's URL Explorer Experiment


Title: fix(sidebar): stop bubbled dragleave events cancelling an in-progress drag by waleedlatif1 · Pull Request #6679 · simstudioai/sim · GitHub

Open Graph Title: fix(sidebar): stop bubbled dragleave events cancelling an in-progress drag by waleedlatif1 · Pull Request #6679 · simstudioai/sim

X Title: fix(sidebar): stop bubbled dragleave events cancelling an in-progress drag by waleedlatif1 · Pull Request #6679 · simstudioai/sim

Description: Summary Fix drag-and-drop in the workflow sidebar silently doing nothing, which showed up most often when a folder was expanded Close folders that a drag spring-opened on its way past, instead of leaving them open Surface reorder failures instead of swallowing them, and report partial failures distinctly The drag bug dragleave bubbles, so a container-level listener fires for every descendant the pointer leaves — and Chrome reports relatedTarget as null on dragleave (Firefox populates it). Two places read "no related node" as "the drag left the list" and cleared the drop indicator; handleDrop bails on a null indicator, so releasing just after an internal boundary crossing did nothing at all. Rows nested inside an expanded folder sit behind three extra boundaries (content zone → spacing div → row wrapper), so an expanded folder made it dramatically more likely — which is why it read as "open folders break dragging". Both sites (the container listener and isLeavingElement, which backs the root drop zone's onDragLeave) now go through one predicate that falls back to hit-testing the pointer against the element box when relatedTarget is null. Spring-open revert Hovering a collapsed folder mid-drag opens it after 400ms, but nothing ever closed it again, so dragging past a folder left it permanently expanded. Folders opened this way are now tracked and closed on drag end, keeping the drop destination and its ancestors open. Runs on drop, Esc-cancel, and release-outside alike. Reorder failures Failures were logger.error only, so a failed reorder looked like the sidebar spontaneously undoing the move. Now a toast. Promise.all also became Promise.allSettled: with all, one rejection abandoned the sibling request while it was still in flight and committing anyway, so the caller could not distinguish a total failure from a half-applied one. This does not make the two reorder writes atomic — folders and workflows share one sortOrder index space but commit through separate endpoints. The proper fix is a single application operation writing both in one transaction, which needs a new contract, a migration of two legacy raw routes, and a merged optimistic-update handler. Filed separately rather than bundled here. Cleanup carried along Deleted a dead sibling cache: both its read and write were gated on !isDraggingRef.current, so it was written only at drop time and cleared by the next dragstart before anything read it — a 100% miss rate on every path Replaced a duplicated comparator with the existing exported compareByOrder from the sidebar's own utils Hoisted five closure-free callbacks to module scope, shortening the dependency chains that feed every row's handler factories Destructured mutateAsync off the reorder mutations: the mutation objects take a new identity on each state transition, so depending on them re-created every row's handler object mid-drop initDragOver now reads isDraggingRef rather than the state that lags it by a render, which also stabilises all six drop-zone factories for the whole drag Type of Change Bug fix Testing 8 unit tests covering both dragleave paths, the spring-open revert (including "drop landed inside" and "user opened it themselves"), and the existing stranded-drag reset. Each fix was verified by reverting it individually and confirming exactly the matching test goes red. Not verified in a browser — the diagnosis is from source plus tests reproducing the exact event shape. 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 Fix drag-and-drop in the workflow sidebar silently doing nothing, which showed up most often when a folder was expanded Close folders that a drag spring-opened on its way past, instead of ...

X Description: Summary Fix drag-and-drop in the workflow sidebar silently doing nothing, which showed up most often when a folder was expanded Close folders that a drag spring-opened on its way past, instead of ...

Opengraph URL: https://github.com/simstudioai/sim/pull/6679

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bc84c283-c8b0-f0c6-6ec0-b8cd85d787aa
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8AB8:2C34A2:20C1D9:2DE9C3:6AFB50B9
html-safe-nonce09d2d1791baedd3f4373e0f882b6c8fa41e3e951691c1e334f85e75fcd01828d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUI4OjJDMzRBMjoyMEMxRDk6MkRFOUMzOjZBRkI1MEI5IiwidmlzaXRvcl9pZCI6IjM2NDg0NDU1MDAzMzQ2MTQzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc0b19d6c4a743260277108d79ecdfe5cf6e226b38a05f4dcd282e6575e763807
hovercard-subject-tagpull_request:4275213387
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6679/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Fix drag-and-drop in the workflow sidebar silently doing nothing, which showed up most often when a folder was expanded Close folders that a drag spring-opened on its way past, instead of ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6679/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6679%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6679%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6679/files
Reloadhttps://github.com/simstudioai/sim/pull/6679/files
Reloadhttps://github.com/simstudioai/sim/pull/6679/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/sidebar-drag-drop-cleanuphttps://github.com/simstudioai/sim/tree/fix/sidebar-drag-drop-cleanup
Conversation 8 https://github.com/simstudioai/sim/pull/6679
Commits 3 https://github.com/simstudioai/sim/pull/6679/commits
Checks 30 https://github.com/simstudioai/sim/pull/6679/checks
Files changed https://github.com/simstudioai/sim/pull/6679/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6679/files
fix(sidebar): stop bubbled dragleave events cancelling an in-progress drag https://github.com/simstudioai/sim/pull/6679/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/6679/files
def9eab fix(sidebar): close folders a drag spring-opened, and surface reorder… waleedlatif1 Aug 13, 2026 https://github.com/simstudioai/sim/pull/6679/commits/def9eab2b50e12d17322997e537840f0f01c9bae
8b28504 fix(sidebar): stop bubbled dragleave events cancelling an in-progress… waleedlatif1 Aug 13, 2026 https://github.com/simstudioai/sim/pull/6679/commits/8b28504897fd6a06d3dd0aac7bccf542103c70a4
3250c57 fix(sidebar): disarm the spring-open timer when a drag ends waleedlatif1 Aug 13, 2026 https://github.com/simstudioai/sim/pull/6679/commits/3250c575190e8f294aebb41be87c79e5d0c202d7
Clear filters https://github.com/simstudioai/sim/pull/6679/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6679/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6679/files
use-drag-drop.test.tsx https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
use-drag-drop.ts https://github.com/simstudioai/sim/pull/6679/files#diff-186da33166956ca527ff233f3b02a5a8b9f84a48e515e3bd6fe26f94c2684b80
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-drag-drop.test.tsxhttps://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
View file https://github.com/simstudioai/sim/blob/3250c575190e8f294aebb41be87c79e5d0c202d7/apps/sim/app/workspace/%5BworkspaceId%5D/w/components/sidebar/hooks/use-drag-drop.test.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6679/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
https://github.com/simstudioai/sim/pull/6679/files#diff-dd9d6dea4cd689096a8775b75aa0a5f0bce90064794af70b500fada7246c734a
Please reload this pagehttps://github.com/simstudioai/sim/pull/6679/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6679/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.