Skip to content

Ensure widgets always get a single callback#7579

Merged
AustinMroz merged 7 commits intomainfrom
austin/fix-vue-callbacks
Dec 23, 2025
Merged

Ensure widgets always get a single callback#7579
AustinMroz merged 7 commits intomainfrom
austin/fix-vue-callbacks

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Dec 17, 2025

The other side of reactivity. Ensure that vue mode always registers a callback on litegraph nodes and never registers more than one.

┆Issue is synchronized with this Notion page by Unito

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

📝 Walkthrough

Walkthrough

Adds a Vue reactivity bridge for LiteGraph widgets by introducing useReactiveWidgetValue/vueTrack and value normalization, replaces prior widget callback/state plumbing with a Ref-based synchronization approach, updates component binding to use the new reactive source, and simplifies proxy handler assignment behavior.

Changes

Cohort / File(s) Change Summary
Reactive widget value bridge
src/composables/graph/useGraphNodeManager.ts
Adds useReactiveWidgetValue and widgetWithVueTrack to attach a Vue tracking ref to widgets; introduces normalizeWidgetValue; replaces previous inline widget-value callbacks/state logic with a per-widget valueRef approach and removes older helper functions (validation, wrapped callbacks, per-node setup).
Component binding update
src/components/rightSidePanel/parameters/SectionWidgets.vue
Replaces model-value binding from widget.value to the reactive ref returned by useReactiveWidgetValue(widget).
Proxy handler simplification
src/core/graph/subgraph/proxyWidget.ts
Simplifies proxy set trap by removing the separate receiver parameter and always using the chosen target as the receiver; retains computedHeight handling and post-update linked-widget resolution refresh.
Widget type extension
src/lib/litegraph/src/types/widgets.ts
Adds optional vueTrack?: () => void property to IBaseWidget to support Vue tracking hook on widget instances.

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch austin/fix-vue-callbacks

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

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/22/2025, 06:01:09 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/22/2025, 06:09:21 AM UTC

📈 Summary

  • Total Tests: 508
  • Passed: 497 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 485 / ❌ 0 / ⚠️ 3 / ⏭️ 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

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

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — 🟢 -1.57 kB
  • Gzip: 3.53 MB baseline 3.53 MB — 🟢 -86 B
  • Brotli: 2.69 MB baseline 2.69 MB — 🟢 -316 B
  • Bundles: 98 current • 98 baseline • 55 added / 55 removed

Category Glance
Graph Workspace 🟢 -1.41 kB (992 kB) · App Entry Points 🟢 -163 B (3.22 MB) · Vendor & Third-Party ⚪ 0 B (9.1 MB) · Other ⚪ 0 B (3.44 MB) · Panels & Settings ⚪ 0 B (297 kB) · UI Components ⚪ 0 B (186 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.22 MB (baseline 3.22 MB) • 🟢 -163 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CRPAyso3.js (removed) 2.99 MB 🟢 -2.99 MB 🟢 -631 kB 🟢 -480 kB
assets/index-BjPnBFew.js (new) 2.99 MB 🔴 +2.99 MB 🔴 +631 kB 🔴 +480 kB
assets/index-BLyXWcns.js (new) 228 kB 🔴 +228 kB 🔴 +48.7 kB 🔴 +40 kB
assets/index-x8X2_Kgo.js (removed) 228 kB 🟢 -228 kB 🟢 -48.7 kB 🟢 -40.1 kB
assets/index-CzTJapXu.js (new) 345 B 🔴 +345 B 🔴 +243 B 🔴 +232 B
assets/index-DsPJ9rHe.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -210 B

Status: 3 added / 3 removed

Graph Workspace — 992 kB (baseline 993 kB) • 🟢 -1.41 kB

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-1LVXRMF4.js (removed) 993 kB 🟢 -993 kB 🟢 -194 kB 🟢 -148 kB
assets/GraphView-CVnu-uHn.js (new) 992 kB 🔴 +992 kB 🔴 +194 kB 🔴 +147 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-BwIWQRKS.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-Dg-bFLng.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-B9UppsK2.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.16 kB 🔴 +4.5 kB
assets/LegacyCreditsPanel-D78YhPVE.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.16 kB 🟢 -4.51 kB
assets/KeybindingPanel-C376suAk.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.02 kB
assets/KeybindingPanel-Dv7F0i2E.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/ExtensionPanel-C90TCFDL.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.24 kB
assets/ExtensionPanel-OBmMurXD.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.24 kB
assets/AboutPanel-BdIS7zll.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-D5hwPoiM.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-Dfu2FsBq.js (new) 7.07 kB 🔴 +7.07 kB 🔴 +1.98 kB 🔴 +1.76 kB
assets/ServerConfigPanel-Dte0_tFn.js (removed) 7.07 kB 🟢 -7.07 kB 🟢 -1.98 kB 🟢 -1.76 kB
assets/UserPanel-D9KS9Ibd.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/UserPanel-SVN1BLKz.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.5 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BvFz-TmQ.js 33.1 kB 33.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BxYnTA2y.js 21.5 kB 21.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C6bMjAne.js 27.1 kB 27.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C7Yhp7H7.js 24 kB 24 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CsnOn8G0.js 25.7 kB 25.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D5BGNZ7M.js 24.8 kB 24.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D7k3huHm.js 25 kB 25 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DamkILzl.js 26.4 kB 26.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-s1k0gw1Y.js 20.9 kB 20.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-DEzEThyL.js (new) 54.3 kB 🔴 +54.3 kB 🔴 +8.62 kB 🔴 +7.42 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-lu_XnsUS.js (removed) 54.3 kB 🟢 -54.3 kB 🟢 -8.62 kB 🟢 -7.42 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-CftIieqx.js (removed) 50 kB 🟢 -50 kB 🟢 -11 kB 🟢 -9.63 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Dc_mf_4O.js (new) 50 kB 🔴 +50 kB 🔴 +11 kB 🔴 +9.63 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CB5XTs6R.js (removed) 48.8 kB 🟢 -48.8 kB 🟢 -10.5 kB 🟢 -9.13 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-Qf3UaTB-.js (new) 48.8 kB 🔴 +48.8 kB 🔴 +10.5 kB 🔴 +9.13 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-53oy7Wge.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.74 kB 🔴 +3.28 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DV4FbEfg.js (removed) 14.3 kB 🟢 -14.3 kB 🟢 -3.73 kB 🟢 -3.29 kB
assets/ComfyQueueButton-DhXmqiP5.js (removed) 8.45 kB 🟢 -8.45 kB 🟢 -2.47 kB 🟢 -2.2 kB
assets/ComfyQueueButton-DTOGrYo-.js (new) 8.45 kB 🔴 +8.45 kB 🔴 +2.46 kB 🔴 +2.2 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-HkBDysp3.js (removed) 3.68 kB 🟢 -3.68 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-OjqMcqfD.js (new) 3.68 kB 🔴 +3.68 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-4_up1okB.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -888 B 🟢 -767 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BCv4XiJx.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +890 B 🔴 +770 B
assets/WidgetButton-CgdFl3qP.js (new) 2.04 kB 🔴 +2.04 kB 🔴 +928 B 🔴 +816 B
assets/WidgetButton-U5ly29Pt.js (removed) 2.04 kB 🟢 -2.04 kB 🟢 -927 B 🟢 -811 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-BJIauemk.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +686 B 🔴 +598 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DymEwRe0.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -686 B 🟢 -595 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-C-47ESQG.js (new) 897 B 🔴 +897 B 🔴 +505 B 🔴 +435 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CnHL_M9Q.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -470 B

Status: 10 added / 10 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-DtKElWf1.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-zkReQ73o.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.59 kB
assets/serverConfigStore-7JI8VFS2.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -909 B 🟢 -793 B
assets/serverConfigStore-CNSmwya1.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +902 B 🔴 +792 B
assets/audioService-BEkOML7l.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -822 B
assets/audioService-CD0KlDSa.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +959 B 🔴 +824 B

Status: 3 added / 3 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-BjdoEgMY.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -551 B
assets/audioUtils-C-cS5UzG.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +549 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-BKKxyZwz.js (new) 3.86 MB 🔴 +3.86 MB 🔴 +839 kB 🔴 +672 kB
assets/vendor-other-Cf7iqkoX.js (removed) 3.86 MB 🟢 -3.86 MB 🟢 -839 kB 🟢 -672 kB
assets/vendor-primevue-BIgr9yoj.js (removed) 1.96 MB 🟢 -1.96 MB 🟢 -334 kB 🟢 -202 kB
assets/vendor-primevue-DE5Oa-sb.js (new) 1.96 MB 🔴 +1.96 MB 🔴 +334 kB 🔴 +202 kB
assets/vendor-chart-DaR9dw3X.js (removed) 452 kB 🟢 -452 kB 🟢 -99 kB 🟢 -81 kB
assets/vendor-chart-DOvov576.js (new) 452 kB 🔴 +452 kB 🔴 +99 kB 🔴 +81 kB
assets/vendor-tiptap-C1NB2Q_L.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-tiptap-CUNFo3Ub.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-vue-BlzIh1pE.js (new) 160 kB 🔴 +160 kB 🔴 +37.2 kB 🔴 +31.4 kB
assets/vendor-vue-DSfeuQOV.js (removed) 160 kB 🟢 -160 kB 🟢 -37.2 kB 🟢 -31.4 kB
assets/vendor-three-DYL0ZbEr.js 2.02 MB 2.02 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

Other — 3.44 MB (baseline 3.44 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-B37n4waH.js (removed) 28 kB 🟢 -28 kB 🟢 -6.34 kB 🟢 -5.5 kB
assets/SubscriptionRequiredDialogContent-Co8aovZv.js (new) 28 kB 🔴 +28 kB 🔴 +6.33 kB 🔴 +5.5 kB
assets/WidgetRecordAudio-BnCmk5Rm.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.63 kB
assets/WidgetRecordAudio-DdDPDNUV.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/AudioPreviewPlayer-BxGRKvc3.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -2.99 kB
assets/AudioPreviewPlayer-PjBFPZOj.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/ValueControlPopover-bCvKFqZq.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.52 kB
assets/ValueControlPopover-BSqxTWS3.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.7 kB 🟢 -1.52 kB
assets/WidgetGalleria-DgJmQ4zl.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetGalleria-DLOaMB4O.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.31 kB
assets/WidgetColorPicker-_4droDwF.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-CMU__Oov.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetTextarea-CGOgN7-D.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.08 kB
assets/WidgetTextarea-Cy6Kmpz8.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.08 kB
assets/WidgetMarkdown-CCrBQFiJ.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetMarkdown-CUeMAY_W.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-C0eD3iuW.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetAudioUI-CPsxgaw7.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/MediaVideoTop-BqwS3WNi.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.02 kB 🔴 +868 B
assets/MediaVideoTop-BVdg2b8C.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.02 kB 🟢 -869 B
assets/WidgetChart-6jZh920S.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +933 B 🔴 +819 B
assets/WidgetChart-BU__hen8.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -930 B 🟢 -819 B
assets/WidgetImageCompare-0zJeINY-.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -748 B 🟢 -665 B
assets/WidgetImageCompare-DZEnujCN.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +750 B 🔴 +663 B
assets/WidgetInputText-B6iuCNMs.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +918 B 🔴 +852 B
assets/WidgetInputText-Cj0y_z_O.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -920 B 🟢 -853 B
assets/WidgetToggleSwitch-Bqx3zHzW.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +834 B 🔴 +735 B
assets/WidgetToggleSwitch-DyxJLzOm.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -834 B 🟢 -728 B
assets/MediaImageTop-BXa-oKEc.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -841 B 🟢 -719 B
assets/MediaImageTop-DTAowaFC.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +843 B 🔴 +722 B
assets/MediaImageBottom-BY84lmau.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -735 B 🟢 -637 B
assets/MediaImageBottom-D22yhZk-.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +731 B 🔴 +641 B
assets/MediaAudioBottom-DQum3qn8.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -732 B 🟢 -644 B
assets/MediaAudioBottom-RIxFbDMF.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +733 B 🔴 +646 B
assets/Media3DBottom-CQck-9OW.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +645 B
assets/Media3DBottom-D00LRIC4.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -644 B
assets/MediaVideoBottom-CuxWz0yc.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +646 B
assets/MediaVideoBottom-DNaFw2Zs.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -731 B 🟢 -647 B
assets/Media3DTop-C7hgO2NB.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -767 B 🟢 -653 B
assets/Media3DTop-DYAHd0iQ.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +653 B
assets/MediaAudioTop-Bu3Uau7e.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +741 B 🔴 +616 B
assets/MediaAudioTop-Dr0afgCA.js (removed) 1.46 kB 🟢 -1.46 kB 🟢 -740 B 🟢 -619 B
assets/WidgetSelect-BjJrzI-7.js (new) 733 B 🔴 +733 B 🔴 +362 B 🔴 +317 B
assets/WidgetSelect-Ctp6tGrk.js (removed) 733 B 🟢 -733 B 🟢 -361 B 🟢 -325 B
assets/WidgetInputNumber-CubPmmR4.js (removed) 673 B 🟢 -673 B 🟢 -348 B 🟢 -290 B
assets/WidgetInputNumber-Da7SOd-N.js (new) 673 B 🔴 +673 B 🔴 +348 B 🔴 +298 B
assets/Load3D-CZJ2PB2G.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -222 B
assets/Load3D-DduFRoDD.js (new) 424 B 🔴 +424 B 🔴 +265 B 🔴 +225 B
assets/WidgetLegacy-CJDgzhXx.js (new) 364 B 🔴 +364 B 🔴 +238 B 🔴 +195 B
assets/WidgetLegacy-DpWmwQ7f.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -197 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/commands-Zxyx15Vd.js 12.8 kB 12.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BDhxs-bB.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BtXVDFw6.js 84.7 kB 84.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Buv6RhU4.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CgJ6zvJL.js 97.2 kB 97.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CI9qb0E5.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cu4LqtW0.js 81.6 kB 81.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dm19QY4N.js 92.2 kB 92.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Tihe0h_r.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-wPWMutMw.js 70.4 kB 70.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-1Vh3MCrN.js 240 kB 240 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-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/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 25 added / 25 removed

@AustinMroz AustinMroz marked this pull request as ready for review December 17, 2025 03:22
@AustinMroz AustinMroz requested a review from a team as a code owner December 17, 2025 03:22
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 17, 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: 3

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed7dce8 and 0227dd6.

📒 Files selected for processing (1)
  • src/composables/graph/useGraphNodeManager.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
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

src/**/*.{vue,ts}: Avoid using ref and watch together - use computed instead if possible
Do not add ref if a prop would suffice; do not add computed if the ref/prop directly would work; use watch only when computed won't accomplish the goal
Leverage VueUse functions for performance-enhancing styles

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: Extract complex type definitions that are inlined in multiple related places - name them for reuse
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}: ESLint rules: Vue + TS rules, no floating promises, unused imports disallowed, i18n raw text restrictions in templates
Use es-toolkit for utility functions
Avoid mutable state - prefer immutability and assignment at point of declaration
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

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

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively - no new JavaScript files

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

Composables must follow the naming pattern useXyz.ts

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx,vue,js}: Indent with 2 spaces, use single quotes, no trailing semicolons, line width 80 - see .prettierrc
Sort and group imports by plugin, run pnpm format before committing

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

Do not use function expressions - use function declarations instead when possible

Files:

  • src/composables/graph/useGraphNodeManager.ts
🧠 Learnings (14)
📓 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
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
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T01:01:03.597Z
Learning: Applies to src/**/*.{vue,ts} : Avoid using `ref` and `watch` together - use `computed` instead if possible
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`.
📚 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:

  • src/composables/graph/useGraphNodeManager.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:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-17T01:01:03.597Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T01:01:03.597Z
Learning: Applies to src/**/*.{vue,ts} : Do not add `ref` if a prop would suffice; do not add `computed` if the ref/prop directly would work; use `watch` only when `computed` won't accomplish the goal

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-17T01:01:03.597Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T01:01:03.597Z
Learning: Applies to src/**/*.{vue,ts} : Avoid using `ref` and `watch` together - use `computed` instead if possible

Applied to files:

  • src/composables/graph/useGraphNodeManager.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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/composables/graph/useGraphNodeManager.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,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/composables/graph/useGraphNodeManager.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 : Implement computed properties with computed()

Applied to files:

  • src/composables/graph/useGraphNodeManager.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,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/composables/graph/useGraphNodeManager.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 lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API

Applied to files:

  • src/composables/graph/useGraphNodeManager.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:

  • 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-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
🧬 Code graph analysis (1)
src/composables/graph/useGraphNodeManager.ts (3)
src/types/simplifiedWidget.ts (1)
  • WidgetValue (8-16)
src/composables/functional/useChainCallback.ts (1)
  • useChainCallback (24-35)
src/lib/litegraph/src/widgets/BaseWidget.ts (2)
  • value (100-102)
  • value (104-106)
🔇 Additional comments (2)
src/composables/graph/useGraphNodeManager.ts (2)

90-107: Bidirectional sync via ref+watch is appropriate here.

While coding guidelines suggest avoiding ref and watch together in favor of computed, this bidirectional synchronization between Vue state and LiteGraph widgets is a valid exception—computed cannot handle writes back to the widget.

The WeakMap approach ensures widgets are garbage-collected when no longer referenced, preventing memory leaks.


97-104: Potential double callback invocation when Vue ref changes.

When valueRef changes, the watch (line 99) invokes widget.callback, which includes the chained callback from line 101. This means any external listener on the original widget.callback gets called both:

  1. When LiteGraph updates widget.value directly
  2. When Vue updates valueRef.value

This could cause unexpected double-invocations of LiteGraph-side callbacks. Consider whether the intent is to only call the original callback when the change originates from LiteGraph, not from Vue's reactivity.

#!/bin/bash
# Check how widget.callback is typically used and if double invocation could be problematic
rg -n -C3 'widget\.callback' --type ts -g '!*.test.ts' -g '!*.spec.ts'

@AustinMroz AustinMroz marked this pull request as draft December 20, 2025 03:52
ID map seems unneeded will test and prune

Will likely set stub type in litegraph. It breaks typing
Changes to side panel are minimal to potential merge conflicts
There is no duck violence in ba sing se
@AustinMroz AustinMroz force-pushed the austin/fix-vue-callbacks branch from 0227dd6 to 28cc476 Compare December 21, 2025 21:49
@AustinMroz AustinMroz marked this pull request as ready for review December 22, 2025 06:31
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

♻️ Duplicate comments (1)
src/composables/graph/useGraphNodeManager.ts (1)

126-155: Address previous review feedback.

Two issues from previous reviews remain unaddressed:

  1. Function declaration preferred: Per coding guidelines, use function normalizeWidgetValue(value: unknown): WidgetValue instead of const normalizeWidgetValue = (value: unknown): WidgetValue =>.

  2. Empty File[] arrays not recognized (lines 142-148): The value.length > 0 check causes empty File[] arrays to be treated as generic objects. If empty file arrays are valid widget values, this creates inconsistent type handling.

🔎 Apply both fixes
-/**
- * Validates that a value is a valid WidgetValue type
- */
-const normalizeWidgetValue = (value: unknown): WidgetValue => {
+/**
+ * Validates that a value is a valid WidgetValue type
+ */
+function normalizeWidgetValue(value: unknown): WidgetValue {
   if (value === null || value === undefined || value === void 0) {
     return undefined
   }
   if (
     typeof value === 'string' ||
     typeof value === 'number' ||
     typeof value === 'boolean'
   ) {
     return value
   }
   if (typeof value === 'object') {
     // Check if it's a File array
     if (
       Array.isArray(value) &&
-      value.length > 0 &&
       value.every((item): item is File => item instanceof File)
     ) {
       return value
     }
     // Otherwise it's a generic object
     return value
   }
   // If none of the above, return undefined
   console.warn(`Invalid widget value type: ${typeof value}`, value)
   return undefined
 }

Based on learnings from previous reviews.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0227dd6 and f903d92.

📒 Files selected for processing (4)
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/composables/graph/useGraphNodeManager.ts
  • src/core/graph/subgraph/proxyWidget.ts
  • src/lib/litegraph/src/types/widgets.ts
🧰 Additional context used
📓 Path-based instructions (18)
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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/lib/litegraph/src/types/widgets.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/lib/litegraph/src/types/widgets.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/types/widgets.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/**/{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/components/rightSidePanel/parameters/SectionWidgets.vue
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/components/rightSidePanel/parameters/SectionWidgets.vue
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

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

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

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
src/components/**/*.vue

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.vue: Use setup() function in Vue 3 Composition API
Destructure props using Vue 3.5 style in Vue components
Use ref/reactive for state management in Vue 3 Composition API
Implement computed() for derived state in Vue 3 Composition API
Use provide/inject for dependency injection in Vue components
Prefer emit/@event-name for state changes over other communication patterns
Use defineExpose only for imperative operations (such as form.validate(), modal.open())
Replace PrimeVue Dropdown component with Select
Replace PrimeVue OverlayPanel component with Popover
Replace PrimeVue Calendar component with DatePicker
Replace PrimeVue InputSwitch component with ToggleSwitch
Replace PrimeVue Sidebar component with Drawer
Replace PrimeVue Chips component with AutoComplete with multiple enabled
Replace PrimeVue TabMenu component with Tabs without panels
Replace PrimeVue Steps component with Stepper without panels
Replace PrimeVue InlineMessage component with Message
Extract complex conditionals to computed properties
Implement cleanup for async operations in Vue components
Use lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API
Use Teleport/Suspense when needed for component rendering
Define proper props and emits definitions in Vue components

Files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
src/components/**/*.{vue,css}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,css}: Use Tailwind CSS only for styling (no custom CSS)
Use the correct tokens from style.css in the design system package

Files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3.5+ with TypeScript in .vue files, exclusively using Composition API with <script setup lang="ts"> syntax
Use Tailwind 4 for styling in Vue components; avoid <style> blocks
Name Vue components using PascalCase (e.g., MenuHamburger.vue)
Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer computed() over ref with watch when deriving values
Prefer useModel over separately defining prop and emit for two-way binding
Use vue-i18n in composition API for string literals; place new translation entries in src/locales/en/main.json
Use cn() utility function from @/utils/tailwindUtil for merging Tailwind class names; do not use :class="[]" syntax
Do not use the dark: Tailwind variant; use semantic values from the style.css theme instead (e.g., bg-node-component-surface)
Do not use !important or the ! important prefix for Tailwind classes; find and correct interfering !important classes instead
Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Leverage VueUse functions for performance-enhancing styles in Vue components
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
src/lib/litegraph/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

src/lib/litegraph/**/*.{js,ts,jsx,tsx}: Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the pnpm lint:fix command
Take advantage of TypedArray subarray when appropriate
The size and pos properties of Rectangle share the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single line if syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Do not replace &&= or ||= with = when there is no reason to do so. If you do find a reason to remove either &&= or ||=, leave a comment explaining why the removal occurred
When writing methods, prefer returning idiomatic JavaScript undefined over null

Files:

  • src/lib/litegraph/src/types/widgets.ts
src/lib/litegraph/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Files:

  • src/lib/litegraph/src/types/widgets.ts
🧠 Learnings (27)
📓 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
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
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`.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Prefer `useModel` over separately defining prop and emit for two-way binding
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declaration
📚 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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/lib/litegraph/src/types/widgets.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/core/graph/subgraph/proxyWidget.ts
  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
  • src/lib/litegraph/src/types/widgets.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:

  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 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:

  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 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:

  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.{ts,tsx,vue} : Use function declarations instead of function expressions when possible

Applied to files:

  • src/composables/graph/useGraphNodeManager.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/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred

Applied to files:

  • src/composables/graph/useGraphNodeManager.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/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.{ts,tsx,vue} : Do not use `any` type or `as any` type assertions; fix the underlying type issue instead

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Prefer `computed()` over `ref` with `watch` when deriving values

Applied to files:

  • src/composables/graph/useGraphNodeManager.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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 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 : Implement computed properties with computed()

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 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,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Leverage VueUse functions for performance-enhancing styles in Vue components

Applied to files:

  • src/composables/graph/useGraphNodeManager.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,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead

Applied to files:

  • src/composables/graph/useGraphNodeManager.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Prefer `useModel` over separately defining prop and emit for two-way binding

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.

Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-16T22:26:49.463Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.vue:17-17
Timestamp: 2025-12-16T22:26:49.463Z
Learning: In Vue 3.5+ with <script setup>, when using defineProps<Props>() with partial destructuring (e.g., const { as = 'button', class: customClass = '' } = defineProps<Props>() ), props that are not destructured (e.g., variant, size) stay accessible by name in the template scope. This pattern is valid: you can destructure only a subset of props for convenience while referencing the remaining props directly in template expressions. Apply this guideline to Vue components across the codebase (all .vue files).

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-18T02:07:38.870Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7598
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:131-131
Timestamp: 2025-12-18T02:07:38.870Z
Learning: Tailwind CSS v4 safe utilities (e.g., items-center-safe, justify-*-safe, place-*-safe) are allowed in Vue components under src/ and in story files. Do not flag these specific safe variants as invalid when reviewing code in src/**/*.vue or related stories.

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-18T21:15:46.862Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7603
File: src/components/queue/QueueOverlayHeader.vue:49-59
Timestamp: 2025-12-18T21:15:46.862Z
Learning: In the ComfyUI_frontend repository, for Vue components, do not add aria-label to buttons that have visible text content (e.g., buttons containing <span> text). The visible text provides the accessible name. Use aria-label only for elements without visible labels (e.g., icon-only buttons). If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-21T01:06:02.786Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/components/graph/selectionToolbox/ColorPickerButton.vue:15-18
Timestamp: 2025-12-21T01:06:02.786Z
Learning: In Comfy-Org/ComfyUI_frontend, in Vue component files, when a filled icon is required (e.g., 'pi pi-circle-fill'), you may mix PrimeIcons with Lucide icons since Lucide lacks filled variants. This mixed usage is acceptable when one icon library does not provide an equivalent filled icon. Apply consistently across Vue components in the src directory where icons are used, and document the rationale when a mixed approach is chosen.

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
📚 Learning: 2025-12-18T16:03:02.066Z
Learnt from: henrikvilhelmberglund
Repo: Comfy-Org/ComfyUI_frontend PR: 7617
File: src/components/actionbar/ComfyActionbar.vue:301-308
Timestamp: 2025-12-18T16:03:02.066Z
Learning: In the ComfyUI frontend queue system, useQueuePendingTaskCountStore().count indicates the number of tasks in the queue, where count = 1 means a single active/running task and count > 1 means there are pending tasks in addition to the active task. Therefore, in src/components/actionbar/ComfyActionbar.vue, enable the 'Clear Pending Tasks' button only when count > 1 to avoid clearing the currently running task. The active task should be canceled using the 'Cancel current run' button instead. This rule should be enforced via a conditional check on the queue count, with appropriate disabled/aria-disabled states for accessibility, and tests should verify behavior for count = 1 and count > 1.

Applied to files:

  • src/components/rightSidePanel/parameters/SectionWidgets.vue
🧬 Code graph analysis (2)
src/core/graph/subgraph/proxyWidget.ts (3)
src/lib/litegraph/src/types/widgets.ts (1)
  • IBaseWidget (271-430)
src/lib/litegraph/src/widgets/BaseWidget.ts (2)
  • value (100-102)
  • value (104-106)
src/scripts/domWidget.ts (2)
  • value (142-144)
  • value (146-149)
src/composables/graph/useGraphNodeManager.ts (2)
src/lib/litegraph/src/types/widgets.ts (1)
  • IBaseWidget (271-430)
src/types/simplifiedWidget.ts (1)
  • WidgetValue (8-16)
🔇 Additional comments (3)
src/lib/litegraph/src/types/widgets.ts (1)

287-287: LGTM! Clean extension for Vue integration.

The optional vueTrack property provides a clean hook for Vue-specific tracking without affecting existing widget functionality. The type signature is appropriate and the optional nature ensures backward compatibility.

src/core/graph/subgraph/proxyWidget.ts (1)

214-230: Simplified receiver logic improves consistency.

The proxy handler's set trap now consistently uses redirectedTarget as both the target and receiver for Reflect.set, simplifying the previous per-property receiver redirection logic. This change aligns with the PR's goal of ensuring predictable, single callback behavior for widgets.

src/composables/graph/useGraphNodeManager.ts (1)

171-180: Review the callback assignment pattern—direct value update may be redundant given the chained trigger.

The callback at lines 171-176 performs a direct widget.value = value ?? undefined assignment before invoking widget.callback?.(value). However, examining the setup reveals that widget.callback is already chained with trigger at line 100 via useChainCallback(widget.callback, trigger).

This creates two potential paths to update reactivity:

  • Direct assignment: widget.value = value ?? undefined
  • Chained callback: widget.callback?.(value)trigger()

Verify if the direct assignment is necessary. If useChainCallback ensures the trigger fires and updates the value, the direct assignment at line 173 may be redundant. However, if the direct assignment is needed to synchronously update widget.value before callback execution, it is intentional.

The guard at line 95 (if (widget.vueTrack) return) correctly prevents re-setup on repeated calls to useReactiveWidgetValue, making the mapper pattern efficient. Confirm with the useChainCallback implementation whether both the direct assignment and the chained callback trigger are necessary or if one can be removed.

}
if (typeof value === 'object') {
// Check if it's a File array
if (
Copy link
Contributor

Choose a reason for hiding this comment

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

is this check needed if we still return the value regardless?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IMO, no. There's been some long term discussion about wanting to phase away from simplifiedWidget and WidgetValue being a different type than TValue (in IBaseWidget) feels like a smell.

Since this function is just being moved without changes. I lean towards keeping this PR focused on the reactivity issue.

@AustinMroz AustinMroz merged commit f9b5890 into main Dec 23, 2025
27 checks passed
@AustinMroz AustinMroz deleted the austin/fix-vue-callbacks branch December 23, 2025 23:48
Yourz pushed a commit that referenced this pull request Dec 24, 2025
The other side of reactivity. Ensure that vue mode always registers a
callback on litegraph nodes and never registers more than one.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7579-Ensure-widgets-always-get-a-single-callback-2cc6d73d365081e2a488c38ae394efc0)
by [Unito](https://www.unito.io)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants