Skip to content

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Dec 16, 2025

With reactivity fixed, control widgets would apply twice. This is fixed by using the litegraph implementation.

Also adds control widget support for combos

Followup to #7539.

Known Issue:

  • Primitive node do not have litegraph callbacks properly setup. As a result, they will display an updated value when modified by control widgets. Fixing this will requires a larger, separate PR

┆Issue is synchronized with this Notion page by Unito

@AustinMroz AustinMroz requested a review from a team as a code owner December 16, 2025 05:59
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Dec 16, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

📝 Walkthrough

Walkthrough

Refactors widget control functionality from a registry-based enum pattern to a component-wrapper architecture. Introduces WidgetWithControl wrapper, removes NumberControlRegistry and useStepperControl composable, updates WidgetInputNumber and WidgetSelect to use the wrapper, replaces enum-based control modes with string literals, and renames locale keys from "numberControl" to "valueControl".

Changes

Cohort / File(s) Summary
Control Wrapper Architecture
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue, src/types/simplifiedWidget.ts
New generic WidgetWithControl component wraps widgets with control button and async ValueControlPopover; new SimplifiedControlWidget<T> interface extends SimplifiedWidget with required controlWidget property
Widget Component Refactoring
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue, src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
Both updated to use WidgetWithControl wrapper when control widget exists; WidgetInputNumber casts widget to SimplifiedControlWidget<number>; WidgetSelect adds StringControlWidget type alias
Removed Control Components
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberWithControl.vue, src/renderer/extensions/vueNodes/widgets/composables/useStepperControl.ts, src/renderer/extensions/vueNodes/widgets/services/NumberControlRegistry.ts
Deleted: dedicated control component, stepper control composable with NumberControlMode enum, and registry for managing control callbacks
Value Control UI Updates
src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue, src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
ValueControlPopover converts mode enum to string literals and updates model type to ControlOptions; WidgetSelectDefault adds dynamic class and slot-based container for inline UI elements
Localization & Integration
src/locales/en/main.json, src/scripts/app.ts, src/extensions/core/widgetInputs.ts
Locale key renamed "numberControl" → "valueControl" with updated descriptions; removed executeNumberControls calls from app queue flow; added linkedWidgets assignment in widget creation for cascading behavior
Test Removal
tests-ui/tests/renderer/extensions/vueNodes/widgets/composables/useStepperControl.test.ts, tests-ui/tests/renderer/extensions/vueNodes/widgets/services/NumberControlRegistry.test.ts
Deleted test files for removed useStepperControl composable and NumberControlRegistry service

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-double-cag

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 16, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/16/2025, 10:28:11 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 16, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/16/2025, 10:38:15 PM UTC

📈 Summary

  • Total Tests: 506
  • Passed: 495 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 483 / ❌ 0 / ⚠️ 2 / ⏭️ 9
  • 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 16, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🟢 -2.45 kB
  • Gzip: 3.39 MB baseline 3.39 MB — 🟢 -165 B
  • Brotli: 2.6 MB baseline 2.6 MB — 🔴 +2 B
  • Bundles: 99 current • 98 baseline • 41 added / 40 removed

Category Glance
App Entry Points 🟢 -1.02 kB (3.25 MB) · UI Components 🟢 -919 B (183 kB) · Other 🟢 -584 B (3.75 MB) · Graph Workspace 🔴 +73 B (992 kB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Panels & Settings ⚪ 0 B (299 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.25 MB (baseline 3.25 MB) • 🟢 -1.02 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-BGCwXGX9.js (removed) 3.02 MB 🟢 -3.02 MB 🟢 -628 kB 🟢 -478 kB
assets/index-o_cY8B6z.js (new) 3.02 MB 🔴 +3.02 MB 🔴 +628 kB 🔴 +478 kB
assets/index-DQiIPvUr.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +39.9 kB
assets/index-DGY2_4RF.js (removed) 227 kB 🟢 -227 kB 🟢 -48.6 kB 🟢 -39.8 kB
assets/index-C2TEgD4s.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +211 B
assets/index-CTr3Yj2R.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -231 B

Status: 3 added / 3 removed

Graph Workspace — 992 kB (baseline 992 kB) • 🔴 +73 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DO9e4B0s.js (new) 992 kB 🔴 +992 kB 🔴 +193 kB 🔴 +147 kB
assets/GraphView-D6gQcs8P.js (removed) 992 kB 🟢 -992 kB 🟢 -192 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-C_X5VMu0.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.89 kB
assets/UserSelectView-DRxDLGxj.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-CgTLoFMp.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/LegacyCreditsPanel-Cth307G0.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/KeybindingPanel-B5SCSrs9.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/KeybindingPanel-BMRLCc7T.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.02 kB
assets/ExtensionPanel-Cbha2qiK.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.25 kB
assets/ExtensionPanel-DUKtags5.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.26 kB
assets/AboutPanel-BikaG5lr.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-CPolr3Gs.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-7rsanfni.js (new) 7.07 kB 🔴 +7.07 kB 🔴 +1.98 kB 🔴 +1.77 kB
assets/ServerConfigPanel-DMSGxtSY.js (removed) 7.07 kB 🟢 -7.07 kB 🟢 -1.99 kB 🟢 -1.76 kB
assets/UserPanel-pWUHtToE.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/UserPanel-ub-jHmmV.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/settings-B_sqawkt.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BlDXT7wp.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bz8HAvJu.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C2vW8UNv.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9vsDM17.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DWD49kQp.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DZE27_Iz.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-OXaZPcZF.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-RbkKsnDG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 183 kB (baseline 184 kB) • 🟢 -919 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-CRkuhWZ1.js (removed) 53.7 kB 🟢 -53.7 kB 🟢 -8.49 kB 🟢 -7.29 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-DlECkvC8.js (new) 53.7 kB 🔴 +53.7 kB 🔴 +8.49 kB 🔴 +7.29 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-ADpaNiuM.js (new) 48.7 kB 🔴 +48.7 kB 🔴 +10.5 kB 🔴 +9.11 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-C_qkCTK_.js (removed) 48.1 kB 🟢 -48.1 kB 🟢 -10.4 kB 🟢 -9 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DGbJ0TPJ.js (removed) 48 kB 🟢 -48 kB 🟢 -10.7 kB 🟢 -9.32 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Dqpztob0.js (new) 48 kB 🔴 +48 kB 🔴 +10.6 kB 🔴 +9.33 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Bf0OORNk.js (removed) 19.5 kB 🟢 -19.5 kB 🟢 -5.04 kB 🟢 -4.48 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DV8X2pDR.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.74 kB 🔴 +3.29 kB
assets/ComfyQueueButton-0-nEiErF.js (new) 8.52 kB 🔴 +8.52 kB 🔴 +2.5 kB 🔴 +2.22 kB
assets/ComfyQueueButton-Ck0NIfqG.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-D7sTfH48.js (new) 3.68 kB 🔴 +3.68 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CrftHokr.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +888 B 🔴 +765 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CRzVmYuZ.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -891 B 🟢 -766 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BNseXLDr.js (new) 897 B 🔴 +897 B 🔴 +500 B 🔴 +458 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CS_aQCLH.js (removed) 897 B 🟢 -897 B 🟢 -502 B 🟢 -437 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CiSnQExp.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-CUWIT83D.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 7 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-DI783fON.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.84 kB 🔴 +1.58 kB
assets/keybindingService-EG5pUokG.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/audioService-BCPdVNN_.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +960 B 🔴 +822 B
assets/audioService-BYfKyMg2.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -962 B 🟢 -830 B
assets/serverConfigStore-Bwn3ENCR.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-CNpaQlXm.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +548 B
assets/audioUtils-DXkE1efP.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -653 B 🟢 -550 B
assets/mathUtil-CD4DsosH.js 1.32 kB 1.32 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-Cqf0KagN.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-S7nymsLT.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-BzWEaXhK.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-BIIubbA1.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-BPEtaHlw.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.75 MB (baseline 3.75 MB) • 🟢 -584 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-BSduQ9H-.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-SWnEEOKJ.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-BvPXCTI5.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.02 kB
assets/AudioPreviewPlayer-fl1m4PGB.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3.01 kB
assets/NumberControlPopover-B4fVX0MZ.js (removed) 6.31 kB 🟢 -6.31 kB 🟢 -1.93 kB 🟢 -1.71 kB
assets/ValueControlPopover-C-1nPe6C.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.7 kB 🔴 +1.52 kB
assets/WidgetGalleria-BTdQUgHz.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetGalleria-DtTSPUr4.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.31 kB
assets/WidgetColorPicker-CauPVloN.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.24 kB
assets/WidgetColorPicker-lzlkWsld.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetTextarea-Bay6sKiN.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.08 kB
assets/WidgetTextarea-H9HZEYYi.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.07 kB
assets/WidgetMarkdown-C-aHJnr2.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetMarkdown-mKXAkUvl.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetAudioUI-B-W6CLJS.js (new) 2.94 kB 🔴 +2.94 kB 🔴 +1.18 kB 🔴 +1.07 kB
assets/WidgetAudioUI-SLf_pT-E.js (removed) 2.86 kB 🟢 -2.86 kB 🟢 -1.17 kB 🟢 -1.05 kB
assets/WidgetInputText-Blfa-QAT.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +915 B 🔴 +848 B
assets/WidgetInputText-Czc0YWsA.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -919 B 🟢 -851 B
assets/WidgetToggleSwitch-Bbpv3N-B.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -833 B 🟢 -736 B
assets/WidgetToggleSwitch-C8-ikxYs.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +832 B 🔴 +733 B
assets/MediaImageBottom-BQXiz1yt.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -735 B 🟢 -640 B
assets/MediaImageBottom-CzqbGPOi.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +736 B 🔴 +639 B
assets/MediaAudioBottom-C2xBxgXT.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -732 B 🟢 -651 B
assets/MediaAudioBottom-j8oIepLD.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +733 B 🔴 +649 B
assets/Media3DBottom-7w2GYkTz.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -734 B 🟢 -650 B
assets/Media3DBottom-Bhb5mRiw.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +649 B
assets/MediaVideoBottom-CMj6fxR6.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -734 B 🟢 -649 B
assets/MediaVideoBottom-DtcRq6fV.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +651 B
assets/Media3DTop-BTzpUm3Y.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -766 B 🟢 -656 B
assets/Media3DTop-CpSJ7Vyx.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +765 B 🔴 +653 B
assets/WidgetSelect-Dh1lwXVx.js (new) 733 B 🔴 +733 B 🔴 +361 B 🔴 +324 B
assets/WidgetInputNumber-earO9n_2.js (new) 673 B 🔴 +673 B 🔴 +347 B 🔴 +292 B
assets/WidgetSelect-DNYOSv6d.js (removed) 655 B 🟢 -655 B 🟢 -345 B 🟢 -287 B
assets/WidgetInputNumber-BuilFwmE.js (removed) 595 B 🟢 -595 B 🟢 -329 B 🟢 -273 B
assets/Load3D-DW3qx8vT.js (removed) 424 B 🟢 -424 B 🟢 -266 B 🟢 -225 B
assets/Load3D-p-kU-ugu.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +224 B
assets/WidgetLegacy-BQXD4ZIT.js (new) 364 B 🔴 +364 B 🔴 +238 B 🔴 +196 B
assets/WidgetLegacy-ke4EzL0X.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -199 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-6nlVHpc-.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B_3IONzJ.js 113 kB 113 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BqRsXvrH.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BZ-vlW9L.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C3etCTkn.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CG-hMOv1.js 84.2 kB 84.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ChsXwF7G.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DjVXiGQX.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Xp7hXzT2.js 81.7 kB 81.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-FQz4Thvl.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-B3anU6gM.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-DhI-keBK.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B1kKcnvT.js 303 kB 303 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BoX8ObAh.js 300 kB 300 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BZQ0wolS.js 360 kB 360 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CHUJIOIF.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DAU0PVOW.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Db5kOxDZ.js 299 kB 299 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DgiIrZvP.js 276 kB 276 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DU4sfqO1.js 334 kB 334 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dw-Pdf3f.js 279 kB 279 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-CtDKuluF.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DDdUO9Q8.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ee6d53 and 502d8eb.

📒 Files selected for processing (11)
  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue (4 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue (2 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberWithControl.vue (0 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue (2 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (1 hunks)
  • src/renderer/extensions/vueNodes/widgets/composables/useStepperControl.ts (0 hunks)
  • src/renderer/extensions/vueNodes/widgets/services/NumberControlRegistry.ts (0 hunks)
  • src/scripts/app.ts (0 hunks)
  • src/types/simplifiedWidget.ts (1 hunks)
  • tests-ui/tests/renderer/extensions/vueNodes/widgets/composables/useStepperControl.test.ts (0 hunks)
  • tests-ui/tests/renderer/extensions/vueNodes/widgets/services/NumberControlRegistry.test.ts (0 hunks)
💤 Files with no reviewable changes (6)
  • src/scripts/app.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberWithControl.vue
  • tests-ui/tests/renderer/extensions/vueNodes/widgets/composables/useStepperControl.test.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useStepperControl.ts
  • src/renderer/extensions/vueNodes/widgets/services/NumberControlRegistry.ts
  • tests-ui/tests/renderer/extensions/vueNodes/widgets/services/NumberControlRegistry.test.ts
🧰 Additional context used
📓 Path-based instructions (10)
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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/types/simplifiedWidget.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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/types/simplifiedWidget.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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/types/simplifiedWidget.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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3 SFCs (Single File Components) with Composition API only; do not use Options API
Vue components must use <script setup lang="ts"> for component logic
Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer useModel to separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using <style> blocks in Vue components
Use semantic Tailwind values from style.css theme instead of the dark: variant; for example, use bg-node-component-surface instead of dark: prefixes
Always use cn() utility from @/utils/tailwindUtil to merge Tailwind class names; do not use :class="[]" syntax
Use ref for reactive state in Vue Composition API components
Implement computed properties with computed() from Vue; avoid using a ref with a watch if a computed would work instead
Use watch and watchEffect for side effects in Vue components
Implement lifecycle hooks using onMounted, onUpdated, and other Vue lifecycle functions
Use provide/inject for dependency injection; do not use dependency injection if a Store or shared composable would be simpler
Do not import Vue macros unnecessarily; only use when needed
Be judicious with addition of new refs or other state: prefer props, avoid redundant computed, and prefer computed over watch
Use VueUse functions for performance-enhancing styles
In Vue Components, implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Implement proper error handling in Vue components
Follow Vue 3 style guide and naming conventions
Use vue-i18n in composition API for any string literals; place new translation entries in src/locales/en/main.json
Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead

Files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
**/*.{ts,tsx,js,jsx,vue,json}

📄 CodeRabbit inference engine (AGENTS.md)

Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see .prettierrc)

Files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/types/simplifiedWidget.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; run pnpm format before committing
Use TypeScript for type safety; never use any type - use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nested if or for statements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/types/simplifiedWidget.ts
src/**/*.ts

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

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

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

Files:

  • src/types/simplifiedWidget.ts
🧠 Learnings (14)
📚 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 : Replace PrimeVue OverlayPanel component with Popover

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Implement computed properties with `computed()` from Vue; avoid using a `ref` with a `watch` if a `computed` would work instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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 : Use defineExpose only for imperative operations (such as form.validate(), modal.open())

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 Learning: 2025-12-11T03:55:51.755Z
Learnt from: simula-r
Repo: Comfy-Org/ComfyUI_frontend PR: 7252
File: src/renderer/extensions/vueNodes/components/ImagePreview.vue:151-158
Timestamp: 2025-12-11T03:55:51.755Z
Learning: In Vue components under src/renderer/extensions/vueNodes (e.g., ImagePreview.vue and LGraphNode.vue), implement image gallery keyboard navigation so that it responds to the node's focus state rather than requiring focus inside the image preview wrapper. Achieve this by wiring keyEvent handling at the node focus level and injecting or propagating key events (arrow keys) to the gallery when the node is focused/selected. This improves accessibility and aligns navigation with node-level focus behavior.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 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/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/types/simplifiedWidget.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 : Replace PrimeVue InputSwitch component with ToggleSwitch

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Vue components must use `<script setup lang="ts">` for component logic

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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 : Extract complex conditionals to computed properties

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 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/types/simplifiedWidget.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/types/simplifiedWidget.ts
⏰ 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). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: setup
  • GitHub Check: collect
🔇 Additional comments (5)
src/types/simplifiedWidget.ts (1)

76-79: LGTM!

Clean type definition that properly narrows SimplifiedWidget to require controlWidget. The intersection type approach is idiomatic and type-safe.

src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue (1)

1-126: LGTM!

The migration from NumberControlMode enum to ControlOptions string literals is clean and consistent. The removal of the ENABLE_LINK_TO_GLOBAL feature simplifies the component appropriately.

src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue (1)

25-33: Consider type narrowing instead of type assertion.

Similar to WidgetSelect.vue, the type assertion on line 27 could be avoided with proper type narrowing. The hasControlAfterGenerate check confirms the widget has a controlWidget, but TypeScript doesn't automatically narrow the type.

As per coding guidelines, avoid as type assertions when possible.

⛔ Skipped due to learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Never use `as any` type assertions; fix the underlying type issue instead
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/RightSidePanel.vue:174-180
Timestamp: 2025-12-06T02:11:00.385Z
Learning: PrimeVue components have poor TypeScript typing, so type assertions (like `as RightSidePanelTab`) may be necessary when handling emitted events or prop values from PrimeVue components like TabList.
src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue (1)

12-16: Consider type narrowing instead of type assertion.

The type assertion on line 15 works but could be avoided. Since v-else-if confirms widget.controlWidget exists, consider using a computed property with proper type narrowing or adjusting the component's generic constraints to handle this case without assertions.

As per coding guidelines, avoid as type assertions when possible.

⛔ Skipped due to learnings
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/RightSidePanel.vue:174-180
Timestamp: 2025-12-06T02:11:00.385Z
Learning: PrimeVue components have poor TypeScript typing, so type assertions (like `as RightSidePanelTab`) may be necessary when handling emitted events or prop values from PrimeVue components like TabList.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Never use `as any` type assertions; fix the underlying type issue instead
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (1)

45-55: No changes needed—:widget is standard Vue 3.4+ syntax. Vue 3.4+ supports same-name shorthand for prop binding where :widget expands to :widget="widget". This syntax is correct and aligns with the project's Vue 3.5 usage.

Copy link
Contributor

@DrJKL DrJKL left a comment

Choose a reason for hiding this comment

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

So much less code 😋

I have a few suggestions, none blocking.

Waiting to approve for the tests to be fixed.

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 (3)
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (3)

58-62: Critical: Verify the NumberControlPopover binding.

Previous review flagged that NumberControlPopover uses defineModel<ControlOptions>() and expects modelValue/update:modelValue, but this component is binding :control-mode and @update:control-mode. This mismatch would prevent the popover from working correctly.

Verify the NumberControlPopover component's prop/emit interface and update the binding accordingly. If the previous review's assessment is correct, apply:

   <NumberControlPopover
     ref="popover"
-    :control-mode="widget.controlWidget"
-    @update:control-mode="setControlMode"
+    v-model="widget.controlWidget.value"
+    @update:modelValue="setControlMode"
   />

16-19: Address previous feedback on comp prop.

Previous reviews suggested:

  1. Using a more specific type (Component from Vue) instead of unknown
  2. Renaming to component or as for clarity

Apply this diff to address both suggestions:

+import type { Component } from 'vue'
+
 const props = defineProps<{
   widget: SimplifiedWidget<T> & { controlWidget: SafeControlWidget }
-  comp: unknown
+  component: Component
 }>()

Then update the template:

-  <component :is="comp" v-bind="$attrs" v-model="modelValue" :widget>
+  <component :is="component" v-bind="$attrs" v-model="modelValue" :widget>

38-40: Remove unnecessary non-null assertion.

Previous review correctly identified that the ! assertion on line 39 is unnecessary since the prop type SimplifiedWidget<T> & { controlWidget: SafeControlWidget } already guarantees controlWidget exists.

Apply this diff:

 const setControlMode = (mode: ControlOptions) => {
-  props.widget.controlWidget!.update(mode)
+  props.widget.controlWidget.update(mode)
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 502d8eb and 78b420e.

📒 Files selected for processing (2)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue (2 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (1 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3 SFCs (Single File Components) with Composition API only; do not use Options API
Vue components must use <script setup lang="ts"> for component logic
Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer useModel to separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using <style> blocks in Vue components
Use semantic Tailwind values from style.css theme instead of the dark: variant; for example, use bg-node-component-surface instead of dark: prefixes
Always use cn() utility from @/utils/tailwindUtil to merge Tailwind class names; do not use :class="[]" syntax
Use ref for reactive state in Vue Composition API components
Implement computed properties with computed() from Vue; avoid using a ref with a watch if a computed would work instead
Use watch and watchEffect for side effects in Vue components
Implement lifecycle hooks using onMounted, onUpdated, and other Vue lifecycle functions
Use provide/inject for dependency injection; do not use dependency injection if a Store or shared composable would be simpler
Do not import Vue macros unnecessarily; only use when needed
Be judicious with addition of new refs or other state: prefer props, avoid redundant computed, and prefer computed over watch
Use VueUse functions for performance-enhancing styles
In Vue Components, implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Implement proper error handling in Vue components
Follow Vue 3 style guide and naming conventions
Use vue-i18n in composition API for any string literals; place new translation entries in src/locales/en/main.json
Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
**/*.{ts,tsx,js,jsx,vue,json}

📄 CodeRabbit inference engine (AGENTS.md)

Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see .prettierrc)

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; run pnpm format before committing
Use TypeScript for type safety; never use any type - use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nested if or for statements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
🧠 Learnings (23)
📚 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 : Replace PrimeVue InputSwitch component with ToggleSwitch

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Vue components must use `<script setup lang="ts">` for component logic

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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 : Extract complex conditionals to computed properties

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Implement computed properties with `computed()` from Vue; avoid using a `ref` with a `watch` if a `computed` would work instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-11T03:55:51.755Z
Learnt from: simula-r
Repo: Comfy-Org/ComfyUI_frontend PR: 7252
File: src/renderer/extensions/vueNodes/components/ImagePreview.vue:151-158
Timestamp: 2025-12-11T03:55:51.755Z
Learning: In Vue components under src/renderer/extensions/vueNodes (e.g., ImagePreview.vue and LGraphNode.vue), implement image gallery keyboard navigation so that it responds to the node's focus state rather than requiring focus inside the image preview wrapper. Achieve this by wiring keyEvent handling at the node focus level and injecting or propagating key events (arrow keys) to the gallery when the node is focused/selected. This improves accessibility and aligns navigation with node-level focus behavior.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Replace PrimeVue OverlayPanel component with Popover

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Define proper props and emits definitions in Vue components

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Never use `as any` type assertions; fix the underlying type issue instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : In Vue Components, implement proper props and emits definitions

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Use TypeScript for type safety; never use `any` type - use proper TypeScript types

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declaration

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 proper props and emits definitions

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Prefer `useModel` to separately defining a prop and emit

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-06T02:11:00.385Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/RightSidePanel.vue:174-180
Timestamp: 2025-12-06T02:11:00.385Z
Learning: PrimeVue components have poor TypeScript typing, so type assertions (like `as RightSidePanelTab`) may be necessary when handling emitted events or prop values from PrimeVue components like TabList.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (1)
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue (1)

4-45: LGTM! Clean delegation to WidgetWithControl.

The refactoring properly delegates control-enabled rendering to the new WidgetWithControl wrapper while preserving the direct rendering path for non-control widgets. The type assertion on line 28 is safe given the v-if guard.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (1)

2-2: Consider migrating from PrimeVue Button in future iterations.

This component uses PrimeVue's Button component. While this is functional, the coding guidelines indicate a preference for shadcn/vue or Reka UI components instead of PrimeVue for new components.

As per coding guidelines, consider replacing PrimeVue Button with a button component from shadcn/vue or Reka UI in a follow-up PR. This would:

  • Align with the codebase's architectural direction
  • Potentially reduce PrimeVue dependencies
  • Ensure consistent button styling across the application

Note: This is not blocking for the current PR, as the functionality is correct.

Also applies to: 49-56

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78b420e and f0b4762.

📒 Files selected for processing (8)
  • src/extensions/core/widgetInputs.ts (1 hunks)
  • src/locales/en/main.json (2 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue (5 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue (2 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue (2 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue (1 hunks)
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (1 hunks)
  • src/types/simplifiedWidget.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3 SFCs (Single File Components) with Composition API only; do not use Options API
Vue components must use <script setup lang="ts"> for component logic
Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer useModel to separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using <style> blocks in Vue components
Use semantic Tailwind values from style.css theme instead of the dark: variant; for example, use bg-node-component-surface instead of dark: prefixes
Always use cn() utility from @/utils/tailwindUtil to merge Tailwind class names; do not use :class="[]" syntax
Use ref for reactive state in Vue Composition API components
Implement computed properties with computed() from Vue; avoid using a ref with a watch if a computed would work instead
Use watch and watchEffect for side effects in Vue components
Implement lifecycle hooks using onMounted, onUpdated, and other Vue lifecycle functions
Use provide/inject for dependency injection; do not use dependency injection if a Store or shared composable would be simpler
Do not import Vue macros unnecessarily; only use when needed
Be judicious with addition of new refs or other state: prefer props, avoid redundant computed, and prefer computed over watch
Use VueUse functions for performance-enhancing styles
In Vue Components, implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Implement proper error handling in Vue components
Follow Vue 3 style guide and naming conventions
Use vue-i18n in composition API for any string literals; place new translation entries in src/locales/en/main.json
Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
**/*.{ts,tsx,js,jsx,vue,json}

📄 CodeRabbit inference engine (AGENTS.md)

Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see .prettierrc)

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/locales/en/main.json
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; run pnpm format before committing
Use TypeScript for type safety; never use any type - use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nested if or for statements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
src/**/*.ts

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

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

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

Files:

  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
🧠 Learnings (33)
📚 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 : Replace PrimeVue Dropdown component with Select

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
📚 Learning: 2025-12-11T03:55:51.755Z
Learnt from: simula-r
Repo: Comfy-Org/ComfyUI_frontend PR: 7252
File: src/renderer/extensions/vueNodes/components/ImagePreview.vue:151-158
Timestamp: 2025-12-11T03:55:51.755Z
Learning: In Vue components under src/renderer/extensions/vueNodes (e.g., ImagePreview.vue and LGraphNode.vue), implement image gallery keyboard navigation so that it responds to the node's focus state rather than requiring focus inside the image preview wrapper. Achieve this by wiring keyEvent handling at the node focus level and injecting or propagating key events (arrow keys) to the gallery when the node is focused/selected. This improves accessibility and aligns navigation with node-level focus behavior.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
📚 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/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
  • src/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.ts
  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
📚 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/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.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/extensions/core/widgetInputs.ts
  • src/types/simplifiedWidget.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 : Replace PrimeVue InputSwitch component with ToggleSwitch

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Vue components must use `<script setup lang="ts">` for component logic

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.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 : Extract complex conditionals to computed properties

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Implement computed properties with `computed()` from Vue; avoid using a `ref` with a `watch` if a `computed` would work instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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 : Replace PrimeVue OverlayPanel component with Popover

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.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 : Define proper props and emits definitions in Vue components

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : In Vue Components, implement proper props and emits definitions

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Never use `as any` type assertions; fix the underlying type issue instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declaration

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Use TypeScript for type safety; never use `any` type - use proper TypeScript types

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 proper props and emits definitions

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Prefer `useModel` to separately defining a prop and emit

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-06T02:11:00.385Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/RightSidePanel.vue:174-180
Timestamp: 2025-12-06T02:11:00.385Z
Learning: PrimeVue components have poor TypeScript typing, so type assertions (like `as RightSidePanelTab`) may be necessary when handling emitted events or prop values from PrimeVue components like TabList.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.vue : Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Replace PrimeVue InlineMessage component with Message

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Replace PrimeVue Chips component with AutoComplete with multiple enabled

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Replace PrimeVue Calendar component with DatePicker

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Replace PrimeVue Steps component with Stepper without panels

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.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 : Use defineExpose only for imperative operations (such as form.validate(), modal.open())

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue
🧬 Code graph analysis (1)
src/extensions/core/widgetInputs.ts (1)
src/lib/litegraph/src/LGraphNode.ts (1)
  • widget (3966-3969)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (10)
src/locales/en/main.json (1)

2060-2079: LGTM! Locale keys properly updated for value control terminology.

The rename from numberControl to valueControl accurately reflects the expanded scope to support combo controls. The updated descriptions for increment/decrement ("selects the next/previous option") correctly describe the behavior for both numeric and combo widgets.

src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue (1)

16-16: Conditional margin ensures proper spacing for control button.

The mr-5 class is correctly applied when a slot is provided, ensuring the Select label doesn't overlap with the control button.

src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue (1)

12-16: LGTM! Control wrapper integration follows established pattern.

The addition of the WidgetWithControl path for control-enabled select widgets correctly:

  • Checks for widget.controlWidget existence
  • Casts to the appropriate SimplifiedControlWidget type
  • Passes WidgetSelectDefault as the inner component
  • Uses a clear type alias (StringControlWidget) for readability

This implementation is consistent with the WidgetInputNumber.vue approach and properly integrates combo control support.

Also applies to: 28-29, 33-39

src/types/simplifiedWidget.ts (1)

76-81: LGTM! Interface properly extends SimplifiedWidget.

The new SimplifiedControlWidget interface correctly:

  • Uses extends rather than intersection types (good for performance)
  • Makes controlWidget a required property
  • Maintains generic type parameters for flexibility
  • Provides clear type contract for control-enabled widgets

This strengthens type safety for the new WidgetWithControl wrapper pattern.

Based on learnings, the use of extends follows TypeScript performance best practices over intersection types.

src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue (1)

25-34: LGTM! Refactoring to WidgetWithControl wrapper is clean.

The refactoring correctly:

  • Wraps control-enabled widgets with WidgetWithControl
  • Casts to SimplifiedControlWidget<number> for type safety
  • Dynamically selects the inner component (slider vs input) via :component
  • Maintains v-model binding
  • Preserves the existing non-control rendering path in the v-else block

This change aligns with the new architecture and removes the need for the dedicated WidgetInputNumberWithControl component.

src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue (2)

7-7: LGTM! Successful migration from enum to string literal types.

The refactoring from NumberControlMode enum to ControlOptions string literals is clean:

  • Type definition now uses string literals for better flexibility
  • Control options array updated to use literal values
  • defineModel correctly typed as ControlOptions
  • Removes complexity of enum-based approach

Also applies to: 10-11, 25-50, 56-56


66-75: Translation keys properly updated for value control terminology.

All text references correctly changed from widgets.numberControl.* to widgets.valueControl.*, including:

  • Header text (prefix, before/after, postfix)
  • Option titles and descriptions

This aligns with the locale file changes and reflects the expanded scope beyond just number controls.

Also applies to: 105-106, 111-111

src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (2)

1-44: LGTM! Component logic is well-structured.

The script setup correctly:

  • Uses generic type parameter for flexibility across widget types
  • Properly types props with SimplifiedControlWidget<T> and Component
  • Implements reactive control mode tracking with controlModel
  • Watches and forwards control mode updates to widget.controlWidget.update
  • Provides clean togglePopover method for event handling

The async import of ValueControlPopover is appropriate for code splitting.


47-59: Template structure enables flexible widget composition.

The template correctly:

  • Uses dynamic component rendering with :is="component"
  • Forwards v-model binding and $attrs to inner component
  • Renders control button with proper event handling (pointerdown.stop.prevent)
  • Binds ValueControlPopover with v-model for two-way control mode sync

The grid-based layout ensures proper alignment of the widget and control button.

src/extensions/core/widgetInputs.ts (1)

260-261: The linkedWidgets property is properly typed in the widget system. It is defined in IBaseWidget as linkedWidgets?: IBaseWidget[] and is a standard, well-established property used throughout the codebase for establishing relationships between widgets.

Likely an incorrect or invalid review comment.

Comment on lines +21 to +23
<div class="absolute top-5 right-8 h-4 w-7 -translate-y-4/5 flex">
<slot />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find src -name "WidgetSelectDefault.vue" -type f

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 145


🏁 Script executed:

cat src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 2192


🏁 Script executed:

find src -name "WidgetLayoutField.vue" -type f

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 150


🏁 Script executed:

cat src/renderer/extensions/vueNodes/widgets/components/layout/WidgetLayoutField.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1189


🏁 Script executed:

grep -r "WidgetSelectDefault" src --include="*.vue" --include="*.ts" -l | head -10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 138


🏁 Script executed:

rg "overflow-hidden" src/renderer/extensions/vueNodes/widgets --type vue -A 2 -B 2

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 97


🏁 Script executed:

rg "overflow-hidden" src/renderer/extensions/vueNodes/widgets -A 2 -B 2

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 2363


🏁 Script executed:

find src/renderer/extensions/vueNodes/widgets -type f -name "*.vue" | xargs grep -l "overflow"

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 537


🏁 Script executed:

find src -name "*.vue" -path "*vueNodes*" | xargs grep -l "WidgetLayoutField" | head -5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 449


🏁 Script executed:

cat src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 3699


🏁 Script executed:

cat src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1612


🏁 Script executed:

rg "class.*relative" src/renderer/extensions/vueNodes/widgets/components/layout -A 3

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 477


🏁 Script executed:

rg "overflow-hidden" src/renderer/extensions/vueNodes --type vue | grep -E "(WidgetLayout|Select)" | head -10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 97


🏁 Script executed:

cat src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 3471


🏁 Script executed:

rg "Teleport" src/renderer/extensions/vueNodes/widgets --include="*.vue" | head -5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 511


🏁 Script executed:

rg "WidgetSelectDefault\|absolute.*top-5.*right-8" src --include="*.vue" -A 3 -B 3

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 511


🏁 Script executed:

rg "Teleport" src/renderer/extensions/vueNodes/widgets -t vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 97


🏁 Script executed:

rg "absolute.*top-5.*right-8" src -t vue -A 3 -B 3

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 97


🏁 Script executed:

find src/renderer/extensions/vueNodes/widgets -name "*.vue" | xargs grep -l "Teleport"

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 54


🏁 Script executed:

find src -name "*.vue" | xargs grep "absolute.*top-5.*right-8" -B 3 -A 3

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1527


🏁 Script executed:

find src/renderer/extensions/vueNodes -name "*.vue" | xargs grep -l "WidgetInputNumberInput\|WidgetSelectDefault" | head -5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 212


🏁 Script executed:

find src/renderer -path "*vueNodes*" -name "*.vue" | xargs grep "overflow-hidden" -l

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 476


🏁 Script executed:

find src -name "NodeComponentPanelWidget.vue" -o -name "NodeComponentPanel.vue" -o -name "*Node*.vue" | grep -E "vueNodes.*components" | head -10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 489


🏁 Script executed:

find src/renderer/extensions/vueNodes -maxdepth 2 -name "*.vue" | xargs grep -l "WidgetSelectDefault\|WidgetInputNumberInput"

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 54


🏁 Script executed:

cat src/renderer/extensions/vueNodes/components/NodeWidgets.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 6524


🏁 Script executed:

cat src/renderer/extensions/vueNodes/components/NodeContent.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1617


🏁 Script executed:

find src -name "*.vue" | xargs grep -l "grid-cols-subgrid" | head -5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 344


🏁 Script executed:

grep -r "position.*context\|Teleport" src/renderer/extensions/vueNodes --include="*.ts" --include="*.vue" | head -10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

rg "z-\[" src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

cat src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue | head -50

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1133


The absolute positioning with relative parent context is correctly implemented and consistent across similar widget components. Parent containers don't use overflow: hidden, so clipping isn't a concern. However, verify that the control button's z-index doesn't conflict with the Select dropdown overlay when opened, and test dropdown interactions in constrained viewport scenarios to ensure the button remains accessible.

🤖 Prompt for AI Agents
In src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
around lines 21 to 23, the absolute-positioned control button may conflict with
the Select dropdown overlay; ensure the button's stacking context doesn't cover
or get covered by the dropdown by adding an explicit z-index (or adjusting the
dropdown's z-index) on the button container, and if necessary create a new
stacking context (e.g., by adding a positioned ancestor or isolation) so the
dropdown overlay sits above the button; after the change, test dropdown
interactions in constrained viewports and when the dropdown is open to confirm
the button remains accessible and not clipped or blocking clicks.

Copy link
Contributor

@DrJKL DrJKL left a comment

Choose a reason for hiding this comment

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

I think it's still missing increment-wrap, but that can be its own PR.

@AustinMroz AustinMroz merged commit ab76d02 into main Dec 17, 2025
28 checks passed
@AustinMroz AustinMroz deleted the austin/fix-double-cag branch December 17, 2025 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants