Skip to content

Always wait for next tick before layout init#7591

Merged
AustinMroz merged 7 commits intomainfrom
austin/patient-vue-layout
Jan 21, 2026
Merged

Always wait for next tick before layout init#7591
AustinMroz merged 7 commits intomainfrom
austin/patient-vue-layout

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Dec 17, 2025

A frequent pattern is to add a node to the graph, and then update the nodes position afterwards.

Some of these cases (like subgraph unpacking) can set the node position in advance, but others, (like importA1111) require information on nodes in order to perform arranging.

Alternatives, like allowing code to either modify app.configuringGraph or otherwise set a temporary state were considered, but create the same problem of requiring fixes in many places.

As a proposed alternative, when a node is created, an extra tick of delay is always added before initializing layout.

┆Issue is synchronized with this Notion page by Unito

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

📝 Walkthrough

Walkthrough

Added guards and timing changes for node layout initialization: abort if a node is removed mid-sequence, re-read node data after workflow/configure completes before initializing layout, and defer layout init with requestAnimationFrame on the normal path. Public API unchanged.

Changes

Cohort / File(s) Summary
Node layout & configure flow
src/composables/graph/useGraphNodeManager.ts
- handleNodeAdded now exits early if the node is removed before layout init.
- After workflow/configure completes, node data is re-extracted and initializeVueNodeLayout is invoked.
- Non-workflow path defers initializeVueNodeLayout via requestAnimationFrame.
- No public/export signature changes.
Slot positioning utilities (tests/fixtures)
browser_tests/fixtures/utils/litegraphUtils.ts
- SubgraphSlotReference.getOpenSlotPosition simplified to use node.emptySlot.pos directly for canvas conversion.
- Removed dynamic next/last-slot computation and related fallback/anchor logic; external behavior otherwise unchanged.

Sequence Diagram(s)

(omitted — changes do not introduce a new multi-component control flow requiring visualization)

Suggested reviewers

  • DrJKL
  • simula-r
  • christian-byrne
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 505 passed, 0 failed, 1 flaky, 8 skipped (Total: 514)

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 493 / ❌ 0 / ⚠️ 1 / ⏭️ 8)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 9 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/21/2026, 02:07:39 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

Bundle Size Report

Summary

  • Raw size: 21.3 MB baseline 21.3 MB — 🔴 +55 B
  • Gzip: 4.43 MB baseline 4.43 MB — 🔴 +22 B
  • Brotli: 3.28 MB baseline 3.28 MB — 🔴 +87 B
  • Bundles: 155 current • 155 baseline • 2 added / 2 removed

Category Glance
Graph Workspace 🔴 +55 B (1.02 MB) · Vendor & Third-Party ⚪ 0 B (10.4 MB) · Other ⚪ 0 B (6.25 MB) · Data & Services ⚪ 0 B (3.04 MB) · Panels & Settings ⚪ 0 B (430 kB) · Views & Navigation ⚪ 0 B (80.7 kB) · + 5 more

Per-category breakdown
App Entry Points — 22.4 kB (baseline 22.4 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-DLB9Q4JG.js (new) 22.4 kB 🔴 +22.4 kB 🔴 +6.74 kB 🔴 +5.95 kB
assets/index-kJxBWwOc.js (removed) 22.4 kB 🟢 -22.4 kB 🟢 -6.74 kB 🟢 -5.92 kB

Status: 1 added / 1 removed

Graph Workspace — 1.02 MB (baseline 1.02 MB) • 🔴 +55 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-D_X9Fwt6.js (new) 1.02 MB 🔴 +1.02 MB 🔴 +201 kB 🔴 +153 kB
assets/GraphView-f9lcvvUJ.js (removed) 1.02 MB 🟢 -1.02 MB 🟢 -201 kB 🟢 -153 kB

Status: 1 added / 1 removed

Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CloudAuthTimeoutView-DT_qNrPr.js 5.24 kB 5.24 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudForgotPasswordView-DHKBxfYD.js 6.26 kB 6.26 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudLayoutView-CK665bpJ.js 8.54 kB 8.54 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudLoginView-BGj0qfRS.js 11.8 kB 11.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudSignupView-CvdCeVFQ.js 8.18 kB 8.18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudSorryContactSupportView-41RMhsFA.js 1.97 kB 1.97 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudSubscriptionRedirectView-W9ysM6pm.js 5.27 kB 5.27 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudSurveyView-CTXNzBbE.js 17.1 kB 17.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/layout-DT-CUejm.js 500 B 500 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserCheckView-DhKod15J.js 10.5 kB 10.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserSelectView-Kfknbo7F.js 5.28 kB 5.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Panels & Settings — 430 kB (baseline 430 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AboutPanel-m5W-fVji.js 10.8 kB 10.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/cloudRemoteConfig-B-i3QJWb.js 1.82 kB 1.82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ExtensionPanel-CmE44QgT.js 10.2 kB 10.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/KeybindingPanel-BpHTBrF7.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LegacyCreditsPanel-C2_cOIpR.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/remoteConfig-BEkdBLxH.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/remoteConfig-D_gf6SLU.js 188 B 188 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ServerConfigPanel-BN8Rnqty.js 7.23 kB 7.23 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-6DVADt2n.js 34.3 kB 34.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-B0j03ezr.js 38.3 kB 38.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BHe-AJJN.js 29.6 kB 29.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BT2lfy0S.js 29.5 kB 29.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Cp0lF2Mp.js 31.2 kB 31.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CwdesOpm.js 32.1 kB 32.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D3SeHgho.js 28.6 kB 28.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D42m_JEJ.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-FF_vLB0C.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-reUMVWRn.js 30.4 kB 30.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-s7kHNBdQ.js 28.9 kB 28.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/SubscriptionPanel-C7Al6-rO.js 20.6 kB 20.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserPanel-B7B1ABGQ.js 6.58 kB 6.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/auth-CaGOAr4R.js 178 B 178 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/auth-D6HsRKdX.js 3.54 kB 3.54 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/firebaseAuthStore-r9GYeQ1a.js 217 B 217 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
Editors & Dialogs — 2.8 kB (baseline 2.8 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useSubscriptionDialog-AwZBkpcF.js 179 B 179 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/useSubscriptionDialog-CTD2d1Ry.js 2.62 kB 2.62 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
UI Components — 32.8 kB (baseline 32.8 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Button-CKxdX0Yq.js 3.75 kB 3.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudBadge-D5C2_3bQ.js 1.85 kB 1.85 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/cloudFeedbackTopbarButton-Cnj0H4bb.js 866 B 866 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ComfyQueueButton-BqDG0BEx.js 181 B 181 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ComfyQueueButton-BtSdw6b5.js 9.52 kB 9.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/SubscribeButton-B6sAfLpS.js 12.5 kB 12.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar-Bj7TTp1S.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-DZ-mX5uq.js 2.41 kB 2.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Data & Services — 3.04 MB (baseline 3.04 MB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/api-BpAnSudW.js 1.15 MB 1.15 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/audioService-tS4qlb53.js 2.03 kB 2.03 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/dialogService-BbfOVF8q.js 1.87 MB 1.87 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/keybindingService-DO5PG5QA.js 6.78 kB 6.78 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/releaseStore-DrorVVLk.js 140 B 140 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/releaseStore-mx7NmYcW.js 8.91 kB 8.91 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/serverConfigStore-sopnD88s.js 2.64 kB 2.64 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/userStore-MrZXwpQL.js 2.16 kB 2.16 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Utilities & Hooks — 18.8 kB (baseline 18.8 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/_plugin-vue_export-helper-xVPqUhAl.js 467 B 467 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/audioUtils-BezNYF-2.js 1.24 kB 1.24 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/colorUtil-BTZOs5h9.js 7.2 kB 7.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/markdownRendererUtil-B9qvfWYq.js 1.78 kB 1.78 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-BUCOyXf2.js 421 B 421 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/subscriptionCheckoutUtil-DMjztOGB.js 1.98 kB 1.98 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/tailwindUtil-DTv34axN.js 487 B 487 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/useCurrentUser-BF7Ai6po.js 145 B 145 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/useErrorHandling-B-hQdQPe.js 5.08 kB 5.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Vendor & Third-Party — 10.4 MB (baseline 10.4 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-Dr8GmMlH.js 408 kB 408 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-CpOC_out.js 3.92 MB 3.92 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-DvjPM_Lx.js 3.04 MB 3.04 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-reka-ui-BRjoKiJi.js 172 kB 172 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-Dqb1VEds.js 1.83 MB 1.83 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-BxNhpyUI.js 650 kB 650 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-7XRCqLaG.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-CArXWFIl.js 398 kB 398 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 6.25 MB (baseline 6.25 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AudioPreviewPlayer-CjtA8zrb.js 191 B 191 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/AudioPreviewPlayer-w3OtUEVh.js 12.7 kB 12.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/auto-Bv9cmrEd.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/BaseViewTemplate-WhXHpnZ_.js 2.42 kB 2.42 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/cloudBadges-DZd14gO7.js 1.08 kB 1.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudRunButtonWrapper-CCVq2XFN.js 1.79 kB 1.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/cloudSessionCookie-DXnSv6Oa.js 2.9 kB 2.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/cloudSubscription-Bz0TRovn.js 976 B 976 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-6dIwsSNi.js 17.2 kB 17.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BahwM9ZP.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BoJZgy7S.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BQtdp20P.js 20.6 kB 20.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CEMgeOuO.js 18.5 kB 18.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CnxND6sZ.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-coXkrooi.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CZcHDaAg.js 18.8 kB 18.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DDPGTXy9.js 17.9 kB 17.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DsGC6118.js 17.8 kB 17.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-yZ2AjT4s.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/core-0WRM_BtJ.js 177 kB 177 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/GlobalToast-C9CVypov.js 3.05 kB 3.05 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/graphHasMissingNodes-R16K_XCy.js 1.06 kB 1.06 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage-DHuYMTZW.js 14.1 kB 14.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Load3D-BZU-adgV.js 131 B 131 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Load3D-CQEV2QAA.js 55.7 kB 55.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BH76kbq7.js 104 kB 104 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C-gNarDo.js 105 kB 105 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CA0dzqpC.js 124 kB 124 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CbaIObx3.js 121 kB 121 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CKH_pYcz.js 161 kB 161 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CotnVZA-.js 134 kB 134 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D-IO_jVl.js 119 kB 119 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLii8dI6.js 117 kB 117 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-i8aQGyai.js 145 kB 145 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Uwzs8jut.js 141 kB 141 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-vWcCEZeZ.js 117 kB 117 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-DEJN4gIz.js 2.38 kB 2.38 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-D39-6tpk.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-CVYh1Dta.js 2.34 kB 2.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-D7WAsNtO.js 2.84 kB 2.84 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/mixpanel.module-DaKz7N-R.js 143 B 143 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-6qSb98D5.js 329 kB 329 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B4G_Dl5E.js 361 kB 361 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BhmSU7DZ.js 371 kB 371 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bxky0ZDY.js 332 kB 332 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCSKuw9P.js 400 kB 400 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cd4f2ERd.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CLdE8MPH.js 355 kB 355 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CqDWLi76.js 399 kB 399 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CqyprhWq.js 433 kB 433 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D4Fo85EU.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DF-ErmAt.js 351 kB 351 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/PanelTemplate-9GrWYmG9.js 16.2 kB 16.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/preservedQueryNamespaces-BsMrb3S_.js 3.23 kB 3.23 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/previousFullPath-DZ1Jt5wB.js 838 B 838 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/rolldown-runtime-CqTjxoQm.js 1.53 kB 1.53 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Slider-Buvb2eP-.js 4.21 kB 4.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/SubscribeToRun-CL__KGpJ.js 2.96 kB 2.96 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/SubscriptionRequiredDialogContent-B23_6CPY.js 28.7 kB 28.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ValueControlPopover-1sAMrJM0.js 4.86 kB 4.86 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widget-Dneex3J5.js 518 B 518 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetAudioUI-Dke1Ql01.js 3.22 kB 3.22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-BRX2wHPg.js 4.71 kB 4.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-BttrDPHP.js 186 B 186 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-Cw5Ye8UP.js 2.79 kB 2.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-Dv0MELOX.js 3.71 kB 3.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-BwLByoy7.js 4.57 kB 4.57 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-BpLJ-dSO.js 3.79 kB 3.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCrop-CLdAgDQg.js 17.1 kB 17.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputNumber-BJ2oCE2a.js 186 B 186 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputNumber-CMYNKqwl.js 18.2 kB 18.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-C57tLR52.js 2.58 kB 2.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField-BmL9OHU7.js 2.61 kB 2.61 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLegacy-Zt9yZvd8.js 164 B 164 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-B4aB3N7S.js 3.22 kB 3.22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-DfR_ZXyS.js 1.31 kB 1.31 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetRecordAudio-4Zsgjg7m.js 18.2 kB 18.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetSelect-BdSZoK8c.js 161 B 161 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetSelect-Bvp-ZbTs.js 50.5 kB 50.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-CZnm93Po.js 3.52 kB 3.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-B0EfCU8u.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetWithControl-LTpZrSr_.js 8.02 kB 8.02 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

@AustinMroz AustinMroz force-pushed the austin/patient-vue-layout branch from 6b36d8d to ca95d4c Compare December 20, 2025 04:01
AustinMroz added a commit that referenced this pull request Dec 20, 2025
Fixes a bug where swapping to a different workflow from the inside of a
subgraph would cause nodes to be in an incorrect position after swapping
back. in vue mode

Prior to an unknown-but-recent PR, all nodes would would stack on the
origin. This PR instead solves the remaining issue where having
`ComfyEnableWorkflowViewRestore` would cause incorrect node positions.

This is done by not delaying the fitView by a frame (which causes it to
occur after the graph is no longer in the configuring state). In order
to accomplish this, the code in LGraphNode has been updated to allow
measuring node bounds without requiring a ctx argument. This arg is only
used to ensure sufficient width for a node's title and is irrelevant
when loading an existing graph.

| Before | After |
| ------ | ----- |
| <img width="360" alt="before"
src="https://github.com/user-attachments/assets/7f73817b-36e9-4400-8342-9e660cb36628"/>
| <img width="360" alt="after"
src="https://github.com/user-attachments/assets/c7ab4b99-2797-4276-9703-58d489cc3eaf"
/>|

See also #7591, which solves similar issues, but does not resolve this
bug.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7645-Do-not-delay-fit-to-view-on-graph-restore-2ce6d73d36508153972cc7b5948ce375)
by [Unito](https://www.unito.io)
christian-byrne pushed a commit that referenced this pull request Dec 20, 2025
Fixes a bug where swapping to a different workflow from the inside of a
subgraph would cause nodes to be in an incorrect position after swapping
back. in vue mode

Prior to an unknown-but-recent PR, all nodes would would stack on the
origin. This PR instead solves the remaining issue where having
`ComfyEnableWorkflowViewRestore` would cause incorrect node positions.

This is done by not delaying the fitView by a frame (which causes it to
occur after the graph is no longer in the configuring state). In order
to accomplish this, the code in LGraphNode has been updated to allow
measuring node bounds without requiring a ctx argument. This arg is only
used to ensure sufficient width for a node's title and is irrelevant
when loading an existing graph.

| Before | After |
| ------ | ----- |
| <img width="360" alt="before"
src="https://github.com/user-attachments/assets/7f73817b-36e9-4400-8342-9e660cb36628"/>
| <img width="360" alt="after"
src="https://github.com/user-attachments/assets/c7ab4b99-2797-4276-9703-58d489cc3eaf"
/>|

See also #7591, which solves similar issues, but does not resolve this
bug.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7645-Do-not-delay-fit-to-view-on-graph-restore-2ce6d73d36508153972cc7b5948ce375)
by [Unito](https://www.unito.io)
christian-byrne pushed a commit that referenced this pull request Dec 20, 2025
Fixes a bug where swapping to a different workflow from the inside of a
subgraph would cause nodes to be in an incorrect position after swapping
back. in vue mode

Prior to an unknown-but-recent PR, all nodes would would stack on the
origin. This PR instead solves the remaining issue where having
`ComfyEnableWorkflowViewRestore` would cause incorrect node positions.

This is done by not delaying the fitView by a frame (which causes it to
occur after the graph is no longer in the configuring state). In order
to accomplish this, the code in LGraphNode has been updated to allow
measuring node bounds without requiring a ctx argument. This arg is only
used to ensure sufficient width for a node's title and is irrelevant
when loading an existing graph.

| Before | After |
| ------ | ----- |
| <img width="360" alt="before"
src="https://github.com/user-attachments/assets/7f73817b-36e9-4400-8342-9e660cb36628"/>
| <img width="360" alt="after"
src="https://github.com/user-attachments/assets/c7ab4b99-2797-4276-9703-58d489cc3eaf"
/>|

See also #7591, which solves similar issues, but does not resolve this
bug.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7645-Do-not-delay-fit-to-view-on-graph-restore-2ce6d73d36508153972cc7b5948ce375)
by [Unito](https://www.unito.io)
Yourz pushed a commit that referenced this pull request Dec 24, 2025
Fixes a bug where swapping to a different workflow from the inside of a
subgraph would cause nodes to be in an incorrect position after swapping
back. in vue mode

Prior to an unknown-but-recent PR, all nodes would would stack on the
origin. This PR instead solves the remaining issue where having
`ComfyEnableWorkflowViewRestore` would cause incorrect node positions.

This is done by not delaying the fitView by a frame (which causes it to
occur after the graph is no longer in the configuring state). In order
to accomplish this, the code in LGraphNode has been updated to allow
measuring node bounds without requiring a ctx argument. This arg is only
used to ensure sufficient width for a node's title and is irrelevant
when loading an existing graph.

| Before | After |
| ------ | ----- |
| <img width="360" alt="before"
src="https://github.com/user-attachments/assets/7f73817b-36e9-4400-8342-9e660cb36628"/>
| <img width="360" alt="after"
src="https://github.com/user-attachments/assets/c7ab4b99-2797-4276-9703-58d489cc3eaf"
/>|

See also #7591, which solves similar issues, but does not resolve this
bug.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7645-Do-not-delay-fit-to-view-on-graph-restore-2ce6d73d36508153972cc7b5948ce375)
by [Unito](https://www.unito.io)
@DrJKL DrJKL added the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Updating Playwright Expectations

@github-actions github-actions bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 9, 2026
@DrJKL DrJKL self-assigned this Jan 13, 2026
@DrJKL DrJKL marked this pull request as ready for review January 13, 2026 23:44
@DrJKL DrJKL requested a review from a team as a code owner January 13, 2026 23:44
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 13, 2026
@DrJKL DrJKL force-pushed the austin/patient-vue-layout branch from f5e1ec0 to 764b780 Compare January 13, 2026 23:50
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 13, 2026
@DrJKL DrJKL force-pushed the austin/patient-vue-layout branch from 764b780 to 0fceb13 Compare January 13, 2026 23:56
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 13, 2026
@DrJKL DrJKL added the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 13, 2026
DrJKL
DrJKL previously approved these changes Jan 14, 2026
@github-actions github-actions bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 14, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9713162 and a4b1d93.

⛔ Files ignored due to path filters (7)
  • browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/widget.spec.ts-snapshots/image-preview-changed-by-combo-value-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • src/composables/graph/useGraphNodeManager.ts
🧰 Additional context used
📓 Path-based instructions (10)
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

src/**/*.ts: Derive component types using vue-component-type-helpers (ComponentProps, ComponentSlots) instead of separate type files
Use es-toolkit for utility functions
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

src/**/*.{ts,tsx,vue}: Use separate import type statements instead of inline type in mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, run pnpm format before committing
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/composables/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables as useXyz.ts (e.g., useForm.ts)

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,vue}: Use ref for reactive state, computed() for derived values, and watch/watchEffect for side effects in Composition API
Avoid using ref with watch if a computed would suffice - minimize refs and derived state
Use provide/inject for dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals

Files:

  • src/composables/graph/useGraphNodeManager.ts
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx}: Keep functions short and functional
Minimize nesting (if statements, for loops, etc.)
Use function declarations instead of function expressions when possible

Files:

  • src/composables/graph/useGraphNodeManager.ts
🧠 Learnings (7)
📓 Common learnings
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7415
File: browser_tests/tests/mobileBaseline.spec.ts:17-22
Timestamp: 2025-12-13T05:54:35.779Z
Learning: In browser_tests tests for the Comfy-Org/ComfyUI_frontend repository, the `comfyPage.loadWorkflow()` method already handles all necessary synchronization and waiting. No additional `await comfyPage.nextFrame()` call is needed before taking screenshots after loading a workflow.
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2026-01-12T17:39:27.738Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7906
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:545-552
Timestamp: 2026-01-12T17:39:27.738Z
Learning: In Vue/TypeScript files (src/**/*.{ts,tsx,vue}), prefer if/else statements over ternary operators when performing side effects or actions (e.g., mutating state, calling methods with side effects). Ternaries should be reserved for computing and returning values.

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts

DrJKL
DrJKL previously approved these changes Jan 14, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/composables/graph/useGraphNodeManager.ts (1)

418-433: Confirm “always wait a tick” also applies during graph configuration.
RAF deferral is only in the non-configuring path. If the intent is to always delay layout init, consider deferring in the configuring path as well (after onAfterGraphConfigured).

@github-actions github-actions bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 21, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
browser_tests/fixtures/utils/litegraphUtils.ts (1)

69-101: LGTM! Correctly uses emptySlot.pos for not-yet-created slots.

The fix properly addresses the root cause identified in the postmortem — not-yet-created slots are stored under .emptySlot rather than .slots, so accessing node.emptySlot.pos directly is the correct approach.

Optional: Consider adding a defensive check for emptySlot existence (similar to the slot.pos validation in getPosition()) to provide a clearer error message if the property is missing:

🔧 Optional defensive check
         if (!node) {
           throw new Error(`No ${type} node found in subgraph`)
         }

+        if (!node.emptySlot?.pos) {
+          throw new Error(`No emptySlot position found on ${type} node`)
+        }
+
         // Convert from offset to canvas coordinates
         const canvasPos = window['app'].canvas.ds.convertOffsetToCanvas([
           node.emptySlot.pos[0],
           node.emptySlot.pos[1]
         ])

@AustinMroz AustinMroz assigned DrJKL and unassigned AustinMroz Jan 21, 2026
@AustinMroz AustinMroz enabled auto-merge (squash) January 21, 2026 01:37
@AustinMroz AustinMroz disabled auto-merge January 21, 2026 01:51
@AustinMroz AustinMroz force-pushed the austin/patient-vue-layout branch from e75871f to fd22c54 Compare January 21, 2026 01:54
@AustinMroz AustinMroz added the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 21, 2026
@github-actions github-actions bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 21, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/composables/graph/useGraphNodeManager.ts (1)

422-429: Consider adding guard before re-extracting data.

If a node is removed between being added and when onAfterGraphConfigured fires, line 426 will re-add data to vueNodeData for a node that no longer exists. The guard in initializeVueNodeLayout prevents the layout store issue, but leaves an orphan entry in vueNodeData.

Optional: Add guard before data extraction
       node.onAfterGraphConfigured = useChainCallback(
         node.onAfterGraphConfigured,
         () => {
+          // Guard against node removal before configure completes
+          if (!nodeRefs.has(id)) return
+
           // Re-extract data now that configure() has populated title/slots/widgets/etc.
           vueNodeData.set(id, extractVueNodeData(node))
           initializeVueNodeLayout()
         }
       )

@AustinMroz AustinMroz enabled auto-merge (squash) January 21, 2026 02:07
Comment on lines 88 to 91
const canvasPos = window['app'].canvas.ds.convertOffsetToCanvas([
slotX,
slotY
node.emptySlot.pos[0],
node.emptySlot.pos[1]
])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nit...
Could you just pass node.emptySlot.pos?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would have been better. Automerge took the reigns this time, but I'll make sure to fix if I'm ever in the code section again.

@AustinMroz AustinMroz merged commit 47714c2 into main Jan 21, 2026
27 checks passed
@AustinMroz AustinMroz deleted the austin/patient-vue-layout branch January 21, 2026 02:59
godwiniheuwa pushed a commit to godwiniheuwa/ComfyUI_frontend that referenced this pull request Jan 22, 2026
A frequent pattern is to add a node to the graph, and then update the
nodes position afterwards.

Some of these cases (like subgraph unpacking) can set the node position
in advance, but others, (like importA1111) require information on nodes
in order to perform arranging.

Alternatives, like allowing code to either modify `app.configuringGraph`
or otherwise set a temporary state were considered, but create the same
problem of requiring fixes in many places.

As a proposed alternative, when a node is created, an extra tick of
delay is always added before initializing layout.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7591-Always-wait-for-next-tick-before-layout-init-2cc6d73d365081f4ababc38020645670)
by [Unito](https://www.unito.io)

---------

Co-authored-by: DrJKL <DrJKL0424@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
@DrJKL
Copy link
Contributor

DrJKL commented Feb 5, 2026

@AustinMroz plz fix

AustinMroz added a commit that referenced this pull request Feb 5, 2026
#7591 added a one tick delay to layout initialization in an attempt to
resolve some layouting discrepancies. However, it appears to have
reintroduced node scaling issues and introduced a new bug that prevents
cloning nodes with alt+drag in vue.

Alternatives methods of resolving the original issue are being
investigated, but this change was causing more harm than good.

The prior PR included other changes (like a testing fix). Those changes
remain beneficial and do not need to be reverted.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8619-Revert-delay-of-layout-initialization-2fe6d73d365081fc9111c9457ea9752d)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
snomiao pushed a commit that referenced this pull request Feb 6, 2026
#7591 added a one tick delay to layout initialization in an attempt to
resolve some layouting discrepancies. However, it appears to have
reintroduced node scaling issues and introduced a new bug that prevents
cloning nodes with alt+drag in vue.

Alternatives methods of resolving the original issue are being
investigated, but this change was causing more harm than good.

The prior PR included other changes (like a testing fix). Those changes
remain beneficial and do not need to be reverted.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8619-Revert-delay-of-layout-initialization-2fe6d73d365081fc9111c9457ea9752d)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants