Skip to content

Fix dragging Vue nodes into canvas from library #8118

Merged
christian-byrne merged 1 commit intomainfrom
pysssss/fix-node-drag-preview
Jan 17, 2026
Merged

Fix dragging Vue nodes into canvas from library #8118
christian-byrne merged 1 commit intomainfrom
pysssss/fix-node-drag-preview

Conversation

@pythongosssss
Copy link
Member

@pythongosssss pythongosssss commented Jan 17, 2026

Summary

Updates the node preview rendering to use the same app context as the main app so it can access the same plugins

Changes

Assigns manually created vnode app context to the current instances context

Review Focus

This is using somewhat advanced/almost-internal Vue functionality, however I couldn't come up with a better alternative that didn't require recreating an entirely new app and re-registering all dependencies or redoing how draggable node previews are done.
The draggable image needs to be rendered synchronously, so rendering a node in the active app and capturing that isn't possible to guarantee to be done synchronously (afaik - suggestions welcome)

┆Issue is synchronized with this Notion page by Unito

@pythongosssss pythongosssss requested a review from a team as a code owner January 17, 2026 00:59
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 17, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

Both sidebar tab Vue components now capture the current component instance's appContext and propagate it to dynamically created vnodes during drag-preview rendering. This ensures vnodes execute with the correct component context.

Changes

Cohort / File(s) Change Summary
Drag Preview Context Propagation
src/components/sidebar/tabs/NodeLibrarySidebarTab.vue, src/components/sidebar/tabs/nodeLibrary/NodeBookmarkTreeExplorer.vue
Added getCurrentInstance() import and retrieval logic. Established appContext from the current Vue component instance. Applied appContext to vnode in renderDragPreview method to ensure proper component context execution during drag operations.

Suggested reviewers

  • christian-byrne
  • AustinMroz
  • Myestery

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 Jan 17, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/17/2026, 01:00:56 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 17, 2026

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 503 passed, 0 failed, 2 flaky, 8 skipped (Total: 513)

❌ 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 (✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0)

@github-actions
Copy link

Bundle Size Report

Summary

  • Raw size: 19.8 MB baseline 19.8 MB — 🔴 +262 B
  • Gzip: 4.04 MB baseline 4.04 MB — 🔴 +17 B
  • Brotli: 3.08 MB baseline 3.08 MB — 🔴 +138 B
  • Bundles: 99 current • 99 baseline • 38 added / 38 removed

Category Glance
App Entry Points 🔴 +262 B (3.36 MB) · Vendor & Third-Party ⚪ 0 B (9.34 MB) · Other ⚪ 0 B (5.38 MB) · Graph Workspace ⚪ 0 B (1.14 MB) · Panels & Settings ⚪ 0 B (372 kB) · UI Components ⚪ 0 B (203 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.36 MB (baseline 3.36 MB) • 🔴 +262 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-C6JBdIO3.js (new) 3.16 MB 🔴 +3.16 MB 🔴 +662 kB 🔴 +503 kB
assets/index-hPmWevR_.js (removed) 3.16 MB 🟢 -3.16 MB 🟢 -662 kB 🟢 -502 kB
assets/index-Bvpt7qBx.js (removed) 200 kB 🟢 -200 kB 🟢 -44.1 kB 🟢 -36.4 kB
assets/index-CCCWzHi5.js (new) 200 kB 🔴 +200 kB 🔴 +44.1 kB 🔴 +36.4 kB
assets/index-DAKumAJI.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +241 B
assets/index-Dm8OBQg9.js (removed) 345 B 🟢 -345 B 🟢 -244 B 🟢 -202 B

Status: 3 added / 3 removed

Graph Workspace — 1.14 MB (baseline 1.14 MB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-akrsIL4o.js (removed) 1.14 MB 🟢 -1.14 MB 🟢 -217 kB 🟢 -163 kB
assets/GraphView-DwundL7x.js (new) 1.14 MB 🔴 +1.14 MB 🔴 +217 kB 🔴 +163 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-2AZ08wns.js (removed) 6.66 kB 🟢 -6.66 kB 🟢 -2.16 kB 🟢 -1.91 kB
assets/UserSelectView-BtgDEezs.js (new) 6.66 kB 🔴 +6.66 kB 🔴 +2.16 kB 🔴 +1.91 kB

Status: 1 added / 1 removed

Panels & Settings — 372 kB (baseline 372 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-DkmDWnE_.js (new) 25.2 kB 🔴 +25.2 kB 🔴 +5.75 kB 🔴 +5.02 kB
assets/LegacyCreditsPanel-wfdShuch.js (removed) 25.2 kB 🟢 -25.2 kB 🟢 -5.75 kB 🟢 -5.01 kB
assets/KeybindingPanel-BAAFhWX8.js (removed) 14.9 kB 🟢 -14.9 kB 🟢 -3.59 kB 🟢 -3.14 kB
assets/KeybindingPanel-D479wCti.js (new) 14.9 kB 🔴 +14.9 kB 🔴 +3.59 kB 🔴 +3.14 kB
assets/ExtensionPanel-DG9_ECK0.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.63 kB 🟢 -2.31 kB
assets/ExtensionPanel-DlabP5k_.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.63 kB 🔴 +2.31 kB
assets/AboutPanel-BO0wJlqC.js (new) 9.2 kB 🔴 +9.2 kB 🔴 +2.48 kB 🔴 +2.23 kB
assets/AboutPanel-DAEej52c.js (removed) 9.2 kB 🟢 -9.2 kB 🟢 -2.48 kB 🟢 -2.23 kB
assets/ServerConfigPanel-9H5ZY6yv.js (removed) 7.55 kB 🟢 -7.55 kB 🟢 -2.06 kB 🟢 -1.82 kB
assets/ServerConfigPanel-h08n-Ikh.js (new) 7.55 kB 🔴 +7.55 kB 🔴 +2.06 kB 🔴 +1.82 kB
assets/UserPanel-C7k29-9x.js (new) 6.92 kB 🔴 +6.92 kB 🔴 +1.8 kB 🔴 +1.57 kB
assets/UserPanel-WDkGrAjJ.js (removed) 6.92 kB 🟢 -6.92 kB 🟢 -1.8 kB 🟢 -1.57 kB
assets/settings-BGQfQzTx.js 25.6 kB 25.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BVE4KHTw.js 22.7 kB 22.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BVtpJmlU.js 30.9 kB 30.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C2aO00Dz.js 28.6 kB 28.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Cm3ieBXR.js 27.8 kB 27.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CzQKMdK3.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CzYUIUnL.js 27.1 kB 27.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DwKpL7jw.js 26.3 kB 26.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DX8feV4n.js 25.3 kB 25.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-mWzYycGc.js 22 kB 22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-U4AdZ8Rl.js 34.9 kB 34.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 203 kB (baseline 203 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-D0O8no2o.js (removed) 63.9 kB 🟢 -63.9 kB 🟢 -12.8 kB 🟢 -11.2 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-pwVujs64.js (new) 63.9 kB 🔴 +63.9 kB 🔴 +12.8 kB 🔴 +11.2 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CnGVqmWD.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.78 kB 🔴 +7.53 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CQskKPGm.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.78 kB 🟢 -7.54 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BhiqAnBJ.js (removed) 48.1 kB 🟢 -48.1 kB 🟢 -10.4 kB 🟢 -8.99 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-ZB6IIwvr.js (new) 48.1 kB 🔴 +48.1 kB 🔴 +10.4 kB 🔴 +8.99 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BslLfv7n.js (new) 16.4 kB 🔴 +16.4 kB 🔴 +4.11 kB 🔴 +3.64 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DI4Hrys9.js (removed) 16.4 kB 🟢 -16.4 kB 🟢 -4.11 kB 🟢 -3.64 kB
assets/ComfyQueueButton-4ujmlnzn.js (new) 8.87 kB 🔴 +8.87 kB 🔴 +2.59 kB 🔴 +2.3 kB
assets/ComfyQueueButton-CocnQSPc.js (removed) 8.87 kB 🟢 -8.87 kB 🟢 -2.6 kB 🟢 -2.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-CJPmNPAv.js (removed) 3.75 kB 🟢 -3.75 kB 🟢 -1.47 kB 🟢 -1.33 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-e4gq_vHt.js (new) 3.75 kB 🔴 +3.75 kB 🔴 +1.47 kB 🔴 +1.33 kB
assets/WidgetButton-BOhmSSh_.js (removed) 2.25 kB 🟢 -2.25 kB 🟢 -1.01 kB 🟢 -883 B
assets/WidgetButton-DZNZv956.js (new) 2.25 kB 🔴 +2.25 kB 🔴 +1.01 kB 🔴 +915 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Bso-sJS6.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +891 B 🔴 +771 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-D796iaOi.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -891 B 🟢 -771 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DYuISk5v.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-71eg2Rgq.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-Cj-V3hUQ.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.57 kB
assets/audioService-9E-ojk-b.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +964 B 🔴 +820 B
assets/audioService-B1f4LvrB.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -961 B 🟢 -827 B
assets/serverConfigStore-UAfw346M.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-Ckwvr5wV.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +549 B
assets/audioUtils-Cp7pR0V_.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -649 B 🟢 -542 B

Status: 1 added / 1 removed

Vendor & Third-Party — 9.34 MB (baseline 9.34 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-B6cS_vC9.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-qQ0OqwZI.js 3.93 MB 3.93 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-C6JjJDK2.js 1.95 MB 1.95 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-reka-ui-DDrshcJ8.js 111 kB 111 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-y3pikHUU.js 2.08 MB 2.08 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-CsIL_yPi.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-8yQe0SeB.js 165 kB 165 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 5.38 MB (baseline 5.38 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-B2VvKV62.js (new) 29.3 kB 🔴 +29.3 kB 🔴 +6.5 kB 🔴 +5.66 kB
assets/SubscriptionRequiredDialogContent-Bsi2nGlr.js (removed) 29.3 kB 🟢 -29.3 kB 🟢 -6.5 kB 🟢 -5.66 kB
assets/WidgetRecordAudio-Bwf8Pvbv.js (new) 20.5 kB 🔴 +20.5 kB 🔴 +5.24 kB 🔴 +4.64 kB
assets/WidgetRecordAudio-YxAiVjpv.js (removed) 20.5 kB 🟢 -20.5 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/AudioPreviewPlayer-CXGqM-nA.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.36 kB 🟢 -3.01 kB
assets/AudioPreviewPlayer-D3lrWPnP.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.36 kB 🔴 +3.01 kB
assets/ValueControlPopover-BMMLEfdO.js (removed) 5.53 kB 🟢 -5.53 kB 🟢 -1.72 kB 🟢 -1.53 kB
assets/ValueControlPopover-DZbVvcil.js (new) 5.53 kB 🔴 +5.53 kB 🔴 +1.72 kB 🔴 +1.53 kB
assets/WidgetGalleria-DA5G6vrj.js (removed) 4.14 kB 🟢 -4.14 kB 🟢 -1.46 kB 🟢 -1.32 kB
assets/WidgetGalleria-DGO1n2Qy.js (new) 4.14 kB 🔴 +4.14 kB 🔴 +1.46 kB 🔴 +1.32 kB
assets/WidgetColorPicker-CKza8Kqm.js (removed) 3.44 kB 🟢 -3.44 kB 🟢 -1.4 kB 🟢 -1.25 kB
assets/WidgetColorPicker-DERsG6Mu.js (new) 3.44 kB 🔴 +3.44 kB 🔴 +1.4 kB 🔴 +1.25 kB
assets/WidgetTextarea-BIY6aEPp.js (new) 3.12 kB 🔴 +3.12 kB 🔴 +1.23 kB 🔴 +1.1 kB
assets/WidgetTextarea-BN9P6IqP.js (removed) 3.12 kB 🟢 -3.12 kB 🟢 -1.23 kB 🟢 -1.11 kB
assets/WidgetMarkdown-DlvVktrG.js (removed) 3.12 kB 🟢 -3.12 kB 🟢 -1.29 kB 🟢 -1.14 kB
assets/WidgetMarkdown-JXQ9sjBQ.js (new) 3.12 kB 🔴 +3.12 kB 🔴 +1.29 kB 🔴 +1.14 kB
assets/WidgetAudioUI-CWcXSdaI.js (new) 2.93 kB 🔴 +2.93 kB 🔴 +1.18 kB 🔴 +1.07 kB
assets/WidgetAudioUI-CZWnwumV.js (removed) 2.93 kB 🟢 -2.93 kB 🟢 -1.18 kB 🟢 -1.07 kB
assets/WidgetToggleSwitch-AmTjWsbP.js (removed) 2.7 kB 🟢 -2.7 kB 🟢 -1.14 kB 🟢 -1.02 kB
assets/WidgetToggleSwitch-CTLr78Y2.js (new) 2.7 kB 🔴 +2.7 kB 🔴 +1.14 kB 🔴 +1.02 kB
assets/WidgetInputText-DRUKfsth.js (new) 2.03 kB 🔴 +2.03 kB 🔴 +933 B 🔴 +841 B
assets/WidgetInputText-y8XdyHIP.js (removed) 2.03 kB 🟢 -2.03 kB 🟢 -936 B 🟢 -865 B
assets/Media3DTop-Bqj3dBDM.js (removed) 1.53 kB 🟢 -1.53 kB 🟢 -782 B 🟢 -663 B
assets/Media3DTop-J8WKrFIh.js (new) 1.53 kB 🔴 +1.53 kB 🔴 +782 B 🔴 +665 B
assets/WidgetSelect-BTi-ZW0p.js (removed) 772 B 🟢 -772 B 🟢 -377 B 🟢 -353 B
assets/WidgetSelect-Q1IJQjzo.js (new) 772 B 🔴 +772 B 🔴 +373 B 🔴 +352 B
assets/WidgetInputNumber-CNDFi1hM.js (removed) 712 B 🟢 -712 B 🟢 -364 B 🟢 -337 B
assets/WidgetInputNumber-DEoDFHy4.js (new) 712 B 🔴 +712 B 🔴 +359 B 🔴 +334 B
assets/Load3D-CUBdxhzZ.js (removed) 463 B 🟢 -463 B 🟢 -280 B 🟢 -237 B
assets/Load3D-DAAl0fxU.js (new) 463 B 🔴 +463 B 🔴 +280 B 🔴 +238 B
assets/WidgetLegacy-DSL6xXEH.js (new) 403 B 🔴 +403 B 🔴 +250 B 🔴 +211 B
assets/WidgetLegacy-NXuLiisb.js (removed) 403 B 🟢 -403 B 🟢 -251 B 🟢 -210 B
assets/commands-B32ZbeYu.js 16.5 kB 16.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-B7wQT83I.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BK3JVjMG.js 15.7 kB 15.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-C6twMpaZ.js 15.5 kB 15.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CDUWpEwM.js 18.3 kB 18.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CfZ6FPZ-.js 15.7 kB 15.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COIPP_pv.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoPn_77e.js 14.7 kB 14.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CuRNS4XD.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DBHjCSPA.js 16.2 kB 16.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DZJaRLKH.js 15.7 kB 15.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-8BNo1weg.js 110 kB 110 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BPRfdNvb.js 127 kB 127 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CezbcLlR.js 98.1 kB 98.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-COBPG1am.js 134 kB 134 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-COodTO5z.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D2h56mz4.js 97.4 kB 97.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DkeDO8xU.js 110 kB 110 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DNecFfxQ.js 138 kB 138 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DPtAQ-XV.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-R06XJOVT.js 116 kB 116 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-yFuDcHL9.js 154 kB 154 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-BbasJLNf.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-Cg8GhF1C.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-Blp7MPtz.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-2h3z0SXa.js 324 kB 324 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-4bBZvQjV.js 298 kB 298 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B1OXtv5-.js 295 kB 295 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-C_xG1nNM.js 324 kB 324 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CAgbt7pL.js 365 kB 365 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cghy43iq.js 399 kB 399 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DHrs5gc0.js 328 kB 328 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DPFlfVHx.js 321 kB 321 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DsMfXcAJ.js 366 kB 366 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DWdQhd19.js 337 kB 337 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-mAfdiTdx.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-BicTiHSA.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DUGS9EoD.js 3.21 kB 3.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 16 added / 16 removed

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: 2

🤖 Fix all issues with AI agents
In `@src/components/sidebar/tabs/nodeLibrary/NodeBookmarkTreeExplorer.vue`:
- Around line 165-168: The code directly assigns the internal vnode.appContext
inside renderDragPreview (creating a vnode from NodePreview then setting
vnode.appContext before calling render), so extract that into a small helper
(e.g., setVNodeAppContext or attachAppContextToVNode) and call it from
renderDragPreview, or at minimum add a single-line comment referencing why
vnode.appContext is required and that it centralizes the internal API usage for
future Vue upgrades; update references in renderDragPreview to use the new
helper and keep the NodePreview, appContext and render usage unchanged.

In `@src/components/sidebar/tabs/NodeLibrarySidebarTab.vue`:
- Around line 283-286: The code sets vnode.appContext directly in
renderDragPreview (using renderDragPreview, NodePreview, vnode.appContext,
appContext, render) which relies on an internal Vue hook; create a small shared
helper (e.g., setVNodeAppContextAndRender or renderVNodeWithAppContext) that
encapsulates assigning appContext to the vnode and calling render, then replace
the inline assignment in renderDragPreview with that helper to centralize the
internal-hook use and make future changes easier to update in one place.

Comment on lines 165 to 168
renderDragPreview(container) {
const vnode = h(NodePreview, { nodeDef: node.data })
vnode.appContext = appContext
render(vnode, container)
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider encapsulating internal vnode.appContext usage.

This is the right fix, but vnode.appContext is internal; a tiny helper (or short comment) would centralize this dependency for future Vue upgrades.

🤖 Prompt for AI Agents
In `@src/components/sidebar/tabs/nodeLibrary/NodeBookmarkTreeExplorer.vue` around
lines 165 - 168, The code directly assigns the internal vnode.appContext inside
renderDragPreview (creating a vnode from NodePreview then setting
vnode.appContext before calling render), so extract that into a small helper
(e.g., setVNodeAppContext or attachAppContextToVNode) and call it from
renderDragPreview, or at minimum add a single-line comment referencing why
vnode.appContext is required and that it centralizes the internal API usage for
future Vue upgrades; update references in renderDragPreview to use the new
helper and keep the NodePreview, appContext and render usage unchanged.

Comment on lines 283 to 286
renderDragPreview(container) {
const vnode = h(NodePreview, { nodeDef: node.data })
vnode.appContext = appContext
render(vnode, container)
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

App-context propagation looks correct; centralize the internal hook.

Given vnode.appContext is internal, consider a shared helper to reduce risk if Vue changes internals later.

🤖 Prompt for AI Agents
In `@src/components/sidebar/tabs/NodeLibrarySidebarTab.vue` around lines 283 -
286, The code sets vnode.appContext directly in renderDragPreview (using
renderDragPreview, NodePreview, vnode.appContext, appContext, render) which
relies on an internal Vue hook; create a small shared helper (e.g.,
setVNodeAppContextAndRender or renderVNodeWithAppContext) that encapsulates
assigning appContext to the vnode and calling render, then replace the inline
assignment in renderDragPreview with that helper to centralize the internal-hook
use and make future changes easier to update in one place.

@christian-byrne christian-byrne added the preview-cpu Creates a preview ephemeral environment for this PR (CPU only) label Jan 17, 2026
@christian-byrne christian-byrne merged commit 851e8be into main Jan 17, 2026
37 checks passed
@christian-byrne christian-byrne deleted the pysssss/fix-node-drag-preview branch January 17, 2026 05:50
@luke-mino-altherr luke-mino-altherr added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch cloud/1.37 Backport PRs for cloud 1.37 labels Jan 28, 2026
github-actions bot pushed a commit that referenced this pull request Jan 28, 2026
## Summary

Updates the node preview rendering to use the same app context as the
main app so it can access the same plugins

## Changes

Assigns manually created vnode app context to the current instances
context

## Review Focus

This is using somewhat advanced/almost-internal Vue functionality,
however I couldn't come up with a better alternative that didn't require
recreating an entirely new app and re-registering all dependencies or
redoing how draggable node previews are done.
The draggable image needs to be rendered synchronously, so rendering a
node in the active app and capturing that isn't possible to guarantee to
be done synchronously (afaik - suggestions welcome)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8118-Fix-dragging-Vue-nodes-into-canvas-from-library-2eb6d73d365081a0a956d8280e009592)
by [Unito](https://www.unito.io)
@comfy-pr-bot
Copy link
Member

@pythongosssss Successfully backported to #8346

@github-actions github-actions bot removed the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Jan 28, 2026
AustinMroz pushed a commit that referenced this pull request Jan 28, 2026
…#8346)

Backport of #8118 to `cloud/1.37`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8346-backport-cloud-1-37-Fix-dragging-Vue-nodes-into-canvas-from-library-2f66d73d3650816b804ae117a4674d53)
by [Unito](https://www.unito.io)

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

Labels

cloud/1.37 Backport PRs for cloud 1.37 preview-cpu Creates a preview ephemeral environment for this PR (CPU only) size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants