Skip to content

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Dec 30, 2025

Creating a copy with spread resulted in a copy which was not reactive.

Solves a bug where all widgets on a node in vue mode would cease to be reactive after any connection is made to the node.

┆Issue is synchronized with this Notion page by Unito

@AustinMroz AustinMroz requested a review from a team as a code owner December 30, 2025 06:03
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 30, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

The PR changes widget slot metadata updates in useGraphNodeManager from rebuilding the widgets array to mutating matching widgets in-place, and adds a test module that verifies widget reactivity and persistence after simulated connection changes.

Changes

Cohort / File(s) Summary
Widget Update Mutation
src/composables/graph/useGraphNodeManager.ts
Replaced functional mapping/replacement of widgets with a for-loop that mutates widget.slotMetadata in-place when slot metadata exists; widgets array is no longer reconstructed.
Node Reactivity Tests
tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
New test verifying that widget value updates trigger a Vue watch callback once, and that this reactivity persists after emitting node:slot-links:changed.
Manifest
package.json
Listed as changed in manifest summary (no exported/public API changes).

Possibly related PRs

✨ 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 30, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/30/2025, 10:08:04 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 12/30/2025, 10:20:52 PM UTC

📈 Summary

  • Total Tests: 511
  • Passed: 500 ✅
  • Failed: 1 ❌
  • Flaky: 2 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 490 / ❌ 1 / ⚠️ 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

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — 🟢 -249 B
  • Gzip: 3.54 MB baseline 3.54 MB — 🟢 -111 B
  • Brotli: 2.7 MB baseline 2.7 MB — 🟢 -49 B
  • Bundles: 98 current • 98 baseline • 43 added / 43 removed

Category Glance
Graph Workspace 🟢 -249 B (999 kB) · Vendor & Third-Party ⚪ 0 B (9.12 MB) · Other ⚪ 0 B (3.47 MB) · App Entry Points ⚪ 0 B (3.21 MB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (199 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.21 MB (baseline 3.21 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-BCS1OJ5Y.js (removed) 3.01 MB 🟢 -3.01 MB 🟢 -633 kB 🟢 -481 kB
assets/index-HyuNdJtY.js (new) 3.01 MB 🔴 +3.01 MB 🔴 +633 kB 🔴 +481 kB
assets/index-B_ETEo3m.js (new) 193 kB 🔴 +193 kB 🔴 +42.1 kB 🔴 +35.1 kB
assets/index-DuwPR6B8.js (removed) 193 kB 🟢 -193 kB 🟢 -42.1 kB 🟢 -35.1 kB
assets/index-BqjTf8nH.js (new) 345 B 🔴 +345 B 🔴 +244 B 🔴 +237 B
assets/index-BzB5wS47.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -240 B

Status: 3 added / 3 removed

Graph Workspace — 999 kB (baseline 1000 kB) • 🟢 -249 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-Di2UvnKJ.js (removed) 1000 kB 🟢 -1000 kB 🟢 -194 kB 🟢 -148 kB
assets/GraphView-Cc0-1e2M.js (new) 999 kB 🔴 +999 kB 🔴 +194 kB 🔴 +148 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-DCSjxZSy.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.15 kB 🔴 +1.9 kB
assets/UserSelectView-DzVX5BUm.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.15 kB 🟢 -1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-3jLOrRh8.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.26 kB 🟢 -4.6 kB
assets/LegacyCreditsPanel-BZMmX0N9.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.26 kB 🔴 +4.61 kB
assets/KeybindingPanel-B6JtJW6n.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.58 kB 🔴 +3.13 kB
assets/KeybindingPanel-BlGdRgBO.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.58 kB 🟢 -3.12 kB
assets/ExtensionPanel-CMuiWYPc.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.3 kB
assets/ExtensionPanel-vRJ8hbti.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/AboutPanel-B73veffN.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-C4zveeD6.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-BMYYbpkm.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.81 kB
assets/ServerConfigPanel-CCeKeKKq.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.81 kB
assets/UserPanel-BOzopOeL.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.57 kB
assets/UserPanel-T5WK_l5P.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.56 kB
assets/settings-AN2JfZVQ.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-D8jn0iCy.js (new) 59.9 kB 🔴 +59.9 kB 🔴 +12.4 kB 🔴 +10.8 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-PyWgMxVM.js (removed) 59.9 kB 🟢 -59.9 kB 🟢 -12.4 kB 🟢 -10.8 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CDxUoJoc.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.9 kB 🔴 +7.61 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-fclrgIDZ.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.9 kB 🟢 -7.61 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CeTTei5O.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-D1xcpeKt.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CHi3amHV.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.73 kB 🔴 +3.29 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DPQP-BKj.js (removed) 14.3 kB 🟢 -14.3 kB 🟢 -3.74 kB 🟢 -3.29 kB
assets/ComfyQueueButton-BPi9nLmq.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.57 kB 🔴 +2.29 kB
assets/ComfyQueueButton-Ci069f1U.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.58 kB 🟢 -2.29 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-BfCETFSO.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.46 kB 🟢 -1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-C6jcFetq.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.45 kB 🔴 +1.32 kB
assets/WidgetButton-B-EupGmP.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +998 B 🔴 +892 B
assets/WidgetButton-B07kYILL.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -999 B 🟢 -892 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BUAqbF6L.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -893 B 🟢 -771 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-C7Zus-ff.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +890 B 🔴 +768 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BB92slF2.js (removed) 897 B 🟢 -897 B 🟢 -505 B 🟢 -440 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-MLzS1ISL.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +430 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DV-9JnFV.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 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-BwzqROvH.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.57 kB
assets/keybindingService-Qmr3SdiP.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/audioService-BxJ4pWy-.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -963 B 🟢 -826 B
assets/audioService-Cdbm8k-s.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +961 B 🔴 +823 B
assets/serverConfigStore-CulKZi3K.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-CLz_M4qU.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +549 B
assets/audioUtils-DF4Dgu64.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -653 B 🟢 -550 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-KBsqeQPQ.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-CzYzbUcM.js 3.89 MB 3.89 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-Ch6rhmJJ.js 1.95 MB 1.95 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-DYL0ZbEr.js 2.02 MB 2.02 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-XfQ74oRB.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DLbRHZS7.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.47 MB (baseline 3.47 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-C2PKr3AX.js (removed) 28.5 kB 🟢 -28.5 kB 🟢 -6.3 kB 🟢 -5.47 kB
assets/SubscriptionRequiredDialogContent-XD9S5QP_.js (new) 28.5 kB 🔴 +28.5 kB 🔴 +6.3 kB 🔴 +5.45 kB
assets/WidgetRecordAudio-BDBtalCL.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/WidgetRecordAudio-shFZ3gZX.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-DW7MhGeC.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/AudioPreviewPlayer-DYdeK1T2.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -2.99 kB
assets/ValueControlPopover-CuVnsgiI.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.52 kB
assets/ValueControlPopover-Vkasj0ex.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.52 kB
assets/WidgetGalleria-CURMTG0I.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetGalleria-dhy3BVcK.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetColorPicker-B39mE2zf.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-BEiVqxNB.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-DUKC27Dn.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.07 kB
assets/WidgetTextarea-P8ls96rd.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetMarkdown-B_iNRmF8.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-QldgpgCl.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetAudioUI-CkwAUJ6H.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetAudioUI-DsuywczX.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetInputText-51K24eLf.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -923 B 🟢 -849 B
assets/WidgetInputText-CKWzeA5C.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +923 B 🔴 +854 B
assets/WidgetToggleSwitch-BkctyGGi.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -837 B 🟢 -731 B
assets/WidgetToggleSwitch-Bz-OzDGf.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +835 B 🔴 +730 B
assets/MediaImageBottom-COjuZ-ut.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +737 B 🔴 +640 B
assets/MediaImageBottom-sc0MqEbi.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -738 B 🟢 -638 B
assets/MediaAudioBottom-CEWZgGsz.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +735 B 🔴 +649 B
assets/MediaAudioBottom-CYUUChL0.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -735 B 🟢 -648 B
assets/Media3DBottom-BtS22wZQ.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -643 B
assets/Media3DBottom-DHBwBjEE.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +733 B 🔴 +646 B
assets/MediaVideoBottom-DEqhnJjZ.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +733 B 🔴 +642 B
assets/MediaVideoBottom-DWT2YnIk.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -734 B 🟢 -644 B
assets/Media3DTop-B8oSVZwg.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +767 B 🔴 +653 B
assets/Media3DTop-PP5d4YiJ.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -767 B 🟢 -652 B
assets/WidgetSelect-CEpnDt8C.js (new) 733 B 🔴 +733 B 🔴 +360 B 🔴 +318 B
assets/WidgetSelect-DkU4ig0c.js (removed) 733 B 🟢 -733 B 🟢 -365 B 🟢 -322 B
assets/WidgetInputNumber-B-uDjJKZ.js (removed) 673 B 🟢 -673 B 🟢 -349 B 🟢 -286 B
assets/WidgetInputNumber-CiVkRPge.js (new) 673 B 🔴 +673 B 🔴 +347 B 🔴 +293 B
assets/Load3D-CuKkEGQL.js (removed) 424 B 🟢 -424 B 🟢 -270 B 🟢 -223 B
assets/Load3D-DhoM17IH.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +224 B
assets/WidgetLegacy-BHzYFNxU.js (new) 364 B 🔴 +364 B 🔴 +237 B 🔴 +196 B
assets/WidgetLegacy-BjDkv5qN.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -195 B
assets/commands-bTEY9Mp6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BRKE6VDs.js 91 kB 91 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DnMHwvAw.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BenufCTB.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-uhl1tYxE.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DIAYlJwM.js 246 kB 246 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-CXIOBBuD.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DOO74J4Y.js 3.18 kB 3.18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 20 added / 20 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

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27caaa3 and 2888c7c.

📒 Files selected for processing (2)
  • src/composables/graph/useGraphNodeManager.ts
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
🧰 Additional context used
📓 Path-based instructions (13)
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

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

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
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/composables/graph/useGraphNodeManager.ts
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/composables/graph/useGraphNodeManager.ts
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/composables/graph/useGraphNodeManager.ts
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/composables/graph/useGraphNodeManager.ts
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
🧠 Learnings (18)
📚 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
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.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
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.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
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.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
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-04T21:43:49.363Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/parameters/TabParameters.vue:10-0
Timestamp: 2025-12-04T21:43:49.363Z
Learning: Vue 3.5+ supports reactive props destructure in <script setup>. Destructuring props directly (e.g., `const { nodes } = defineProps<{ nodes: LGraphNode[] }>()`) maintains reactivity through compiler transformation. This is the recommended modern approach and does not require using `props.x` or `toRef`/`toRefs`.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-11T03:55:57.926Z
Learnt from: simula-r
Repo: Comfy-Org/ComfyUI_frontend PR: 7252
File: src/renderer/extensions/vueNodes/components/ImagePreview.vue:151-158
Timestamp: 2025-12-11T03:55:57.926Z
Learning: In src/renderer/extensions/vueNodes/components/ImagePreview.vue and LGraphNode.vue, keyboard navigation for image galleries should respond to node-level focus (via keyEvent injection from LGraphNode), not require focus within the image preview wrapper itself. This allows users to navigate the gallery with arrow keys immediately when the node is focused/selected.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-30T01:31:04.927Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (using new), the mock implementation must use function() or class syntax rather than an arrow function. Arrow mocks can cause '<anonymous> is not a constructor' errors. This is a breaking change from Vitest v3 where mocks could use an arrow function. Apply this guideline to test files that mock constructor-like calls (e.g., in tests under tests-ui, such as ComboWidget.test.ts) and ensure mock implementations are defined with function() { ... } or class { ... } to preserve constructor behavior.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In tests-ui feature tests, do not stub primitive UI components or customized primitives (e.g., Button). Instead, import and register the real components in the test setup so tests reflect production behavior and component API usage. This improves test reliability and fidelity. If a test must avoid rendering the full component, justify the approach and consider higher-level mocks or integration tests rather than replacing the primitive itself.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
🧬 Code graph analysis (1)
src/composables/graph/useGraphNodeManager.ts (1)
src/lib/litegraph/src/LGraphNode.ts (1)
  • widget (3968-3971)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (3)
src/composables/graph/useGraphNodeManager.ts (1)

239-242: LGTM! In-place mutation correctly preserves Vue reactivity.

The switch from immutable array reconstruction to direct property mutation is the correct fix for the reactivity washing bug. While this conflicts with the general "prefer immutability" guideline, it's necessary here because Vue's reactivity system tracks the original reactive objects—creating shallow copies with the spread operator breaks that tracking chain.

The in-place mutation ensures that currentData.widgets (a reactiveComputed array) maintains its reactive proxies when slot metadata updates.

tests-ui/tests/composables/graph/useGraphNodeManager.test.ts (2)

13-28: Test correctly validates widget callback reactivity.

The test properly verifies that widget callbacks trigger Vue reactivity updates. The setup, assertion sequence, and nextTick await are all appropriate.


29-47: Test correctly validates reactivity preservation after connection changes.

This test directly addresses the bug described in the PR by:

  1. Triggering a slot-links change (which calls refreshNodeSlots)
  2. Setting up reactivity watching after that event
  3. Verifying that subsequent widget updates still trigger reactivity

The watch placement after the node:slot-links:changed event is intentional—it validates that the in-place mutation preserves reactivity for future updates.

nodeId: '1',
slotType: NodeSlotType.INPUT
})
watch(vueNodeData, onReactivityUpdate)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think if the common Arrange pieces were pulled out, it might read a bit cleaner here.

Also, want to add the same negative assertion from lines 22-23 above in this one for consistency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have some mixed feelings about the negative assertion even in the first test (I'm not sure it would ever catch anything since there's not an await nextTick() to let reactivity setttle) but symmetry is good and establishing that the update should not be caused by the graph.trigger call is important.

DrJKL
DrJKL previously approved these changes Dec 30, 2025
Copy link
Contributor

@DrJKL DrJKL left a comment

Choose a reason for hiding this comment

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

👍🏻

@DrJKL DrJKL assigned AustinMroz and unassigned DrJKL Dec 30, 2025
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

♻️ Duplicate comments (2)
tests-ui/tests/composables/graph/useGraphNodeManager.test.ts (2)

10-10: Move Pinia setup into beforeEach for test isolation.

Setting up the Pinia instance at module level can cause state to leak between test files or test suites.


38-41: Consider using dynamic node ID instead of hardcoded value.

The hardcoded '1' assumes specific ID assignment behavior. Using the actual node's ID would make the test more robust.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2888c7c and f2980b1.

📒 Files selected for processing (1)
  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
🧰 Additional context used
📓 Path-based instructions (6)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
🧠 Learnings (21)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-04T21:43:49.363Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/parameters/TabParameters.vue:10-0
Timestamp: 2025-12-04T21:43:49.363Z
Learning: Vue 3.5+ supports reactive props destructure in <script setup>. Destructuring props directly (e.g., `const { nodes } = defineProps<{ nodes: LGraphNode[] }>()`) maintains reactivity through compiler transformation. This is the recommended modern approach and does not require using `props.x` or `toRef`/`toRefs`.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-11T03:55:57.926Z
Learnt from: simula-r
Repo: Comfy-Org/ComfyUI_frontend PR: 7252
File: src/renderer/extensions/vueNodes/components/ImagePreview.vue:151-158
Timestamp: 2025-12-11T03:55:57.926Z
Learning: In src/renderer/extensions/vueNodes/components/ImagePreview.vue and LGraphNode.vue, keyboard navigation for image galleries should respond to node-level focus (via keyEvent injection from LGraphNode), not require focus within the image preview wrapper itself. This allows users to navigate the gallery with arrow keys immediately when the node is focused/selected.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 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:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.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:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.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:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-30T01:31:04.927Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (using new), the mock implementation must use function() or class syntax rather than an arrow function. Arrow mocks can cause '<anonymous> is not a constructor' errors. This is a breaking change from Vitest v3 where mocks could use an arrow function. Apply this guideline to test files that mock constructor-like calls (e.g., in tests under tests-ui, such as ComboWidget.test.ts) and ensure mock implementations are defined with function() { ... } or class { ... } to preserve constructor behavior.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.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:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In tests-ui feature tests, do not stub primitive UI components or customized primitives (e.g., Button). Instead, import and register the real components in the test setup so tests reflect production behavior and component API usage. This improves test reliability and fidelity. If a test must avoid rendering the full component, justify the approach and consider higher-level mocks or integration tests rather than replacing the primitive itself.

Applied to files:

  • tests-ui/tests/composables/graph/useGraphNodeManager.test.ts
🧬 Code graph analysis (1)
tests-ui/tests/composables/graph/useGraphNodeManager.test.ts (1)
src/composables/graph/useGraphNodeManager.ts (1)
  • useGraphNodeManager (212-589)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (3)
tests-ui/tests/composables/graph/useGraphNodeManager.test.ts (3)

1-8: LGTM! Imports are well-organized.

All necessary testing utilities and dependencies are imported correctly.


27-33: LGTM! Test correctly verifies widget callback reactivity.

The test properly validates that invoking a widget callback triggers the reactive update system.


35-48: LGTM! Test correctly verifies reactivity persistence after connection changes.

This test effectively validates the bug fix by ensuring that widget reactivity is maintained after a slot-links-changed event, which was the root cause of the reactivity washing issue described in the PR.

Comment on lines +12 to +24
function createTestGraph() {
const graph = new LGraph()
const node = new LGraphNode('test')
node.addInput('input', 'INT')
node.addWidget('number', 'testnum', 2, () => undefined, {})
graph.add(node)

const { vueNodeData } = useGraphNodeManager(graph)
const onReactivityUpdate = vi.fn()
watch(vueNodeData, onReactivityUpdate)

return [node, graph, onReactivityUpdate] as const
}
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 capturing and calling cleanup for proper teardown.

The useGraphNodeManager returns a cleanup function that should be invoked to properly tear down event listeners and internal state. While the current tests work because each creates a new graph instance, capturing and calling cleanup is best practice for test hygiene.

🔎 Proposed refactor
 function createTestGraph() {
   const graph = new LGraph()
   const node = new LGraphNode('test')
   node.addInput('input', 'INT')
   node.addWidget('number', 'testnum', 2, () => undefined, {})
   graph.add(node)
 
-  const { vueNodeData } = useGraphNodeManager(graph)
+  const { vueNodeData, cleanup } = useGraphNodeManager(graph)
   const onReactivityUpdate = vi.fn()
   watch(vueNodeData, onReactivityUpdate)
 
-  return [node, graph, onReactivityUpdate] as const
+  return [node, graph, onReactivityUpdate, cleanup] as const
 }
 
 describe('Node Reactivity', () => {
+  let cleanup: (() => void) | undefined
+
+  afterEach(() => {
+    cleanup?.()
+  })
+
   it('should trigger on callback', async () => {
-    const [node, , onReactivityUpdate] = createTestGraph()
+    const [node, , onReactivityUpdate, cleanupFn] = createTestGraph()
+    cleanup = cleanupFn

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In tests-ui/tests/composables/graph/useGraphNodeManager.test.ts around lines 12
to 24, the helper createTestGraph calls useGraphNodeManager but does not capture
or invoke the returned cleanup function; update createTestGraph to destructure
and return the cleanup function (or call cleanup in each test/afterEach) and
ensure tests invoke cleanup() after use to teardown event listeners and internal
state properly.

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.

3 participants