-
Notifications
You must be signed in to change notification settings - Fork 448
Fix doubled control application #7550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughRefactors widget control functionality from a registry-based enum pattern to a component-wrapper architecture. Introduces Changes
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/16/2025, 10:28:11 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/16/2025, 10:38:15 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.25 MB (baseline 3.25 MB) • 🟢 -1.02 kBMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 992 kB (baseline 992 kB) • 🔴 +73 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 299 kB (baseline 299 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 183 kB (baseline 184 kB) • 🟢 -919 BReusable component library chunks
Status: 8 added / 7 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.75 MB (baseline 3.75 MB) • 🟢 -584 BBundles that do not match a named category
Status: 19 added / 19 removed |
There was a problem hiding this 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
📒 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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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 usewithDefaultsor runtime props declaration
PreferuseModelto separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using<style>blocks in Vue components
Use semantic Tailwind values fromstyle.csstheme instead of thedark:variant; for example, usebg-node-component-surfaceinstead ofdark:prefixes
Always usecn()utility from@/utils/tailwindUtilto merge Tailwind class names; do not use:class="[]"syntax
Usereffor reactive state in Vue Composition API components
Implement computed properties withcomputed()from Vue; avoid using arefwith awatchif acomputedwould work instead
UsewatchandwatchEffectfor side effects in Vue components
Implement lifecycle hooks usingonMounted,onUpdated, and other Vue lifecycle functions
Useprovide/injectfor 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 redundantcomputed, and prefercomputedoverwatch
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 insrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/types/simplifiedWidget.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype 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 nestediforforstatements); 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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/types/simplifiedWidget.ts
src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safetyMinimize 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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/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.vuesrc/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
SimplifiedWidgetto requirecontrolWidget. The intersection type approach is idiomatic and type-safe.src/renderer/extensions/vueNodes/widgets/components/NumberControlPopover.vue (1)
1-126: LGTM!The migration from
NumberControlModeenum toControlOptionsstring literals is clean and consistent. The removal of theENABLE_LINK_TO_GLOBALfeature 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
hasControlAfterGeneratecheck confirms the widget has acontrolWidget, but TypeScript doesn't automatically narrow the type.As per coding guidelines, avoid
astype 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 insteadLearnt 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-ifconfirmswidget.controlWidgetexists, 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
astype 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 insteadsrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue (1)
45-55: No changes needed—:widgetis standard Vue 3.4+ syntax. Vue 3.4+ supports same-name shorthand for prop binding where:widgetexpands to:widget="widget". This syntax is correct and aligns with the project's Vue 3.5 usage.
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Show resolved
Hide resolved
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Outdated
Show resolved
Hide resolved
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Outdated
Show resolved
Hide resolved
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Outdated
Show resolved
Hide resolved
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Outdated
Show resolved
Hide resolved
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Outdated
Show resolved
Hide resolved
DrJKL
left a comment
There was a problem hiding this 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.
There was a problem hiding this 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
NumberControlPopoverusesdefineModel<ControlOptions>()and expectsmodelValue/update:modelValue, but this component is binding:control-modeand@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 oncompprop.Previous reviews suggested:
- Using a more specific type (
Componentfrom Vue) instead ofunknown- Renaming to
componentorasfor clarityApply 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 typeSimplifiedWidget<T> & { controlWidget: SafeControlWidget }already guaranteescontrolWidgetexists.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
📒 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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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 usewithDefaultsor runtime props declaration
PreferuseModelto separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using<style>blocks in Vue components
Use semantic Tailwind values fromstyle.csstheme instead of thedark:variant; for example, usebg-node-component-surfaceinstead ofdark:prefixes
Always usecn()utility from@/utils/tailwindUtilto merge Tailwind class names; do not use:class="[]"syntax
Usereffor reactive state in Vue Composition API components
Implement computed properties withcomputed()from Vue; avoid using arefwith awatchif acomputedwould work instead
UsewatchandwatchEffectfor side effects in Vue components
Implement lifecycle hooks usingonMounted,onUpdated, and other Vue lifecycle functions
Useprovide/injectfor 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 redundantcomputed, and prefercomputedoverwatch
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 insrc/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.vuesrc/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.vuesrc/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; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype 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 nestediforforstatements); 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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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
WidgetWithControlwrapper while preserving the direct rendering path for non-control widgets. The type assertion on line 28 is safe given thev-ifguard.
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Show resolved
Hide resolved
src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
Buttoncomponent. 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
📒 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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/extensions/core/widgetInputs.tssrc/types/simplifiedWidget.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/extensions/core/widgetInputs.tssrc/types/simplifiedWidget.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/extensions/core/widgetInputs.tssrc/types/simplifiedWidget.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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 usewithDefaultsor runtime props declaration
PreferuseModelto separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using<style>blocks in Vue components
Use semantic Tailwind values fromstyle.csstheme instead of thedark:variant; for example, usebg-node-component-surfaceinstead ofdark:prefixes
Always usecn()utility from@/utils/tailwindUtilto merge Tailwind class names; do not use:class="[]"syntax
Usereffor reactive state in Vue Composition API components
Implement computed properties withcomputed()from Vue; avoid using arefwith awatchif acomputedwould work instead
UsewatchandwatchEffectfor side effects in Vue components
Implement lifecycle hooks usingonMounted,onUpdated, and other Vue lifecycle functions
Useprovide/injectfor 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 redundantcomputed, and prefercomputedoverwatch
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 insrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/extensions/core/widgetInputs.tssrc/types/simplifiedWidget.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/locales/en/main.jsonsrc/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; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype 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 nestediforforstatements); 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.vuesrc/extensions/core/widgetInputs.tssrc/types/simplifiedWidget.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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 safetyMinimize the surface area (exported values) of each module and composable
Files:
src/extensions/core/widgetInputs.tssrc/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.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.vuesrc/extensions/core/widgetInputs.tssrc/types/simplifiedWidget.tssrc/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vuesrc/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.tssrc/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.tssrc/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.vuesrc/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vuesrc/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.vuesrc/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.vuesrc/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.vuesrc/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
numberControltovalueControlaccurately 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-5class 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
WidgetWithControlpath for control-enabled select widgets correctly:
- Checks for
widget.controlWidgetexistence- Casts to the appropriate
SimplifiedControlWidgettype- Passes
WidgetSelectDefaultas the inner component- Uses a clear type alias (
StringControlWidget) for readabilityThis implementation is consistent with the
WidgetInputNumber.vueapproach 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
SimplifiedControlWidgetinterface correctly:
- Uses
extendsrather than intersection types (good for performance)- Makes
controlWidgeta 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
extendsfollows 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-elseblockThis change aligns with the new architecture and removes the need for the dedicated
WidgetInputNumberWithControlcomponent.src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vue (2)
7-7: LGTM! Successful migration from enum to string literal types.The refactoring from
NumberControlModeenum toControlOptionsstring 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.*towidgets.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>andComponent- Implements reactive control mode tracking with
controlModel- Watches and forwards control mode updates to
widget.controlWidget.update- Provides clean
togglePopovermethod for event handlingThe async import of
ValueControlPopoveris 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: ThelinkedWidgetsproperty is properly typed in the widget system. It is defined inIBaseWidgetaslinkedWidgets?: IBaseWidget[]and is a standard, well-established property used throughout the codebase for establishing relationships between widgets.Likely an incorrect or invalid review comment.
| <div class="absolute top-5 right-8 h-4 w-7 -translate-y-4/5 flex"> | ||
| <slot /> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
find src -name "WidgetSelectDefault.vue" -type fRepository: Comfy-Org/ComfyUI_frontend
Length of output: 145
🏁 Script executed:
cat src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 2192
🏁 Script executed:
find src -name "WidgetLayoutField.vue" -type fRepository: Comfy-Org/ComfyUI_frontend
Length of output: 150
🏁 Script executed:
cat src/renderer/extensions/vueNodes/widgets/components/layout/WidgetLayoutField.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 1189
🏁 Script executed:
grep -r "WidgetSelectDefault" src --include="*.vue" --include="*.ts" -l | head -10Repository: Comfy-Org/ComfyUI_frontend
Length of output: 138
🏁 Script executed:
rg "overflow-hidden" src/renderer/extensions/vueNodes/widgets --type vue -A 2 -B 2Repository: Comfy-Org/ComfyUI_frontend
Length of output: 97
🏁 Script executed:
rg "overflow-hidden" src/renderer/extensions/vueNodes/widgets -A 2 -B 2Repository: 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 -5Repository: Comfy-Org/ComfyUI_frontend
Length of output: 449
🏁 Script executed:
cat src/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 3699
🏁 Script executed:
cat src/renderer/extensions/vueNodes/widgets/components/WidgetWithControl.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 1612
🏁 Script executed:
rg "class.*relative" src/renderer/extensions/vueNodes/widgets/components/layout -A 3Repository: Comfy-Org/ComfyUI_frontend
Length of output: 477
🏁 Script executed:
rg "overflow-hidden" src/renderer/extensions/vueNodes --type vue | grep -E "(WidgetLayout|Select)" | head -10Repository: Comfy-Org/ComfyUI_frontend
Length of output: 97
🏁 Script executed:
cat src/renderer/extensions/vueNodes/widgets/components/ValueControlPopover.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 3471
🏁 Script executed:
rg "Teleport" src/renderer/extensions/vueNodes/widgets --include="*.vue" | head -5Repository: Comfy-Org/ComfyUI_frontend
Length of output: 511
🏁 Script executed:
rg "WidgetSelectDefault\|absolute.*top-5.*right-8" src --include="*.vue" -A 3 -B 3Repository: Comfy-Org/ComfyUI_frontend
Length of output: 511
🏁 Script executed:
rg "Teleport" src/renderer/extensions/vueNodes/widgets -t vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 97
🏁 Script executed:
rg "absolute.*top-5.*right-8" src -t vue -A 3 -B 3Repository: 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 3Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1527
🏁 Script executed:
find src/renderer/extensions/vueNodes -name "*.vue" | xargs grep -l "WidgetInputNumberInput\|WidgetSelectDefault" | head -5Repository: Comfy-Org/ComfyUI_frontend
Length of output: 212
🏁 Script executed:
find src/renderer -path "*vueNodes*" -name "*.vue" | xargs grep "overflow-hidden" -lRepository: 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 -10Repository: 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.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 6524
🏁 Script executed:
cat src/renderer/extensions/vueNodes/components/NodeContent.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 1617
🏁 Script executed:
find src -name "*.vue" | xargs grep -l "grid-cols-subgrid" | head -5Repository: Comfy-Org/ComfyUI_frontend
Length of output: 344
🏁 Script executed:
grep -r "position.*context\|Teleport" src/renderer/extensions/vueNodes --include="*.ts" --include="*.vue" | head -10Repository: Comfy-Org/ComfyUI_frontend
Length of output: 52
🏁 Script executed:
rg "z-\[" src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 52
🏁 Script executed:
cat src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumber.vue | head -50Repository: 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.
DrJKL
left a comment
There was a problem hiding this 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.
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:
┆Issue is synchronized with this Notion page by Unito