René's URL Explorer Experiment


Title: fix(canvas): order subflow containers ahead of their children before render by icecrasher321 · Pull Request #7468 · simstudioai/sim · GitHub

Open Graph Title: fix(canvas): order subflow containers ahead of their children before render by icecrasher321 · Pull Request #7468 · simstudioai/sim

X Title: fix(canvas): order subflow containers ahead of their children before render by icecrasher321 · Pull Request #7468 · simstudioai/sim

Description: Summary A block nested inside a Loop or Parallel jumped out of its container on any click, rendering over the top-left of the canvas, and only returned when it was hovered or re-selected. React Flow v12 resolves a child node's absolute position in a single pass over the nodes array, against parents it has already adopted. A child listed before its container has its container-relative offset treated as absolute, and logs Parent node not found. v11 resolved positions in a second pass, so order never mattered — this surfaced with the v12 upgrade. Blocks arrive in database row order, so a block created before the container it was later dragged into precedes that container. Every click rebuilds the node objects, which re-runs adoption; only a re-measurement (the hover swell, a selection ring) corrected the position, which is what made it look like a flicker. Adds sortNodesParentsFirst to @sim/workflow-renderer and applies it to the array each mount adopts — the editor canvas and the workspace preview. The preview's own depth sort is replaced by the shared helper. Already-ordered arrays are returned as-is, and a reorder sorts a copy, so canvas state is never sorted in place. The docs previews are unaffected: they render nested blocks at absolute coordinates and never set a node-level parentId. Type of Change Bug fix Testing Reproduced and verified in the editor with a local workflow whose child row precedes its container row. Before the change, one click on any block moved the nested block to its container-relative offset and left it there until hovered, with Parent node not found warnings on every click. After the change the block stays in place across click, hover, select, and pane-click, with no warnings and no position mutations. A control workflow with the rows in the other order behaves identically before and after. Subflow resizing was checked explicitly, since it is the behavior most likely to be disturbed by a node-ordering change. Dragging a child within its container and back, for both Loop and Parallel and both row orders, gives the rendered container size below. Container dimensions are recomputed from the children and written to the local store, so this is measured on the rendered box rather than persisted state. Scenario Before After Loop, container row first 499x392 to 575x396 and back identical Parallel, container row first 499x392 to 575x396 and back identical Loop, child row first never resized now matches the row-first case Parallel, child row first never resized now matches the row-first case Every size matches what calculateContainerDimensions should produce for the child's position, the child stays parented and inside the container throughout, and the two previously failing scenarios go from 76 and 78 Parent node not found warnings to zero. bun run type-check — 26/26 packages bun run lint, bun run check:audits (45 audits), docs-manifest:check, block-registry check — all pass packages/workflow-renderer — 129 tests, including 7 new for the helper (already-ordered arrays keep identity, nested chains, orphans, cycles, no input mutation) apps/sim workspace suite — 262 files, 2803 tests 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 A block nested inside a Loop or Parallel jumped out of its container on any click, rendering over the top-left of the canvas, and only returned when it was hovered or re-selected. React Fl...

X Description: Summary A block nested inside a Loop or Parallel jumped out of its container on any click, rendering over the top-left of the canvas, and only returned when it was hovered or re-selected. React Fl...

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

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:7ead4685-e4d8-8def-309d-beff24b36363
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id83C2:3D53D8:B7F1C8:FC7DE9:6AFB52E1
html-safe-nonce0985683aebf73f4bf730bf354379aa153c66dfd5bc9c868cf1de4e2cdf46cecb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0MyOjNENTNEODpCN0YxQzg6RkM3REU5OjZBRkI1MkUxIiwidmlzaXRvcl9pZCI6IjQ3MjgwNzkxODcyNjcyNDQ3NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd7953b003dd3191329b22c36893180528ff023cdeb6a160ad4409b34acab01a8
hovercard-subject-tagpull_request:4438322494
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/7468/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altSummary A block nested inside a Loop or Parallel jumped out of its container on any click, rendering over the top-left of the canvas, and only returned when it was hovered or re-selected. React Fl...
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/7468/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7468%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%2F7468%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/7468/files
Reloadhttps://github.com/simstudioai/sim/pull/7468/files
Reloadhttps://github.com/simstudioai/sim/pull/7468/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
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
fix/canvas-parent-node-orderhttps://github.com/simstudioai/sim/tree/fix/canvas-parent-node-order
Conversation 2 https://github.com/simstudioai/sim/pull/7468
Commits 1 https://github.com/simstudioai/sim/pull/7468/commits
Checks 32 https://github.com/simstudioai/sim/pull/7468/checks
Files changed https://github.com/simstudioai/sim/pull/7468/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7468/files
fix(canvas): order subflow containers ahead of their children before render https://github.com/simstudioai/sim/pull/7468/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/7468/files
46e7e32 fix(canvas): order subflow containers ahead of their children before … Sep 4, 2026 https://github.com/simstudioai/sim/pull/7468/commits/46e7e32a085092993020177c1199d7ab4af9fd1b
Clear filters https://github.com/simstudioai/sim/pull/7468/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7468/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7468/files
workflow.tsx https://github.com/simstudioai/sim/pull/7468/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
preview-workflow.tsx https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
index.ts https://github.com/simstudioai/sim/pull/7468/files#diff-d233bbee51d204be15030530fc4b05bd87f10cd6d53b4ff42aaacaa5c1b8a221
node-order.test.ts https://github.com/simstudioai/sim/pull/7468/files#diff-4013f6496bbaedd11d0d9b73c78cdfd2c6096e7a6561c79387a7fb1edd6ce231
node-order.ts https://github.com/simstudioai/sim/pull/7468/files#diff-a2ccbb85b4e45f95863f949d306caf1c3faa77daa414b824e5ff1f5ec9754f29
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsxhttps://github.com/simstudioai/sim/pull/7468/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
View file https://github.com/simstudioai/sim/blob/46e7e32a085092993020177c1199d7ab4af9fd1b/apps/sim/app/workspace/%5BworkspaceId%5D/w/%5BworkflowId%5D/workflow.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7468/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7468/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
https://github.com/simstudioai/sim/pull/7468/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
https://github.com/simstudioai/sim/pull/7468/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
https://github.com/simstudioai/sim/pull/7468/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
...space/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsxhttps://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
View file https://github.com/simstudioai/sim/blob/46e7e32a085092993020177c1199d7ab4af9fd1b/apps/sim/app/workspace/%5BworkspaceId%5D/w/components/preview/components/preview-workflow/preview-workflow.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7468/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
https://github.com/simstudioai/sim/pull/7468/files#diff-ecca0de88f754dc68fef46384e0b72434a59a628b3a92c63264f2d09efe6486d
packages/workflow-renderer/src/index.tshttps://github.com/simstudioai/sim/pull/7468/files#diff-d233bbee51d204be15030530fc4b05bd87f10cd6d53b4ff42aaacaa5c1b8a221
View file https://github.com/simstudioai/sim/blob/46e7e32a085092993020177c1199d7ab4af9fd1b/packages/workflow-renderer/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7468/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7468/files#diff-d233bbee51d204be15030530fc4b05bd87f10cd6d53b4ff42aaacaa5c1b8a221
https://github.com/simstudioai/sim/pull/7468/files#diff-d233bbee51d204be15030530fc4b05bd87f10cd6d53b4ff42aaacaa5c1b8a221
packages/workflow-renderer/src/node-order.test.tshttps://github.com/simstudioai/sim/pull/7468/files#diff-4013f6496bbaedd11d0d9b73c78cdfd2c6096e7a6561c79387a7fb1edd6ce231
View file https://github.com/simstudioai/sim/blob/46e7e32a085092993020177c1199d7ab4af9fd1b/packages/workflow-renderer/src/node-order.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7468/{{ revealButtonHref }}
packages/workflow-renderer/src/node-order.tshttps://github.com/simstudioai/sim/pull/7468/files#diff-a2ccbb85b4e45f95863f949d306caf1c3faa77daa414b824e5ff1f5ec9754f29
View file https://github.com/simstudioai/sim/blob/46e7e32a085092993020177c1199d7ab4af9fd1b/packages/workflow-renderer/src/node-order.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7468/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/7468/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.