-
Notifications
You must be signed in to change notification settings - Fork 448
Support display of multitype slots #7457
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
📝 WalkthroughWalkthroughNode slot rendering now supports multi-type color segments with a rotation offset and localized canvas state; slot color logic in Vue components was refactored to pass slot data to SlotConnectionDot instead of explicit colors, moving color resolution into the dot component. Changes
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (12)src/**/*.vue📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{vue,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/{composables,components}/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/*.{vue,ts,tsx}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/{components,composables}/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
**/*.vue📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx,vue,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/lib/litegraph/**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)
Files:
src/lib/litegraph/**/*.{ts,tsx}📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)
Files:
🧠 Learnings (28)📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-11-24T19:47:56.371ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-11-24T19:47:45.616ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-11-24T19:47:02.860ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-12-03T03:14:48.687ZApplied to files:
📚 Learning: 2025-12-05T08:52:50.787ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-11-24T19:47:02.860ZApplied to files:
📚 Learning: 2025-12-04T21:47:07.812ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-11-24T19:47:45.616ZApplied to files:
📚 Learning: 2025-11-24T19:47:34.324ZApplied to files:
📚 Learning: 2025-11-24T19:47:45.616ZApplied to files:
📚 Learning: 2025-11-24T19:47:02.860ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-12-04T21:43:49.363ZApplied to files:
📚 Learning: 2025-12-09T20:22:23.620ZApplied to files:
📚 Learning: 2025-12-09T03:49:52.828ZApplied to files:
📚 Learning: 2025-12-09T21:40:12.361ZApplied to files:
📚 Learning: 2025-12-11T03:55:51.755ZApplied to files:
📚 Learning: 2025-12-11T12:25:15.470ZApplied to files:
📚 Learning: 2025-11-24T19:47:56.371ZApplied to files:
📚 Learning: 2025-11-24T19:47:56.371ZApplied to files:
📚 Learning: 2025-12-09T03:39:54.501ZApplied to files:
📚 Learning: 2025-12-13T11:03:11.264ZApplied to files:
⏰ 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). (3)
🔇 Additional comments (4)
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, 01:08:07 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/16/2025, 01:27:21 AM 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.24 MB) • 🔴 +4.44 kBMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 990 kB (baseline 990 kB) • ⚪ 0 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 — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 184 kB (baseline 184 kB) • ⚪ 0 BReusable component library chunks
Status: 9 added / 9 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 3 added / 3 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
Status: 5 added / 5 removed Other — 3.75 MB (baseline 3.75 MB) • ⚪ 0 BBundles that do not match a named category
Status: 24 added / 24 removed |
8f8ba05 to
da8f01c
Compare
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: 6
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
src/lib/litegraph/src/node/NodeSlot.ts(3 hunks)src/renderer/extensions/vueNodes/components/InputSlot.vue(1 hunks)src/renderer/extensions/vueNodes/components/OutputSlot.vue(1 hunks)src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue(2 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
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/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vuesrc/lib/litegraph/src/node/NodeSlot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vuesrc/lib/litegraph/src/node/NodeSlot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vuesrc/lib/litegraph/src/node/NodeSlot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vuesrc/lib/litegraph/src/node/NodeSlot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vuesrc/lib/litegraph/src/node/NodeSlot.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/lib/litegraph/src/node/NodeSlot.ts
src/lib/litegraph/**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)
src/lib/litegraph/**/*.{js,ts,jsx,tsx}: Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using thepnpm lint:fixcommand
Take advantage ofTypedArraysubarraywhen appropriate
Thesizeandposproperties ofRectangleshare the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single lineifsyntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Do not replace&&=or||=with=when there is no reason to do so. If you do find a reason to remove either&&=or||=, leave a comment explaining why the removal occurred
When writing methods, prefer returning idiomatic JavaScriptundefinedovernull
Files:
src/lib/litegraph/src/node/NodeSlot.ts
src/lib/litegraph/**/*.{ts,tsx}
📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)
Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
Files:
src/lib/litegraph/src/node/NodeSlot.ts
🧠 Learnings (16)
📚 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 proper error handling in Vue components
Applied to files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.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,ts} : Leverage VueUse functions for performance-enhancing styles
Applied to files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Applied to files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.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,ts} : Implement proper error handling
Applied to files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.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 VueUse functions for performance-enhancing styles
Applied to files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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 `ref` for reactive state in Vue Composition API components
Applied to files:
src/renderer/extensions/vueNodes/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.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/components/OutputSlot.vuesrc/renderer/extensions/vueNodes/components/InputSlot.vuesrc/renderer/extensions/vueNodes/components/SlotConnectionDot.vuesrc/lib/litegraph/src/node/NodeSlot.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/components/InputSlot.vue
📚 Learning: 2025-12-04T21:43:49.363Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/parameters/TabParameters.vue:10-0
Timestamp: 2025-12-04T21:43:49.363Z
Learning: Vue 3.5+ supports reactive props destructure in <script setup>. Destructuring props directly (e.g., `const { nodes } = defineProps<{ nodes: LGraphNode[] }>()`) maintains reactivity through compiler transformation. This is the recommended modern approach and does not require using `props.x` or `toRef`/`toRefs`.
Applied to files:
src/renderer/extensions/vueNodes/components/SlotConnectionDot.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/components/SlotConnectionDot.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/lib/litegraph/src/node/NodeSlot.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/lib/litegraph/src/node/NodeSlot.ts
🔇 Additional comments (5)
src/lib/litegraph/src/node/NodeSlot.ts (2)
134-134: LGTM: Proper canvas state isolation.The
ctx.save()andctx.restore()pair correctly isolates canvas state changes (particularly the clipping path) within this draw method, preventing side effects.Also applies to: 221-221
169-173: LGTM: Proper clipping path for hollow circles.The Path2D clipping implementation correctly creates a donut-shaped render region using the 'evenodd' fill rule, and is properly scoped within the canvas state management.
src/renderer/extensions/vueNodes/components/OutputSlot.vue (1)
14-14: LGTM: Prop binding refactored to data-driven approach.The change from
:colorto:slot-datacorrectly aligns with the refactoring to pass the entire slot data object, enabling multi-type color rendering in the child component.src/renderer/extensions/vueNodes/components/InputSlot.vue (1)
29-29: LGTM: Prop binding refactored to data-driven approach.The change from
:colorto:slot-datais consistent with the refactoring and enables multi-type slot rendering.src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue (1)
9-14: Remove unusedmultiandhasErrorprops.The
multiandhasErrorprops are defined but never passed from parent components (InputSlot.vueandOutputSlot.vue). Themultiprop is referenced in the template (lines 61–63) but will always be falsy, andhasErroris used ingetStyle()(line 19) but parent components handle error styling via CSS classes instead. Delete these props and their associated logic to eliminate dead code.⛔ 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 **/*.vue : In Vue Components, implement proper props and emits definitionsLearnt 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 : Be judicious with addition of new refs or other state: prefer props, avoid redundant `computed`, and prefer `computed` over `watch`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 componentsLearnt 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 propertiesLearnt 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 declarationLearnt 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
| /** Shared base class for {@link LGraphNode} input and output slots. */ | ||
| export abstract class NodeSlot extends SlotBase implements INodeSlot { | ||
| pos?: Point | ||
| rotation = -Math.PI / 2 |
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.
🧹 Nitpick | 🔵 Trivial
Document the public rotation property.
The rotation property is public and affects arc rendering orientation, but lacks documentation explaining its purpose, expected values, or usage. Consider adding a JSDoc comment to clarify this API surface.
Example:
+ /** Rotation offset (in radians) for multi-type arc segments. @default -Math.PI / 2 */
rotation = -Math.PI / 2Based on coding guidelines, minimize the surface area of each module and ensure public APIs are well-documented.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| rotation = -Math.PI / 2 | |
| /** Rotation offset (in radians) for multi-type arc segments. @default -Math.PI / 2 */ | |
| rotation = -Math.PI / 2 |
🤖 Prompt for AI Agents
In src/lib/litegraph/src/node/NodeSlot.ts around line 36, the public rotation
property lacks documentation; add a concise JSDoc immediately above the
declaration that states it's a public numeric rotation in radians applied to
arc/slot rendering, show the default value (-Math.PI/2), note that values are in
radians and can be any real number (wraps modulo 2π), describe the effect
(rotates the arc orientation relative to the node coordinate system), and
include tags like @public, @type {number}, and @default so consumers understand
usage and expected units.
| const typesSet = new Set( | ||
| `${this.type}` | ||
| .split(',') | ||
| .map( | ||
| this.isConnected | ||
| ? (type) => colorContext.getConnectedColor(type) | ||
| : (type) => colorContext.getDisconnectedColor(type) | ||
| ) | ||
| ) | ||
| const types = [...typesSet].slice(0, 3) |
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.
Truncation of types beyond 3 is silent.
The .slice(0, 3) operation silently drops types beyond the first three with no indication to the user. While limiting visual complexity is reasonable, consider logging a warning or adding a visual indicator when types are truncated.
🤖 Prompt for AI Agents
In src/lib/litegraph/src/node/NodeSlot.ts around lines 175 to 184, the types
array is silently truncated with .slice(0, 3); detect when the computed typesSet
contains more than three entries and surface that fact instead of dropping them
silently — e.g., compute the full typesSet first, if its size > 3 set a
truncation indicator (like this.truncatedTypeCount or this.hasTruncatedTypes)
and either log a single warning via the existing logging mechanism or add an
explicit visual marker to the returned data (such as appending a "...+N"
indicator) so the UI can show there are more types; ensure you still pass the
first three types to existing consumers but also expose the truncation metadata
for display/debugging.
| types.forEach((type, idx) => { | ||
| ctx.moveTo(pos[0], pos[1]) | ||
| ctx.fillStyle = type | ||
| ctx.arc( | ||
| pos[0], | ||
| pos[1], | ||
| radius, | ||
| arcLen * idx + this.rotation, | ||
| Math.PI * 2 + this.rotation | ||
| ) | ||
| ctx.fill() | ||
| ctx.beginPath() | ||
| }) |
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.
Critical: Incorrect arc end angle causes overlapping segments.
Line 196 uses Math.PI * 2 + this.rotation as the end angle for each arc segment, which draws from the segment's start angle all the way around the circle. This causes all segments to overlap incorrectly.
Apply this diff to fix the arc end angle:
types.forEach((type, idx) => {
ctx.moveTo(pos[0], pos[1])
ctx.fillStyle = type
ctx.arc(
pos[0],
pos[1],
radius,
arcLen * idx + this.rotation,
- Math.PI * 2 + this.rotation
+ arcLen * (idx + 1) + this.rotation
)
ctx.fill()
ctx.beginPath()
})📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| types.forEach((type, idx) => { | |
| ctx.moveTo(pos[0], pos[1]) | |
| ctx.fillStyle = type | |
| ctx.arc( | |
| pos[0], | |
| pos[1], | |
| radius, | |
| arcLen * idx + this.rotation, | |
| Math.PI * 2 + this.rotation | |
| ) | |
| ctx.fill() | |
| ctx.beginPath() | |
| }) | |
| types.forEach((type, idx) => { | |
| ctx.moveTo(pos[0], pos[1]) | |
| ctx.fillStyle = type | |
| ctx.arc( | |
| pos[0], | |
| pos[1], | |
| radius, | |
| arcLen * idx + this.rotation, | |
| arcLen * (idx + 1) + this.rotation | |
| ) | |
| ctx.fill() | |
| ctx.beginPath() | |
| }) |
🤖 Prompt for AI Agents
In src/lib/litegraph/src/node/NodeSlot.ts around lines 188 to 200, the arc end
angle currently uses Math.PI * 2 + this.rotation causing every segment to draw a
full circle and overlap; change the end angle to arcLen * (idx + 1) +
this.rotation so each arc spans only its intended segment (i.e., replace Math.PI
* 2 + this.rotation with arcLen * (idx + 1) + this.rotation), keeping the rest
of the drawing logic the same.
| ctx.save() | ||
| ctx.strokeStyle = 'black' | ||
| ctx.lineWidth = 0.5 | ||
| types.forEach((_, idx) => { | ||
| ctx.moveTo(pos[0], pos[1]) | ||
| const xOffset = Math.cos(arcLen * idx + this.rotation) * radius | ||
| const yOffset = Math.sin(arcLen * idx + this.rotation) * radius | ||
| ctx.lineTo(pos[0] + xOffset, pos[1] + yOffset) | ||
| }) | ||
| ctx.stroke() | ||
| ctx.restore() |
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.
Hardcoded divider color may not suit all themes.
The divider stroke is hardcoded to 'black' with 0.5 line width, which may not provide sufficient contrast or align with theming in light backgrounds or custom color schemes. Consider deriving the divider color from the color context or making it configurable.
🤖 Prompt for AI Agents
In src/lib/litegraph/src/node/NodeSlot.ts around lines 202 to 212, the divider
stroke is hardcoded to 'black' and a fixed 0.5 lineWidth; change it to use a
derived or configurable color and line width (e.g., read from the node/graph
theme, slot color, or a provided option) instead of the literal 'black' and 0.5.
Update the drawing code to fetch a color (with a sensible fallback) from the
current theme/context or this slot's style property and use that for
ctx.strokeStyle, and make lineWidth configurable too so themes and high-contrast
modes can override them. Ensure you preserve save/restore and stroke ordering
and only change how the style values are selected/applied.
| function getStyle() { | ||
| if (props.hasError) return { backgroundColor: 'var(--color-error)' } | ||
| //TODO Support connected/disconnected colors? | ||
| if (!props.slotData) return { backgroundColor: getSlotColor() } | ||
| const typesSet = new Set( | ||
| `${props.slotData.type}`.split(',').map(getSlotColor) | ||
| ) | ||
| const types = [...typesSet].slice(0, 3) | ||
| if (types.length === 1) return { backgroundColor: types[0] } | ||
| const angle = 360 / types.length | ||
| const slices = types.map( | ||
| (type, idx) => `${type} ${angle * idx}deg ${angle * (idx + 1)}deg` | ||
| ) | ||
| return { | ||
| background: `conic-gradient(${slices.join(',')})`, | ||
| backgroundOrigin: 'border-box' | ||
| } | ||
| } |
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.
🧹 Nitpick | 🔵 Trivial
Consider removing unnecessary type coercion.
At line 23, ${props.slotData.type} uses a template literal to coerce the type to a string. If INodeSlot.type is already typed as string, this coercion is unnecessary and can be simplified.
Consider this change if the type is already a string:
- const typesSet = new Set(
- `${props.slotData.type}`.split(',').map(getSlotColor)
- )
+ const typesSet = new Set(
+ props.slotData.type.split(',').map(getSlotColor)
+ )📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function getStyle() { | |
| if (props.hasError) return { backgroundColor: 'var(--color-error)' } | |
| //TODO Support connected/disconnected colors? | |
| if (!props.slotData) return { backgroundColor: getSlotColor() } | |
| const typesSet = new Set( | |
| `${props.slotData.type}`.split(',').map(getSlotColor) | |
| ) | |
| const types = [...typesSet].slice(0, 3) | |
| if (types.length === 1) return { backgroundColor: types[0] } | |
| const angle = 360 / types.length | |
| const slices = types.map( | |
| (type, idx) => `${type} ${angle * idx}deg ${angle * (idx + 1)}deg` | |
| ) | |
| return { | |
| background: `conic-gradient(${slices.join(',')})`, | |
| backgroundOrigin: 'border-box' | |
| } | |
| } | |
| function getStyle() { | |
| if (props.hasError) return { backgroundColor: 'var(--color-error)' } | |
| //TODO Support connected/disconnected colors? | |
| if (!props.slotData) return { backgroundColor: getSlotColor() } | |
| const typesSet = new Set( | |
| props.slotData.type.split(',').map(getSlotColor) | |
| ) | |
| const types = [...typesSet].slice(0, 3) | |
| if (types.length === 1) return { backgroundColor: types[0] } | |
| const angle = 360 / types.length | |
| const slices = types.map( | |
| (type, idx) => `${type} ${angle * idx}deg ${angle * (idx + 1)}deg` | |
| ) | |
| return { | |
| background: `conic-gradient(${slices.join(',')})`, | |
| backgroundOrigin: 'border-box' | |
| } | |
| } |
🤖 Prompt for AI Agents
In src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue around
lines 18 to 35, the code uses a template literal to coerce props.slotData.type
to a string (`\`${props.slotData.type}\``) which is unnecessary if
INodeSlot.type is already a string; replace the template literal with the direct
string value (props.slotData.type) in the split/map pipeline (i.e.,
props.slotData.type.split(',').map(getSlotColor)), keeping the rest of the logic
unchanged and ensuring props.slotData is still checked for existence before
accessing .type.
| backgroundOrigin: 'border-box' | ||
| } | ||
| } | ||
| const style = getStyle() |
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.
Critical: Style is not reactive to prop changes.
The style constant is computed once during component setup but won't update when props.slotData or props.hasError change. This breaks the multi-type slot display feature when slot properties change dynamically.
Apply this fix to make the style reactive:
+import { computed } from 'vue'
+
function getStyle() {
if (props.hasError) return { backgroundColor: 'var(--color-error)' }
//TODO Support connected/disconnected colors?
if (!props.slotData) return { backgroundColor: getSlotColor() }
const typesSet = new Set(
`${props.slotData.type}`.split(',').map(getSlotColor)
)
const types = [...typesSet].slice(0, 3)
if (types.length === 1) return { backgroundColor: types[0] }
const angle = 360 / types.length
const slices = types.map(
(type, idx) => `${type} ${angle * idx}deg ${angle * (idx + 1)}deg`
)
return {
background: `conic-gradient(${slices.join(',')})`,
backgroundOrigin: 'border-box'
}
}
-const style = getStyle()
+const style = computed(() => getStyle())Then update the template binding:
- :style
+ :style="style"Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue around line
36, the style is computed once with `const style = getStyle()` and therefore
doesn't update when props change; replace this with a reactive computed that
depends on props (e.g., import computed from 'vue' and use const style =
computed(() => getStyle(props.slotData, props.hasError))) and ensure getStyle
accepts those props (adjust its signature if needed), then update the template
binding to use the reactive value (bind with :style="style").
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.
@coderabbitai wouldn't updating the template binding as suggested be redundant given the shorthand syntax in Vue 3.5?
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.
@DrJKL You're absolutely right! With Vue 3.4+'s same-name shorthand syntax, :style is equivalent to :style="style", so that part of my suggestion is indeed redundant.
The critical fix is making style reactive by using computed():
+import { computed } from 'vue'
+
-const style = getStyle()
+const style = computed(() => getStyle())The template can stay as :style (shorthand) — no change needed there. Thanks for catching that! 🐰
🐇✨
🧠 Learnings used
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
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 : Be judicious with addition of new refs or other state: prefer props, avoid redundant `computed`, and prefer `computed` over `watch`
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
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 `ref` for reactive state in Vue Composition API 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 : Implement computed() for derived state in Vue 3 Composition API
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 vue 3.5 style of default prop declaration
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement computed properties with computed()
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
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7121
File: src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue:3-18
Timestamp: 2025-12-03T03:14:48.687Z
Learning: Vue 3.4+ supports same-name shorthand syntax for attribute bindings where `:id` is equivalent to `:id="id"` when the attribute name matches the variable name in scope. This is valid syntax and should not be flagged as an error.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/rightSidePanel/parameters/SectionWidgets.vue:41-49
Timestamp: 2025-12-05T08:52:50.787Z
Learning: In Vue 3.4+ SFCs with a build step, kebab-case prop shorthand (e.g., `:is-empty`) automatically resolves to the corresponding camelCase variable in scope (e.g., `isEmpty`). This is valid syntax combining same-name shorthand with automatic kebab-case-to-camelCase conversion and should not be flagged as an error.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/LiteGraphCanvasSplitterOverlay.vue:43-43
Timestamp: 2025-12-04T21:47:07.812Z
Learning: In Vue SFCs with a build step (pre-compilation), kebab-case attribute names in templates are automatically converted to camelCase, so `:sidebar-panel-visible` as a shorthand binding correctly resolves to a variable named `sidebarPanelVisible`. The `.camel` modifier is only needed when using in-DOM templates without a build step.
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
| //add stroke dividers | ||
| ctx.save() | ||
| ctx.strokeStyle = 'black' | ||
| ctx.lineWidth = 0.5 | ||
| types.forEach((_, idx) => { | ||
| ctx.moveTo(pos[0], pos[1]) | ||
| const xOffset = Math.cos(arcLen * idx + this.rotation) * radius | ||
| const yOffset = Math.sin(arcLen * idx + this.rotation) * radius | ||
| ctx.lineTo(pos[0] + xOffset, pos[1] + yOffset) | ||
| }) | ||
| ctx.stroke() | ||
| ctx.restore() |
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.
Nit: Instead of a comment, how about extracting a named function?
(for this, and also the ones above)
src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
Outdated
Show resolved
Hide resolved
| ) | ||
| " | ||
| :style="{ backgroundColor: types[0] }" | ||
| :class="slotClass" |
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.
Why was this pulled out of the template?
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.
It's used twice. I wanted to avoid the extra lines and the chance that the two copies become desynced.
I'm not 100% happy with how the border outline or scaling of optional multi-type inputs work and would like to eventually separate out/re-inline the class, but the amount of extra work this would require is not something I can justify right now.

Example with forcibly modified types for testing

Vue mode doesn't currently seem to display optional inputs, but the SVGs here include support for being made hollow with

--shape: url(#hollow)┆Issue is synchronized with this Notion page by Unito