Skip to content

Conversation

@Myestery
Copy link
Contributor

@Myestery Myestery commented Dec 24, 2025

Summary

  • Add getCustomVueWidgets() extension hook for registering Vue SFC widgets
  • Expose Vue globally as window.Vue for extension developers
  • Support display field in Python input definitions for custom widget type hints
  • Add widget registry with alias support

Test plan

  • Unit tests for widget registry (widgetRegistry.test.ts)
  • Manual test with test_vue_widget_node extension

┆Issue is synchronized with this Notion page by Unito

@Myestery Myestery requested a review from a team as a code owner December 24, 2025 02:57
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 24, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 24, 2025

📝 Walkthrough

Walkthrough

Adds extension-provided Vue widgets with registry precedence over core widgets, exposes the Vue runtime to extensions via window.Vue, passes a new display hint through widget options and lookups, updates schemas/types to accept string display hints, and registers extension Vue widgets during extension loading.

Changes

Cohort / File(s) Summary
Vue runtime exposure
src/utils/vueExtensionApi.ts, src/main.ts
New exposeVueApi() sets window.Vue and is invoked at app startup before CSS import.
Widget registry & APIs
src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
Added registerVueWidgets and clearExtensionWidgets; separated core vs extension maps; getComponent(type, name, displayHint?) now accepts optional displayHint and prefers extension widgets/aliases.
Registry tests
src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
New tests for registration, aliasing, displayHint matching, precedence, clearing, and rendering decisions.
Widget composables
src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts, src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
Widget options passed to node.addWidget(...) now include display (from inputSpec.display); float widget also adds precision.
Widget component integration
src/renderer/extensions/vueNodes/components/NodeWidgets.vue
getComponent call updated to pass widget.options?.display as the display hint argument.
Extension service integration
src/services/extensionService.ts
During extension registration, supports extension.getCustomVueWidgets (sync or async) and calls registerVueWidgets to register them.
Type definitions
src/types/comfy.ts, src/types/litegraph-augmentation.d.ts
New VueWidgetDefinition and VueWidgets types; ComfyExtension gained optional getCustomVueWidgets; IWidgetOptions gains optional display?: string.
Schema change
src/schemas/nodeDefSchema.ts
zNumericInputOptions.display loosened from enum ['slider','number','knob'] to z.string().optional() (accepts arbitrary strings).

Sequence Diagram(s)

sequenceDiagram
    actor Extension
    participant ExtSvc as ExtensionService
    participant Registry as WidgetRegistry
    participant Renderer as NodeWidgets (Renderer)
    participant Component as WidgetComponent

    Extension->>ExtSvc: registerExtension()
    ExtSvc->>Extension: call getCustomVueWidgets(app)?
    Note right of Extension: returns VueWidgets (sync|async)
    Extension-->>ExtSvc: VueWidgets
    ExtSvc->>Registry: registerVueWidgets(widgets)
    Registry->>Registry: store extension widgets & aliases (higher precedence)

    Note over Renderer,Registry: Later, during node render
    Renderer->>Registry: getComponent(type, name, display?)
    alt Extension widget matches (type or alias or display)
        Registry-->>Renderer: extension Component
    else Core widget matches
        Registry-->>Renderer: core Component
    else No match
        Registry-->>Renderer: null (falls back to DOM/legacy)
    end
    Renderer->>Component: render with props (including display, precision)
Loading

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 feat/vue-widget-registration

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

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 502 passed, 0 failed, 2 flaky, 8 skipped (Total: 512)

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 492 / ❌ 0 / ⚠️ 1 / ⏭️ 8)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0)

@github-actions
Copy link

github-actions bot commented Dec 24, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/13/2026, 07:57:16 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 24, 2025

Bundle Size Report

Summary

  • Raw size: 19.5 MB baseline 19.4 MB — 🔴 +65 kB
  • Gzip: 3.97 MB baseline 3.95 MB — 🔴 +14.1 kB
  • Brotli: 3.03 MB baseline 3.02 MB — 🔴 +11.9 kB
  • Bundles: 98 current • 98 baseline • 51 added / 51 removed

Category Glance
Vendor & Third-Party 🔴 +63.7 kB (9.26 MB) · App Entry Points 🔴 +1.28 kB (3.32 MB) · Other ⚪ 0 B (5.25 MB) · Graph Workspace ⚪ 0 B (1.04 MB) · Panels & Settings ⚪ 0 B (372 kB) · UI Components ⚪ 0 B (200 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.32 MB (baseline 3.32 MB) • 🔴 +1.28 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-B4JHSJC_.js (new) 3.12 MB 🔴 +3.12 MB 🔴 +654 kB 🔴 +497 kB
assets/index-rIHw4siV.js (removed) 3.12 MB 🟢 -3.12 MB 🟢 -654 kB 🟢 -496 kB
assets/index-3Fa5Z5sA.js (removed) 200 kB 🟢 -200 kB 🟢 -44 kB 🟢 -36.4 kB
assets/index-Ds3eYQlk.js (new) 200 kB 🔴 +200 kB 🔴 +44 kB 🔴 +36.4 kB
assets/index-B9iwkm25.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -235 B
assets/index-S-DKnXyy.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +233 B

Status: 3 added / 3 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-_bDdpPBp.js (new) 1.04 MB 🔴 +1.04 MB 🔴 +200 kB 🔴 +152 kB
assets/GraphView-BZW5saKb.js (removed) 1.04 MB 🟢 -1.04 MB 🟢 -200 kB 🟢 -151 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

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

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-Bpo-ML2U.js (new) 25.1 kB 🔴 +25.1 kB 🔴 +5.74 kB 🔴 +5 kB
assets/LegacyCreditsPanel-DaXGmztW.js (removed) 25.1 kB 🟢 -25.1 kB 🟢 -5.74 kB 🟢 -5 kB
assets/KeybindingPanel-CeXcrKcQ.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.13 kB
assets/KeybindingPanel-CszqDEx5.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.13 kB
assets/ExtensionPanel-D4rSiAg0.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.3 kB
assets/ExtensionPanel-L6spWO-6.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/AboutPanel-CMmhXo3N.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-CNCyBIrN.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-BQYBnNSp.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.81 kB
assets/ServerConfigPanel-DRDzE0ss.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.81 kB
assets/UserPanel-BPLvHdH7.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.56 kB
assets/UserPanel-CC7Z7j_R.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.57 kB
assets/settings-BGQfQzTx.js 25.6 kB 25.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BVE4KHTw.js 22.7 kB 22.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BVtpJmlU.js 30.9 kB 30.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C2aO00Dz.js 28.6 kB 28.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Cm3ieBXR.js 27.8 kB 27.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CzQKMdK3.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CzYUIUnL.js 27.1 kB 27.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DwKpL7jw.js 26.3 kB 26.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DX8feV4n.js 25.3 kB 25.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-mWzYycGc.js 22 kB 22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-U4AdZ8Rl.js 34.9 kB 34.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-BAJJ78in.js (removed) 65.6 kB 🟢 -65.6 kB 🟢 -13.3 kB 🟢 -11.5 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DPc5Ded8.js (new) 65.6 kB 🔴 +65.6 kB 🔴 +13.2 kB 🔴 +11.5 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-6ohXzOIu.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.78 kB 🟢 -7.53 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-n9INMc_O.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.78 kB 🔴 +7.53 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BPZ0yvuG.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.15 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-Cz5kMelk.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.16 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Bq5TjKTe.js (new) 10.9 kB 🔴 +10.9 kB 🔴 +2.89 kB 🔴 +2.56 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BUvURuVQ.js (removed) 10.9 kB 🟢 -10.9 kB 🟢 -2.89 kB 🟢 -2.55 kB
assets/ComfyQueueButton-BxN11bMs.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.58 kB 🟢 -2.3 kB
assets/ComfyQueueButton-CaBSVV8V.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.29 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-BXjDyB5g.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.46 kB 🔴 +1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-CzPtCLPn.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.45 kB 🟢 -1.32 kB
assets/WidgetButton-CJSi1vav.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -997 B 🟢 -895 B
assets/WidgetButton-DypGbsEY.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +994 B 🔴 +871 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CC30I9Zy.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +892 B 🔴 +765 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Dxtf2fmj.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -888 B 🟢 -768 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CREToCBM.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +688 B 🔴 +596 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DWEfpRJs.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -688 B 🟢 -598 B

Status: 9 added / 9 removed

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

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-CvXmgywx.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.57 kB
assets/keybindingService-D5PFrHzg.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.57 kB
assets/serverConfigStore-DVpKFtB6.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +907 B 🔴 +794 B
assets/serverConfigStore-lZrt20fn.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -906 B 🟢 -788 B
assets/audioService-a1ImQ6p_.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +963 B 🔴 +820 B
assets/audioService-CcOKTEOr.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -962 B 🟢 -826 B

Status: 3 added / 3 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BxAQEFk-.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -547 B
assets/audioUtils-DiqHedIz.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +544 B

Status: 1 added / 1 removed

Vendor & Third-Party — 9.26 MB (baseline 9.19 MB) • 🔴 +63.7 kB

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-Bw4ygDtV.js (new) 3.96 MB 🔴 +3.96 MB 🔴 +860 kB 🔴 +688 kB
assets/vendor-other-Da7BzmIq.js (removed) 3.9 MB 🟢 -3.9 MB 🟢 -848 kB 🟢 -678 kB
assets/vendor-three-Ds3gPtNh.js (removed) 2.08 MB 🟢 -2.08 MB 🟢 -430 kB 🟢 -308 kB
assets/vendor-three-Dz2ibo-H.js (new) 2.08 MB 🔴 +2.08 MB 🔴 +430 kB 🔴 +308 kB
assets/vendor-primevue-vA-hZvEJ.js (new) 1.95 MB 🔴 +1.95 MB 🔴 +333 kB 🔴 +201 kB
assets/vendor-primevue-CvitJUGk.js (removed) 1.95 MB 🟢 -1.95 MB 🟢 -333 kB 🟢 -201 kB
assets/vendor-chart-C2WamoVK.js (removed) 452 kB 🟢 -452 kB 🟢 -99 kB 🟢 -81 kB
assets/vendor-chart-xp1fpmnq.js (new) 452 kB 🔴 +452 kB 🔴 +99 kB 🔴 +81 kB
assets/vendor-tiptap-DCGqHxXV.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-tiptap-WJL3cqV8.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-vue-CufefbwB.js (new) 165 kB 🔴 +165 kB 🔴 +38.9 kB 🔴 +32.9 kB
assets/vendor-vue-E9hBZNUh.js (removed) 160 kB 🟢 -160 kB 🟢 -37 kB 🟢 -31.3 kB
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-hLcFCv1A.js (new) 29.3 kB 🔴 +29.3 kB 🔴 +6.51 kB 🔴 +5.66 kB
assets/SubscriptionRequiredDialogContent-jY_TuDuU.js (removed) 29.3 kB 🟢 -29.3 kB 🟢 -6.51 kB 🟢 -5.65 kB
assets/WidgetRecordAudio-BvUy6Aap.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/WidgetRecordAudio-DJXUFytl.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-1kGagANS.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/AudioPreviewPlayer-E12rzxEQ.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -3 kB
assets/ValueControlPopover-GoSyjJd0.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.51 kB
assets/ValueControlPopover-XfvSkHkl.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.52 kB
assets/WidgetGalleria-BO5QMfs-.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetGalleria-UhCzp_Xu.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetColorPicker-B0kJJmFn.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.24 kB
assets/WidgetColorPicker-CrOEYZOn.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetImageCompare-DIlIyeTG.js (new) 3.21 kB 🔴 +3.21 kB 🔴 +1.1 kB 🔴 +969 B
assets/WidgetImageCompare-DOYclIRS.js (removed) 3.21 kB 🟢 -3.21 kB 🟢 -1.1 kB 🟢 -960 B
assets/WidgetTextarea-BxEZckP8.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetTextarea-COQUQT1F.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.08 kB
assets/WidgetMarkdown-A6i_egCW.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetMarkdown-DFLhdQvq.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-DvtB03qx.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-JhUs4m1K.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.05 kB
assets/WidgetToggleSwitch-BNLL6YxX.js (removed) 2.66 kB 🟢 -2.66 kB 🟢 -1.13 kB 🟢 -1.02 kB
assets/WidgetToggleSwitch-w4tvrNAV.js (new) 2.66 kB 🔴 +2.66 kB 🔴 +1.13 kB 🔴 +1.03 kB
assets/MediaVideoTop-B9QUqrC5.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.02 kB 🔴 +869 B
assets/MediaVideoTop-euoHxxM5.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.01 kB 🟢 -868 B
assets/WidgetChart-515bxB6A.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -934 B 🟢 -816 B
assets/WidgetChart-D7GmmGfo.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +933 B 🔴 +817 B
assets/WidgetInputText-C4TVHD7-.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -922 B 🟢 -857 B
assets/WidgetInputText-CHNfIMTr.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +920 B 🔴 +831 B
assets/MediaImageTop-C3CvQRZ8.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -843 B 🟢 -716 B
assets/MediaImageTop-DnXa8Giy.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +842 B 🔴 +713 B
assets/Media3DTop-BC4y01Wc.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -763 B 🟢 -651 B
assets/Media3DTop-DOxxEVZO.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +765 B 🔴 +649 B
assets/MediaAudioTop-cra96gZi.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +740 B 🔴 +616 B
assets/MediaAudioTop-DIQlZoPQ.js (removed) 1.46 kB 🟢 -1.46 kB 🟢 -738 B 🟢 -619 B
assets/WidgetSelect-BaM5DDfn.js (removed) 733 B 🟢 -733 B 🟢 -361 B 🟢 -325 B
assets/WidgetSelect-nckv5LsV.js (new) 733 B 🔴 +733 B 🔴 +358 B 🔴 +305 B
assets/WidgetInputNumber-BdEXtxkT.js (removed) 673 B 🟢 -673 B 🟢 -349 B 🟢 -291 B
assets/WidgetInputNumber-h705PwPd.js (new) 673 B 🔴 +673 B 🔴 +346 B 🔴 +290 B
assets/Load3D-B3yDZy1t.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +225 B
assets/Load3D-D6ePEZdE.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -223 B
assets/WidgetLegacy-BH7PcwWk.js (new) 364 B 🔴 +364 B 🔴 +238 B 🔴 +198 B
assets/WidgetLegacy-BzgDB2n8.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -193 B
assets/commands-B32ZbeYu.js 16.5 kB 16.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-B7wQT83I.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BK3JVjMG.js 15.7 kB 15.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-C6twMpaZ.js 15.5 kB 15.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CDUWpEwM.js 18.3 kB 18.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CfZ6FPZ-.js 15.7 kB 15.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COIPP_pv.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoPn_77e.js 14.7 kB 14.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CuRNS4XD.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DBHjCSPA.js 16.2 kB 16.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DZJaRLKH.js 15.7 kB 15.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-2D22Y23E.js 133 kB 133 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-2hkj5WZ8.js 129 kB 129 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ADie1YP2.js 95 kB 95 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C4CNI-cH.js 106 kB 106 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cs_ngf1U.js 107 kB 107 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D_5OJDBa.js 149 kB 149 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DOaV8m79.js 110 kB 110 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DPEAvrr4.js 113 kB 113 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DUDKZw_s.js 123 kB 123 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dupp0QiI.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DXSxRej2.js 94.2 kB 94.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B-XzzBeS.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BGwoeek4.js 329 kB 329 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-C6xl5-mL.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CRZGOJB7.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D8-Yzlzh.js 289 kB 289 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Du8VrAwA.js 320 kB 320 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-jjlLVrIs.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-JQwk1kgy.js 292 kB 292 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-JuuXdMpv.js 391 kB 391 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-l2Y20bod.js 314 kB 314 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VLMdhOwo.js 357 kB 357 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 21 added / 21 removed

@github-actions
Copy link

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0889576 and 81db823.

📒 Files selected for processing (11)
  • src/main.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/types/comfy.ts
  • src/types/litegraph-augmentation.d.ts
  • src/utils/vueExtensionApi.ts
🧰 Additional context used
📓 Path-based instructions (14)
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/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
src/**/*.ts

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

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

Files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.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/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.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/composables/useFloatWidget.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.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/composables/useFloatWidget.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
src/**/*.vue

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

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

Files:

  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
🧠 Learnings (43)
📚 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/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.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/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/types/litegraph-augmentation.d.ts
  • src/schemas/nodeDefSchema.ts
  • src/services/extensionService.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts
  • src/utils/vueExtensionApi.ts
  • src/renderer/extensions/vueNodes/components/NodeWidgets.vue
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts
  • src/types/comfy.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/services/extensionService.ts
  • src/types/comfy.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use defineExpose only for imperative operations (such as form.validate(), modal.open())

Applied to files:

  • src/utils/vueExtensionApi.ts
  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Use Vue 3.5+ with TypeScript in `.vue` files, exclusively using Composition API with `<script setup lang="ts">` syntax

Applied to files:

  • src/utils/vueExtensionApi.ts
  • src/main.ts
📚 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} : Use es-toolkit for utility functions instead of other utility libraries

Applied to files:

  • src/utils/vueExtensionApi.ts
  • src/main.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.{ts,tsx,vue} : Use es-toolkit for utility functions

Applied to files:

  • src/utils/vueExtensionApi.ts
  • src/main.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use `withDefaults` or runtime props declaration

Applied to files:

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

Applied to files:

  • src/utils/vueExtensionApi.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.{vue,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/utils/vueExtensionApi.ts
  • src/main.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.{ts,tsx} : Minimize the surface area (exported values) of each module and composable

Applied to files:

  • src/utils/vueExtensionApi.ts
  • src/main.ts
📚 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/utils/vueExtensionApi.ts
  • src/types/comfy.ts
📚 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/utils/vueExtensionApi.ts
📚 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/components/NodeWidgets.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/components/NodeWidgets.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/components/NodeWidgets.vue
📚 Learning: 2025-12-22T21:36:08.369Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/platform/cloud/subscription/components/PricingTable.vue:185-201
Timestamp: 2025-12-22T21:36:08.369Z
Learning: In Vue components, avoid creating single-use variants for common UI components (e.g., Button and other shared components). Aim for reusable variants that cover multiple use cases. It’s acceptable to temporarily mix variant props with inline Tailwind classes when a styling need is unique to one place, but plan and consolidate into shared, reusable variants as patterns emerge across the codebase.

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: Do not stub primitive UI components or customized primitive components (e.g., Button). Instead, import and register the real components in test setup. This ensures tests accurately reflect production behavior and component API usage.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Check tests-ui/README.md for test guidelines

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 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/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`

Applied to files:

  • src/main.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.{ts,tsx,vue} : Use sorted and grouped imports organized by plugin/source

Applied to files:

  • src/main.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.vue : Implement proper props and emits definitions in Vue components

Applied to files:

  • src/main.ts
  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/types/comfy.ts
📚 Learning: 2025-12-09T03:50:03.127Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:50:03.127Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, when avoiding PrimeVue components, prefer using the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) rather than plain HTML buttons. These components wrap PrimeVue with custom design system styling.

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts
  • src/types/comfy.ts
📚 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/types/comfy.ts
🧬 Code graph analysis (3)
src/services/extensionService.ts (2)
src/scripts/app.ts (1)
  • app (1765-1765)
src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts (1)
  • registerVueWidgets (187-196)
src/main.ts (1)
src/utils/vueExtensionApi.ts (1)
  • exposeVueApi (17-19)
src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts (1)
src/types/comfy.ts (1)
  • VueWidgetDefinition (23-32)
⏰ 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: lint-and-format
  • GitHub Check: collect
  • GitHub Check: setup
  • GitHub Check: test
🔇 Additional comments (22)
src/main.ts (1)

15-18: LGTM! Early Vue API exposure for extensions.

The positioning of exposeVueApi() before CSS imports and other initialization ensures that external extensions can access Vue utilities during their initialization phase. The explanatory comment clearly communicates the intent.

src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.ts (1)

66-67: LGTM! Display hint integration for integer widgets.

The addition of the display property to widget options enables custom widget rendering based on hints from Python node definitions. This aligns with the broader Vue widget extension system introduced in this PR.

src/types/litegraph-augmentation.d.ts (1)

44-48: LGTM! Well-documented display hint property.

The optional display property is appropriately typed as a string to allow flexible extension-defined values. The documentation clearly explains its purpose for custom widget rendering by extensions.

src/schemas/nodeDefSchema.ts (1)

45-50: LGTM! Flexible display hint validation for extensibility.

The change from a restrictive enum to a string type appropriately balances type safety with extensibility. The documentation clearly lists built-in values while allowing extensions to register custom display types, which aligns with the PR's goal of supporting custom Vue widgets.

src/utils/vueExtensionApi.ts (1)

1-19: Verify the intended API surface for external extensions.

The implementation exposes the entire Vue namespace via import * as Vue from 'vue', making all Vue APIs available to extensions through window.Vue. While this provides maximum flexibility, it also exposes a large API surface.

Consider documenting:

  1. Which Vue APIs extensions are expected to use (e.g., h, defineComponent, ref, computed as shown in the comment)
  2. Security/compatibility implications of global Vue exposure
  3. Whether selective exports would be more appropriate for stability

Do you want to:

  • Maintain the current approach (full Vue namespace exposure) with additional documentation?
  • Restrict to a curated subset of Vue APIs for better control?

The usage example in the documentation is helpful. Consider expanding it to mention version compatibility expectations.

src/renderer/extensions/vueNodes/components/NodeWidgets.vue (1)

154-156: LGTM! Safe display hint parameter addition.

The optional chaining for widget.options?.display safely passes the display hint to component resolution while maintaining backward compatibility. The existing fallback logic to WidgetDOM or WidgetLegacy remains intact.

src/types/comfy.ts (2)

1-1: LGTM! Proper type-only import.

The type-only import of Component from Vue follows the repository's pattern of keeping type imports separate from non-type imports.

Based on learnings.


181-188: LGTM! Well-documented extension hook.

The getCustomVueWidgets method follows the existing pattern of getCustomWidgets and includes clear documentation about its purpose, precedence behavior, and return type. The async/sync union return type provides flexibility for extension developers.

src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.ts (1)

75-76: LGTM! Display and precision properties correctly added.

The addition of precision and display to widget options properly extends the widget configuration to support:

  • Explicit rounding precision for float values (derived from settings or step calculation)
  • Custom display hints for Vue widget lookup (enabling extension widget override via the registry)

These properties integrate correctly with the widget registry's getComponent(type, name, displayHint?) signature introduced in this PR.

src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts (7)

1-21: LGTM! Well-structured test setup.

The test structure follows best practices:

  • Proper separation of type and value imports per lint rules
  • Mock components use object literals to avoid Vue linter issues (appropriate for unit tests)
  • afterEach cleanup ensures isolated test execution

23-57: LGTM! Comprehensive registration tests.

The test cases appropriately cover:

  • Single widget registration and retrieval
  • Batch registration of multiple widgets
  • Alias support with multiple aliases per widget

All assertions correctly use toBe for component reference equality.


59-123: LGTM! Thorough component lookup tests.

The test suite comprehensively validates:

  • Core widget retrieval by type and alias
  • Extension widget precedence over core widgets (critical PR feature)
  • Display hint resolution with both direct type and alias matches
  • Graceful fallback when display hint has no match

All test cases validate essential behavioral aspects of the new lookup system.


125-147: LGTM! Clear behavior correctly validated.

Tests appropriately verify:

  • Extension widgets are removed after clearing
  • Core widgets remain unaffected

This separation is essential for the extension system's isolation.


149-173: LGTM! Essential widget classification tests are complete.

Test coverage includes:

  • Essential core widgets (int, float, combo, boolean)
  • Non-essential core widgets (button, color)
  • Unknown types
  • Extension widgets (correctly return false as they don't inherit essential status)

175-195: LGTM! Rendering logic tests are complete.

Tests validate all combinations of the rendering conditions:

  • Presence/absence of type
  • canvasOnly flag values (true, false, undefined)

197-218: LGTM! Expansion logic tests are thorough.

Tests validate:

  • All expanding types (textarea, markdown, load3D)
  • Case-insensitive alias resolution (uppercase variants)
  • Non-expanding types correctly return false
src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts (6)

8-8: LGTM! Clean separation of core and extension widget storage.

The refactoring properly:

  • Separates immutable core widgets from mutable extension widgets
  • Maintains separate alias maps for each category
  • Documents the distinction with clear comments
  • Follows type import conventions

This separation is essential for the extension precedence logic.

Also applies to: 168-181


183-196: LGTM! Registration API is well-designed.

The function correctly:

  • Documents extension widget precedence in JSDoc
  • Accepts type-safe widget definitions
  • Handles optional aliases with nullish coalescing
  • Allows overwriting previous registrations (expected behavior for extensions)

198-204: LGTM! Cleanup function is straightforward.

The function correctly clears both extension widget maps, ensuring complete cleanup for testing and potential hot-reload scenarios without affecting core widgets.


206-208: LGTM! Alias resolution correctly prioritizes extensions.

The precedence chain extensionAliasMap → coreAliasMap → type ensures extension aliases override core aliases, which is the intended behavior for the extension system.


245-248: LGTM! Essential check correctly limited to core widgets.

The function properly:

  • Checks only coreWidgets for essential status
  • Returns false for extension widgets (which don't have an essential property)
  • Uses getCanonicalType for alias resolution before lookup

This ensures extension widgets cannot be marked as essential, maintaining the integrity of the core widget classification.


210-243: Current implementation is correct; displayHint already falls back to type-based resolution.

When a displayHint doesn't match an extension widget, the function continues to type-based resolution. This means a display hint for an unknown widget will correctly fall back to the core widget for that type. The existing test (widgetRegistry.test.ts:117-120) validates this behavior—getComponent('int', 'test', 'unknown_display') returns the core int widget, not null.

The current design is intentional: displayHint allows extensions to override widget rendering, but if no extension widget matches, the normal type-based precedence (extensionWidgetscoreWidgets) applies. No changes needed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81db823 and 50db96a.

📒 Files selected for processing (1)
  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
🧰 Additional context used
📓 Path-based instructions (8)
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/registry/__tests__/widgetRegistry.test.ts
src/**/*.ts

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

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

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.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/registry/__tests__/widgetRegistry.test.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
🧠 Learnings (17)
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: Do not stub primitive UI components or customized primitive components (e.g., Button). Instead, import and register the real components in test setup. This ensures tests accurately reflect production behavior and component API usage.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Check tests-ui/README.md for test guidelines

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts
🧬 Code graph analysis (1)
src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts (1)
src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts (6)
  • clearExtensionWidgets (201-204)
  • registerVueWidgets (187-196)
  • getComponent (210-243)
  • isEssential (245-248)
  • shouldRenderAsVue (250-252)
  • shouldExpand (256-261)
🔇 Additional comments (7)
src/renderer/extensions/vueNodes/widgets/registry/__tests__/widgetRegistry.test.ts (7)

17-20: LGTM! Proper test isolation.

The afterEach hook correctly clears extension widgets between tests, ensuring test isolation and preventing interdependencies.


58-122: LGTM! Comprehensive getComponent test coverage.

This test block thoroughly validates the component resolution logic, including:

  • Unknown type handling
  • Core widget retrieval
  • Extension widget precedence over core widgets
  • Alias resolution with proper precedence
  • Display hint matching and fallback behavior

The tests correctly verify the precedence chain: displayHint → extension widgets → core widgets.


124-146: LGTM! Clear separation verified.

The tests correctly verify that clearExtensionWidgets only affects extension widgets without impacting core widget registrations, ensuring proper isolation between the two widget sources.


148-172: LGTM! Essential widget logic validated.

The tests properly verify that:

  • Core widgets maintain their essential/non-essential status
  • Unknown types safely return false
  • Extension widgets are not marked as essential (correct default behavior)

174-194: LGTM! Rendering decision logic validated.

The tests comprehensively cover the shouldRenderAsVue logic, verifying that widgets are correctly identified for Vue rendering based on the presence of a type and the canvasOnly flag.


196-217: LGTM! Expansion logic validated with case handling.

The tests properly verify the shouldExpand behavior for all expanding types (textarea, markdown, load3D) and include both lowercase and uppercase variants, confirming that canonical type resolution works correctly.


13-15: Consider using markRaw for mock components.

While the current approach works for testing the registry's storage/retrieval logic, using Vue's markRaw would be more type-safe and avoid the type assertion:

import { markRaw } from 'vue'

const MockComponent = markRaw({ name: 'MockComponent' }) as Component
const MockComponent2 = markRaw({ name: 'MockComponent2' }) as Component

This ensures the objects are properly treated as non-reactive Vue components while maintaining type safety.

⛔ Skipped due to learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: Do not stub primitive UI components or customized primitive components (e.g., Button). Instead, import and register the real components in test setup. This ensures tests accurately reflect production behavior and component API usage.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
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 provide/inject for dependency injection in Vue components
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

}

export function exposeVueApi(): void {
window.Vue = Vue
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure this solution could work properly, but as my https://github.com/jtydhr88/ComfyUI_frontend_vue_basic is official example for extension developer, we need to make sure this sure this solution can work with example.

Or I will suggest we skip this change in this PR and work on it in another PR.

Myestery and others added 3 commits January 12, 2026 22:56
- Remove nested if check in getCustomVueWidgets registration by
  capturing method reference before async IIFE
- Export VueWidgets type for use by external extension code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants