Skip to content

Dynamic input fixes#7837

Merged
christian-byrne merged 3 commits intomainfrom
austin/dynamic-input-fixes
Jan 7, 2026
Merged

Dynamic input fixes#7837
christian-byrne merged 3 commits intomainfrom
austin/dynamic-input-fixes

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Jan 4, 2026

A couple small dynamic input fixes.

  • When removing widgets, call any onRemove methods
    • This is required for DOMWidgets to properly clean themself up.
  • Resolve actual current link state when initializing match type
    • This is only a partial fix for combing matchtype with autogrow, there is a separate issue with skipped initialization that will need to be resolved separately in the future.

┆Issue is synchronized with this Notion page by Unito

@AustinMroz AustinMroz requested a review from a team as a code owner January 4, 2026 02:03
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 4, 2026
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/04/2026, 02:05:23 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 01/04/2026, 02:10:41 AM UTC

📈 Summary

  • Total Tests: 513
  • Passed: 504 ✅
  • Failed: 0
  • Flaky: 1 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

The pull request modifies src/core/graph/widgets/dynamicWidgets.ts to enhance widget lifecycle management and connection tracking safety. Changes include invoking cleanup callbacks (onRemove) when removing widgets and moving connection change updates into asynchronous blocks with safer property access.

Changes

Cohort / File(s) Summary
Widget Cleanup and Connection Updates
src/core/graph/widgets/dynamicWidgets.ts
Enhanced dynamicComboWidget and autogrowInputDisconnected to invoke onRemove callbacks on removed widgets. Modified applyMatchType to safely access last input via computed index and wrap connection change invocation in requestAnimationFrame with optional chaining.

Possibly related PRs

  • Comfy-Org/ComfyUI_frontend#6830: Directly modifies the same dynamicWidgets.ts functions to add onRemove invocations and make applyMatchType updates safer and asynchronous.
  • Comfy-Org/ComfyUI_frontend#7275: Modifies the same file and widget lifecycle functions including autogrowInputDisconnected and applyMatchType.
✨ 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 Jan 4, 2026

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — 🔴 +194 B
  • Gzip: 3.54 MB baseline 3.54 MB — 🟢 -7 B
  • Brotli: 2.7 MB baseline 2.7 MB — 🔴 +97 B
  • Bundles: 98 current • 98 baseline • 43 added / 43 removed

Category Glance
App Entry Points 🔴 +194 B (3.21 MB) · Vendor & Third-Party ⚪ 0 B (9.12 MB) · Other ⚪ 0 B (3.47 MB) · Graph Workspace ⚪ 0 B (1000 kB) · 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) • 🔴 +194 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CRbUFlQV.js (new) 3.02 MB 🔴 +3.02 MB 🔴 +634 kB 🔴 +482 kB
assets/index-BA5eZMZ8.js (removed) 3.02 MB 🟢 -3.02 MB 🟢 -634 kB 🟢 -482 kB
assets/index-B_wst2A6.js (new) 194 kB 🔴 +194 kB 🔴 +42.3 kB 🔴 +35.1 kB
assets/index-CRAS7mlZ.js (removed) 194 kB 🟢 -194 kB 🟢 -42.3 kB 🟢 -35.1 kB
assets/index-Dliiq7GE.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -202 B
assets/index-DX4otlzW.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +233 B

Status: 3 added / 3 removed

Graph Workspace — 1000 kB (baseline 1000 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-1WTHBptr.js (new) 1000 kB 🔴 +1000 kB 🔴 +194 kB 🔴 +148 kB
assets/GraphView-RZbHHAs9.js (removed) 1000 kB 🟢 -1000 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-Bfhyz6CQ.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.15 kB 🟢 -1.9 kB
assets/UserSelectView-CqmkW_g7.js (new) 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-BcSqHfSn.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.26 kB 🔴 +4.61 kB
assets/LegacyCreditsPanel-BTj4WiCP.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.26 kB 🟢 -4.6 kB
assets/KeybindingPanel-BIB6B_-l.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.14 kB
assets/KeybindingPanel-DAvzJxkS.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.58 kB 🟢 -3.12 kB
assets/ExtensionPanel-BY0XlxQJ.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/ExtensionPanel-DHpICjLj.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.3 kB
assets/AboutPanel-B3i-r3u8.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-BxcU7yRn.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-C5VCC20X.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.81 kB
assets/ServerConfigPanel-Dk6UqSeW.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.05 kB 🟢 -1.81 kB
assets/UserPanel-COxXiy5Z.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.57 kB
assets/UserPanel-kN7QRKuQ.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.57 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-BSIsJITJ.js (new) 60.1 kB 🔴 +60.1 kB 🔴 +12.4 kB 🔴 +10.8 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-HPBE6lG2.js (removed) 60.1 kB 🟢 -60.1 kB 🟢 -12.4 kB 🟢 -10.8 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-BMKmXTHT.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.92 kB 🔴 +7.62 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-D1Qtit1E.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.91 kB 🟢 -7.61 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-3VhWEtwB.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.13 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-E_T68qC-.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-B8vn21Zm.js (new) 14.6 kB 🔴 +14.6 kB 🔴 +3.79 kB 🔴 +3.34 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DwCrWJcs.js (removed) 14.6 kB 🟢 -14.6 kB 🟢 -3.79 kB 🟢 -3.34 kB
assets/ComfyQueueButton-BBmbkg14.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.58 kB 🟢 -2.3 kB
assets/ComfyQueueButton-yJ2Gy3XM.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.29 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-BfV8jDKz.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.46 kB 🔴 +1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-vn4lpTWx.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.46 kB 🟢 -1.32 kB
assets/WidgetButton-CZAydA9f.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +999 B 🔴 +876 B
assets/WidgetButton-vx-B0FJ7.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -998 B 🟢 -898 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Dsd391Lz.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -892 B 🟢 -771 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-sDeCcUjv.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +889 B 🔴 +770 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CIXHQiQ6.js (removed) 897 B 🟢 -897 B 🟢 -505 B 🟢 -446 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DasGp6v9.js (new) 897 B 🔴 +897 B 🔴 +502 B 🔴 +443 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-CeBqhuI0.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-Dje0y29g.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.57 kB
assets/audioService-B-TuFu56.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +961 B 🔴 +826 B
assets/audioService-BlUatW80.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -961 B 🟢 -826 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-6lEzZnsy.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -652 B 🟢 -548 B
assets/audioUtils-BABbMf2c.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +650 B 🔴 +553 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-BqEj5uu9.js (removed) 29 kB 🟢 -29 kB 🟢 -6.43 kB 🟢 -5.59 kB
assets/SubscriptionRequiredDialogContent-LFzsmDZS.js (new) 29 kB 🔴 +29 kB 🔴 +6.43 kB 🔴 +5.59 kB
assets/WidgetRecordAudio-BPj0TU6y.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-DifQCdn2.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.64 kB
assets/AudioPreviewPlayer-41eBK6CX.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -2.99 kB
assets/AudioPreviewPlayer-CJnRfTDW.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +2.99 kB
assets/ValueControlPopover-EOYAGd-Y.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.51 kB
assets/ValueControlPopover-IgKOrY3a.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.51 kB
assets/WidgetGalleria-34VeLnKe.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetGalleria-D3nhqTr8.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetColorPicker-B7pr75__.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-CStpEmYH.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-adgltL73.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.07 kB
assets/WidgetTextarea-m31xbQOD.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.08 kB
assets/WidgetMarkdown-CezcGSYR.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetMarkdown-DMCPkddM.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-CAclVmP7.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-DMXBmlMK.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetInputText-7-JzKrkV.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -925 B 🟢 -863 B
assets/WidgetInputText-DA_TUEdb.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +921 B 🔴 +853 B
assets/WidgetToggleSwitch-DWKNQPAR.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +836 B 🔴 +733 B
assets/WidgetToggleSwitch-lmxGyu16.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -838 B 🟢 -733 B
assets/MediaImageBottom-BYw_wNaD.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +734 B 🔴 +639 B
assets/MediaImageBottom-CXW3-LJ9.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -736 B 🟢 -640 B
assets/MediaAudioBottom-C1HOqtxz.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -734 B 🟢 -644 B
assets/MediaAudioBottom-C5TjIzD1.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +734 B 🔴 +644 B
assets/Media3DBottom-D9R9pXYm.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -734 B 🟢 -645 B
assets/Media3DBottom-DwidfY0X.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +642 B
assets/MediaVideoBottom-BN7KlIk4.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -646 B
assets/MediaVideoBottom-qnQEhQI5.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +733 B 🔴 +644 B
assets/Media3DTop-C0cSzkab.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +769 B 🔴 +652 B
assets/Media3DTop-DAWBFLAT.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -771 B 🟢 -650 B
assets/WidgetSelect-BKDgvucH.js (removed) 733 B 🟢 -733 B 🟢 -365 B 🟢 -331 B
assets/WidgetSelect-CB0Jxtal.js (new) 733 B 🔴 +733 B 🔴 +363 B 🔴 +321 B
assets/WidgetInputNumber-98VjYao_.js (removed) 673 B 🟢 -673 B 🟢 -349 B 🟢 -289 B
assets/WidgetInputNumber-CeuDvPiY.js (new) 673 B 🔴 +673 B 🔴 +349 B 🔴 +296 B
assets/Load3D-D_7YeD4a.js (new) 424 B 🔴 +424 B 🔴 +268 B 🔴 +222 B
assets/Load3D-tmf1t7_0.js (removed) 424 B 🟢 -424 B 🟢 -267 B 🟢 -222 B
assets/WidgetLegacy-B_3W6-x4.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -195 B
assets/WidgetLegacy-D4mFttkx.js (new) 364 B 🔴 +364 B 🔴 +237 B 🔴 +194 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: 1

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d1f8ed and 7ac11ce.

📒 Files selected for processing (1)
  • src/core/graph/widgets/dynamicWidgets.ts
🧰 Additional context used
📓 Path-based instructions (7)
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/widgets/dynamicWidgets.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/widgets/dynamicWidgets.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/widgets/dynamicWidgets.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/core/graph/widgets/dynamicWidgets.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/widgets/dynamicWidgets.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/widgets/dynamicWidgets.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

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

Applied to files:

  • src/core/graph/widgets/dynamicWidgets.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/widgets/dynamicWidgets.ts
🧬 Code graph analysis (1)
src/core/graph/widgets/dynamicWidgets.ts (3)
src/lib/litegraph/src/LGraphNode.ts (1)
  • widget (3968-3971)
src/extensions/core/widgetInputs.ts (1)
  • input (355-368)
src/lib/litegraph/src/litegraph.ts (1)
  • LiteGraph (17-17)
⏰ 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). (14)
  • GitHub Check: playwright-tests-chromium-sharded (8, 8)
  • GitHub Check: playwright-tests-chromium-sharded (7, 8)
  • GitHub Check: playwright-tests-chromium-sharded (6, 8)
  • GitHub Check: playwright-tests-chromium-sharded (2, 8)
  • GitHub Check: playwright-tests-chromium-sharded (4, 8)
  • GitHub Check: playwright-tests-chromium-sharded (3, 8)
  • GitHub Check: playwright-tests-chromium-sharded (5, 8)
  • GitHub Check: playwright-tests-chromium-sharded (1, 8)
  • GitHub Check: playwright-tests (chromium-2x)
  • GitHub Check: playwright-tests (mobile-chrome)
  • GitHub Check: playwright-tests (chromium-0.5x)
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (2)
src/core/graph/widgets/dynamicWidgets.ts (2)

97-97: LGTM! Proper cleanup callback invocation.

The addition of onRemove?.() ensures that widgets can clean up DOM elements, event listeners, and other resources when removed. The optional chaining appropriately handles widgets that don't define onRemove.


491-492: LGTM! Consistent cleanup pattern.

The cleanup callback invocation follows the same pattern as line 97, ensuring proper resource cleanup when autogrow inputs are removed. The optional chaining appropriately handles widgets without onRemove methods.

@christian-byrne christian-byrne merged commit dcf0886 into main Jan 7, 2026
32 checks passed
@christian-byrne christian-byrne deleted the austin/dynamic-input-fixes branch January 7, 2026 02:45
@christian-byrne christian-byrne added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.36 Backport PRs for core 1.36 cloud/1.36 Backport PRs for cloud 1.36 labels Jan 13, 2026
github-actions bot pushed a commit that referenced this pull request Jan 13, 2026
A couple small dynamic input fixes.
- When removing widgets, call any onRemove methods
  - This is required for DOMWidgets to properly clean themself up.
- Resolve actual current link state when initializing match type
- This is only a partial fix for combing matchtype with autogrow, there
is a separate issue with skipped initialization that will need to be
resolved separately in the future.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7837-Dynamic-input-fixes-2de6d73d365081bdb263ed659e25e6ea)
by [Unito](https://www.unito.io)
github-actions bot pushed a commit that referenced this pull request Jan 13, 2026
A couple small dynamic input fixes.
- When removing widgets, call any onRemove methods
  - This is required for DOMWidgets to properly clean themself up.
- Resolve actual current link state when initializing match type
- This is only a partial fix for combing matchtype with autogrow, there
is a separate issue with skipped initialization that will need to be
resolved separately in the future.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7837-Dynamic-input-fixes-2de6d73d365081bdb263ed659e25e6ea)
by [Unito](https://www.unito.io)
@comfy-pr-bot
Copy link
Member

@AustinMroz Successfully backported to #8007

@comfy-pr-bot
Copy link
Member

@AustinMroz Successfully backported to #8008

@github-actions github-actions bot removed the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Jan 13, 2026
christian-byrne pushed a commit that referenced this pull request Jan 13, 2026
Backport of #7837 to `cloud/1.36`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8008-backport-cloud-1-36-Dynamic-input-fixes-2e76d73d3650811186daca4b7e20b83a)
by [Unito](https://www.unito.io)

Co-authored-by: AustinMroz <austin@comfy.org>
christian-byrne pushed a commit that referenced this pull request Jan 13, 2026
Backport of #7837 to `core/1.36`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8007-backport-core-1-36-Dynamic-input-fixes-2e76d73d3650819096fec97f5bd0f3d3)
by [Unito](https://www.unito.io)

Co-authored-by: AustinMroz <austin@comfy.org>
christian-byrne added a commit that referenced this pull request Jan 30, 2026
…#8469)

## Summary

Fixes a bug where socket map data was not properly removed when sockets
are dynamically added/removed via DynamicCombo widgets in Vue mode
(Nodes 2.0).

## Problem

When DynamicCombo widgets (e.g., `should_remesh` on Meshy nodes) change
their selection, inputs are dynamically added/removed. The Vue `v-for`
loop in `NodeSlots.vue` was using array index as the `:key`, causing Vue
to **reuse** slot components instead of properly unmounting them.

This led to:
- Socket map entries leaking (never cleaned up)
- Socket positions becoming desynced
- Stale cached offset data

## Solution

1. **Use slot `name` as Vue key** instead of array index in
`NodeSlots.vue`
   - Slot names are unique per node (enforced by ComfyUI backend)
- When a slot is removed, Vue sees the key disappear and properly
unmounts the component
- `onUnmounted` cleanup in `useSlotElementTracking` now runs correctly

2. **Add defensive cleanup** in `useSlotElementTracking.ts`
- Before registering a new slot, check if a stale entry exists with the
same key
   - Clean up stale entry to handle any edge cases

## Related

- Fixes COM-12970
- Related to #7837 (fixed LiteGraph version of this bug, but not Vue
mode)

## Testing

- Quality checks pass (typecheck, lint, format)
- Manual testing with DynamicCombo nodes (Meshy, nodes_logic)
recommended

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8469-fix-Vue-mode-socket-map-data-not-cleaned-up-on-dynamic-input-changes-2f86d73d365081e599eadca4f15e6b6e)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Subagent 5 <subagent@example.com>
Co-authored-by: Amp <amp@ampcode.com>
snomiao pushed a commit that referenced this pull request Jan 30, 2026
…#8469)

## Summary

Fixes a bug where socket map data was not properly removed when sockets
are dynamically added/removed via DynamicCombo widgets in Vue mode
(Nodes 2.0).

## Problem

When DynamicCombo widgets (e.g., `should_remesh` on Meshy nodes) change
their selection, inputs are dynamically added/removed. The Vue `v-for`
loop in `NodeSlots.vue` was using array index as the `:key`, causing Vue
to **reuse** slot components instead of properly unmounting them.

This led to:
- Socket map entries leaking (never cleaned up)
- Socket positions becoming desynced
- Stale cached offset data

## Solution

1. **Use slot `name` as Vue key** instead of array index in
`NodeSlots.vue`
   - Slot names are unique per node (enforced by ComfyUI backend)
- When a slot is removed, Vue sees the key disappear and properly
unmounts the component
- `onUnmounted` cleanup in `useSlotElementTracking` now runs correctly

2. **Add defensive cleanup** in `useSlotElementTracking.ts`
- Before registering a new slot, check if a stale entry exists with the
same key
   - Clean up stale entry to handle any edge cases

## Related

- Fixes COM-12970
- Related to #7837 (fixed LiteGraph version of this bug, but not Vue
mode)

## Testing

- Quality checks pass (typecheck, lint, format)
- Manual testing with DynamicCombo nodes (Meshy, nodes_logic)
recommended

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8469-fix-Vue-mode-socket-map-data-not-cleaned-up-on-dynamic-input-changes-2f86d73d365081e599eadca4f15e6b6e)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Subagent 5 <subagent@example.com>
Co-authored-by: Amp <amp@ampcode.com>
DrJKL pushed a commit that referenced this pull request Jan 31, 2026
…#8469)

## Summary

Fixes a bug where socket map data was not properly removed when sockets
are dynamically added/removed via DynamicCombo widgets in Vue mode
(Nodes 2.0).

## Problem

When DynamicCombo widgets (e.g., `should_remesh` on Meshy nodes) change
their selection, inputs are dynamically added/removed. The Vue `v-for`
loop in `NodeSlots.vue` was using array index as the `:key`, causing Vue
to **reuse** slot components instead of properly unmounting them.

This led to:
- Socket map entries leaking (never cleaned up)
- Socket positions becoming desynced
- Stale cached offset data

## Solution

1. **Use slot `name` as Vue key** instead of array index in
`NodeSlots.vue`
   - Slot names are unique per node (enforced by ComfyUI backend)
- When a slot is removed, Vue sees the key disappear and properly
unmounts the component
- `onUnmounted` cleanup in `useSlotElementTracking` now runs correctly

2. **Add defensive cleanup** in `useSlotElementTracking.ts`
- Before registering a new slot, check if a stale entry exists with the
same key
   - Clean up stale entry to handle any edge cases

## Related

- Fixes COM-12970
- Related to #7837 (fixed LiteGraph version of this bug, but not Vue
mode)

## Testing

- Quality checks pass (typecheck, lint, format)
- Manual testing with DynamicCombo nodes (Meshy, nodes_logic)
recommended

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8469-fix-Vue-mode-socket-map-data-not-cleaned-up-on-dynamic-input-changes-2f86d73d365081e599eadca4f15e6b6e)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Subagent 5 <subagent@example.com>
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloud/1.36 Backport PRs for cloud 1.36 core/1.36 Backport PRs for core 1.36 size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants