Skip to content

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Dec 13, 2025

Example with forcibly modified types for testing
image

Vue mode doesn't currently seem to display optional inputs, but the SVGs here include support for being made hollow with --shape: url(#hollow)
image

┆Issue is synchronized with this Notion page by Unito

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

📝 Walkthrough

Walkthrough

Node 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

Cohort / File(s) Summary
Node slot rendering
src/lib/litegraph/src/node/NodeSlot.ts
Added module-level rotation offset constant, wrapped rendering in ctx.save()/ctx.restore(), introduced multi-type arc-segment rendering (evenly laid segments, per-type colors, dividers) and adjusted path/paint sequencing; preserved single-type circle path.
Slot component inputs
src/renderer/extensions/vueNodes/components/InputSlot.vue, src/renderer/extensions/vueNodes/components/OutputSlot.vue
Replaced passing :color="slotColor" with :slot-data to SlotConnectionDot; removed getSlotColor import and slotColor computed property; delegated color determination to child.
Slot connection dot
src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
Replaced color prop with slotData and added hasError (kept multi); added logic to derive one-or-many types via getSlotColor/slot data and render single-type or multi-type markup/styles accordingly (per-type styling, class/computed updates).

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch austin/multitype-slots

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between da8f01c and f0f5416.

⛔ Files ignored due to path filters (3)
  • packages/design-system/src/icons/nodeSlot.svg is excluded by !**/*.svg
  • packages/design-system/src/icons/nodeSlot2.svg is excluded by !**/*.svg
  • packages/design-system/src/icons/nodeSlot3.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • src/lib/litegraph/src/node/NodeSlot.ts (3 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/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/SlotConnectionDot.vue
  • src/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/SlotConnectionDot.vue
  • src/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/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/SlotConnectionDot.vue
  • src/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/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 use withDefaults or runtime props declaration
Prefer useModel to separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using <style> blocks in Vue components
Use semantic Tailwind values from style.css theme instead of the dark: variant; for example, use bg-node-component-surface instead of dark: prefixes
Always use cn() utility from @/utils/tailwindUtil to merge Tailwind class names; do not use :class="[]" syntax
Use ref for reactive state in Vue Composition API components
Implement computed properties with computed() from Vue; avoid using a ref with a watch if a computed would work instead
Use watch and watchEffect for side effects in Vue components
Implement lifecycle hooks using onMounted, onUpdated, and other Vue lifecycle functions
Use provide/inject for dependency injection; do not use dependency injection if a Store or shared composable would be simpler
Do not import Vue macros unnecessarily; only use when needed
Be judicious with addition of new refs or other state: prefer props, avoid redundant computed, and prefer computed over watch
Use VueUse functions for performance-enhancing styles
In Vue Components, implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Implement proper error handling in Vue components
Follow Vue 3 style guide and naming conventions
Use vue-i18n in composition API for any string literals; place new translation entries in src/locales/en/main.json
Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead

Files:

  • src/renderer/extensions/vueNodes/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/SlotConnectionDot.vue
  • src/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; run pnpm format before committing
Use TypeScript for type safety; never use any type - use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nested if or for statements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
  • src/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 safety

Minimize 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 the pnpm lint:fix command
Take advantage of TypedArray subarray when appropriate
The size and pos properties of Rectangle share the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single line if syntax 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 JavaScript undefined over null

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 (28)
📚 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/components/SlotConnectionDot.vue
  • src/lib/litegraph/src/node/NodeSlot.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : 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

Applied to files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
  • src/lib/litegraph/src/node/NodeSlot.ts
📚 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 : Be judicious with addition of new refs or other state: prefer props, avoid redundant `computed`, and prefer `computed` over `watch`

Applied to files:

  • src/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,css} : Use the correct tokens from style.css in the design system package

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 : 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/components/SlotConnectionDot.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 : Utilize ref and reactive for reactive state

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 : Use `ref` for reactive state in Vue Composition API components

Applied to files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
📚 Learning: 2025-12-03T03:14:48.687Z
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.

Applied to files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
📚 Learning: 2025-12-05T08:52:50.787Z
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.

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 : 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/components/SlotConnectionDot.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 vue 3.5 style of default prop declaration

Applied to files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
📚 Learning: 2025-12-04T21:47:07.812Z
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.

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 : Prefer `useModel` to separately defining a prop and emit

Applied to files:

  • src/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 : Use ref/reactive for state management in Vue 3 Composition API

Applied to files:

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

Applied to files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.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/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-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 : Use VueUse functions for performance-enhancing styles

Applied to files:

  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.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/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/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/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/SlotConnectionDot.vue
  • src/lib/litegraph/src/node/NodeSlot.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Take advantage of `TypedArray` `subarray` when appropriate

Applied to files:

  • src/lib/litegraph/src/node/NodeSlot.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

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

Applied to files:

  • src/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
⏰ 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)
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
🔇 Additional comments (4)
src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue (1)

33-42: LGTM! Properly reactive computed property.

The slotClass computed property correctly uses computed() and will reactively update when props.multi changes. Good use of the cn() utility for class merging per coding guidelines.

src/lib/litegraph/src/node/NodeSlot.ts (3)

33-33: LGTM! Clear constant for arc rotation offset.

The ROTATION_OFFSET constant is well-named and properly scoped as a module-level constant. The value -Math.PI / 2 clearly indicates a 90-degree rotation offset for the arc segments.


135-135: LGTM! Proper canvas state isolation.

The addition of ctx.save() and ctx.restore() properly isolates the canvas state changes for slot rendering, preventing state leakage. This is a best practice for canvas rendering.

Also applies to: 222-222


170-174: LGTM! Correct use of evenodd clipping.

The hollow circle clipping path correctly uses Path2D with the 'evenodd' fill rule to create a ring effect. The dynamic radius adjustment for highlight state is a nice touch.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/16/2025, 01:08:07 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/16/2025, 01:27:21 AM UTC

📈 Summary

  • Total Tests: 505
  • Passed: 493 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 481 / ❌ 0 / ⚠️ 3 / ⏭️ 9
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 9 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🔴 +4.44 kB
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +1.09 kB
  • Brotli: 2.6 MB baseline 2.6 MB — 🔴 +797 B
  • Bundles: 98 current • 98 baseline • 53 added / 53 removed

Category Glance
App Entry Points 🔴 +4.44 kB (3.25 MB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.75 MB) · Graph Workspace ⚪ 0 B (990 kB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (184 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.25 MB (baseline 3.24 MB) • 🔴 +4.44 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CWSabC8_.js (new) 3.02 MB 🔴 +3.02 MB 🔴 +628 kB 🔴 +478 kB
assets/index-DfWzEpAr.js (removed) 3.02 MB 🟢 -3.02 MB 🟢 -627 kB 🟢 -477 kB
assets/index-1bEyfHxK.js (removed) 227 kB 🟢 -227 kB 🟢 -48.6 kB 🟢 -39.9 kB
assets/index-B6haG5xc.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +39.9 kB
assets/index-CoaFbc_b.js (removed) 345 B 🟢 -345 B 🟢 -242 B 🟢 -229 B
assets/index-DCYg2hR5.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +200 B

Status: 3 added / 3 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-B37FdZHB.js (removed) 990 kB 🟢 -990 kB 🟢 -191 kB 🟢 -146 kB
assets/GraphView-BOC56rgD.js (new) 990 kB 🔴 +990 kB 🔴 +191 kB 🔴 +146 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-Bl5LxSww.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.13 kB 🟢 -1.89 kB
assets/UserSelectView-DUXqoZtV.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.13 kB 🔴 +1.89 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-6CBzA7-P.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/LegacyCreditsPanel-LklV2sz3.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/KeybindingPanel-BRiOpkTh.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.02 kB
assets/KeybindingPanel-COmn2XVK.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-D-dnI0HB.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.26 kB
assets/ExtensionPanel-teVuuXSt.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.26 kB
assets/AboutPanel-3U9dv2Zh.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-CVZvKEr-.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-DVAmnew8.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/ServerConfigPanel-Y2jMCHiT.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/UserPanel-BT7tJ9QT.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/UserPanel-C99DgIKt.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/settings-B_sqawkt.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BlDXT7wp.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bz8HAvJu.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C2vW8UNv.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9vsDM17.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DWD49kQp.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DZE27_Iz.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-OXaZPcZF.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-RbkKsnDG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-DvZlR9pm.js (removed) 53.7 kB 🟢 -53.7 kB 🟢 -8.48 kB 🟢 -7.29 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-tSb_CWvh.js (new) 53.7 kB 🔴 +53.7 kB 🔴 +8.48 kB 🔴 +7.29 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BHHuc566.js (removed) 48 kB 🟢 -48 kB 🟢 -10.3 kB 🟢 -8.97 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BkuP-biP.js (new) 48 kB 🔴 +48 kB 🔴 +10.3 kB 🔴 +8.99 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Cku0Z0Gk.js (new) 48 kB 🔴 +48 kB 🔴 +10.6 kB 🔴 +9.32 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-D2rKU7qW.js (removed) 48 kB 🟢 -48 kB 🟢 -10.6 kB 🟢 -9.31 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CcMr8_wO.js (removed) 19.5 kB 🟢 -19.5 kB 🟢 -5.04 kB 🟢 -4.47 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-XTclvzr6.js (new) 19.5 kB 🔴 +19.5 kB 🔴 +5.04 kB 🔴 +4.47 kB
assets/ComfyQueueButton-C8HusUGe.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/ComfyQueueButton-kffEAla0.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BQqtQY9m.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -889 B 🟢 -761 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BwRRmHtT.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +888 B 🔴 +764 B
assets/WidgetButton-CUWIT83D.js (new) 2.04 kB 🔴 +2.04 kB 🔴 +931 B 🔴 +814 B
assets/WidgetButton-DOJNBkZW.js (removed) 2.04 kB 🟢 -2.04 kB 🟢 -927 B 🟢 -814 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CiSnQExp.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +687 B 🔴 +595 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-w3tJv_nT.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -687 B 🟢 -594 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DfugxoSI.js (new) 897 B 🔴 +897 B 🔴 +500 B 🔴 +429 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DLQr8C5r.js (removed) 897 B 🟢 -897 B 🟢 -501 B 🟢 -430 B

Status: 9 added / 9 removed

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

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-D9bro5xk.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-SYJewunK.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/serverConfigStore-Bwn3ENCR.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +906 B 🔴 +790 B
assets/serverConfigStore-DJOGMzM9.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -907 B 🟢 -788 B
assets/audioService-FnHi5JSR.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -826 B
assets/audioService-z74a9HWY.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +961 B 🔴 +828 B

Status: 3 added / 3 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-DmXEp0J2.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -551 B
assets/audioUtils-XQ3SEIf-.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +542 B
assets/mathUtil-CD4DsosH.js 1.32 kB 1.32 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-Bpr1teP3.js (removed) 3.98 MB 🟢 -3.98 MB 🟢 -843 kB 🟢 -673 kB
assets/vendor-other-S7nymsLT.js (new) 3.98 MB 🔴 +3.98 MB 🔴 +843 kB 🔴 +673 kB
assets/vendor-primevue-Bo6kY08Z.js (removed) 1.96 MB 🟢 -1.96 MB 🟢 -335 kB 🟢 -202 kB
assets/vendor-primevue-BzWEaXhK.js (new) 1.96 MB 🔴 +1.96 MB 🔴 +335 kB 🔴 +202 kB
assets/vendor-chart-AbygYk1r.js (removed) 452 kB 🟢 -452 kB 🟢 -99.1 kB 🟢 -81.1 kB
assets/vendor-chart-Cqf0KagN.js (new) 452 kB 🔴 +452 kB 🔴 +99.1 kB 🔴 +81 kB
assets/vendor-tiptap-B5bBARf1.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-tiptap-BIIubbA1.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-vue-BPEtaHlw.js (new) 160 kB 🔴 +160 kB 🔴 +37.3 kB 🔴 +31.6 kB
assets/vendor-vue-LuJ8go0g.js (removed) 160 kB 🟢 -160 kB 🟢 -37.3 kB 🟢 -31.6 kB
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

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

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-BAm97yUj.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-BUKtEBFG.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.62 kB
assets/AudioPreviewPlayer-Bxebh-DP.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.01 kB
assets/AudioPreviewPlayer-Czc_2nvJ.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3 kB
assets/NumberControlPopover-B05F_3XA.js (new) 6.31 kB 🔴 +6.31 kB 🔴 +1.93 kB 🔴 +1.7 kB
assets/NumberControlPopover-CBYKDX21.js (removed) 6.31 kB 🟢 -6.31 kB 🟢 -1.93 kB 🟢 -1.7 kB
assets/WidgetGalleria-DrMDOMJ8.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetGalleria-DS0grbM0.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetColorPicker-DIOcD4aS.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-tmCOlMOJ.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-BRkZDooj.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.07 kB
assets/WidgetTextarea-CGQD-tNI.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.08 kB
assets/WidgetMarkdown-DCXDGlEp.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetMarkdown-DvAijesV.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetAudioUI-CEcvMPq9.js (new) 2.86 kB 🔴 +2.86 kB 🔴 +1.16 kB 🔴 +1.05 kB
assets/WidgetAudioUI-CfJcFLIq.js (removed) 2.86 kB 🟢 -2.86 kB 🟢 -1.16 kB 🟢 -1.05 kB
assets/MediaVideoTop-D9Cly-Iv.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.01 kB 🟢 -867 B
assets/MediaVideoTop-DhI-keBK.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.02 kB 🔴 +871 B
assets/WidgetChart-BCz3KGHg.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -933 B 🟢 -816 B
assets/WidgetChart-CtDKuluF.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +930 B 🔴 +822 B
assets/WidgetImageCompare-DDdUO9Q8.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +749 B 🔴 +662 B
assets/WidgetImageCompare-hxKmDAJk.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -748 B 🟢 -664 B
assets/WidgetInputText-ADBVtLgg.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -915 B 🟢 -852 B
assets/WidgetInputText-C4fXySsg.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +917 B 🔴 +851 B
assets/WidgetToggleSwitch-C_tqPp5F.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -832 B 🟢 -730 B
assets/WidgetToggleSwitch-rZEGhH96.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +832 B 🔴 +728 B
assets/MediaImageTop-B3anU6gM.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +841 B 🔴 +717 B
assets/MediaImageTop-CwqdJFy1.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -841 B 🟢 -717 B
assets/MediaImageBottom-C-lF6Y2e.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -731 B 🟢 -638 B
assets/MediaImageBottom-CHwbvoZo.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +734 B 🔴 +641 B
assets/MediaAudioBottom-C2Efg3M5.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +733 B 🔴 +650 B
assets/MediaAudioBottom-CXcTMOTO.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -733 B 🟢 -650 B
assets/Media3DBottom-D4Yly7QH.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +734 B 🔴 +650 B
assets/Media3DBottom-DX9CCyYL.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -652 B
assets/MediaVideoBottom-Bn-_vD5C.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +650 B
assets/MediaVideoBottom-D2wKNUoW.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -649 B
assets/Media3DTop-BEAn2DfO.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +765 B 🔴 +648 B
assets/Media3DTop-Dt5lojPF.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -762 B 🟢 -650 B
assets/MediaAudioTop-CYgnPvxj.js (removed) 1.46 kB 🟢 -1.46 kB 🟢 -738 B 🟢 -614 B
assets/MediaAudioTop-FQz4Thvl.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +739 B 🔴 +614 B
assets/WidgetSelect-B4QqRltA.js (new) 655 B 🔴 +655 B 🔴 +342 B 🔴 +289 B
assets/WidgetSelect-ClAlOv4F.js (removed) 655 B 🟢 -655 B 🟢 -344 B 🟢 -287 B
assets/WidgetInputNumber-CcyV82ne.js (new) 595 B 🔴 +595 B 🔴 +329 B 🔴 +276 B
assets/WidgetInputNumber-D2TT2OPu.js (removed) 595 B 🟢 -595 B 🟢 -330 B 🟢 -273 B
assets/Load3D-BHBUjD0j.js (removed) 424 B 🟢 -424 B 🟢 -266 B 🟢 -223 B
assets/Load3D-CbGzLDwX.js (new) 424 B 🔴 +424 B 🔴 +266 B 🔴 +225 B
assets/WidgetLegacy-DbF4MOuy.js (new) 364 B 🔴 +364 B 🔴 +237 B 🔴 +196 B
assets/WidgetLegacy-DkKrzH7l.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -195 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-6nlVHpc-.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B_3IONzJ.js 113 kB 113 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BqRsXvrH.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BZ-vlW9L.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C3etCTkn.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CG-hMOv1.js 84.2 kB 84.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ChsXwF7G.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DjVXiGQX.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Xp7hXzT2.js 81.7 kB 81.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B1kKcnvT.js 303 kB 303 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BoX8ObAh.js 300 kB 300 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BZQ0wolS.js 360 kB 360 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CHUJIOIF.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DAU0PVOW.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Db5kOxDZ.js 299 kB 299 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DgiIrZvP.js 276 kB 276 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DU4sfqO1.js 334 kB 334 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dw-Pdf3f.js 279 kB 279 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 24 added / 24 removed

@AustinMroz AustinMroz force-pushed the austin/multitype-slots branch from 8f8ba05 to da8f01c Compare December 13, 2025 21:52
@AustinMroz AustinMroz marked this pull request as ready for review December 13, 2025 22:47
@AustinMroz AustinMroz requested a review from a team as a code owner December 13, 2025 22:47
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 13, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd97473 and da8f01c.

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

Files:

  • src/renderer/extensions/vueNodes/components/OutputSlot.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
  • src/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; run pnpm format before committing
Use TypeScript for type safety; never use any type - use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nested if or for statements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • src/renderer/extensions/vueNodes/components/OutputSlot.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
  • src/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 safety

Minimize 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 the pnpm lint:fix command
Take advantage of TypedArray subarray when appropriate
The size and pos properties of Rectangle share the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single line if syntax 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 JavaScript undefined over null

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.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/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.vue
  • src/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.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • 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 : Use `ref` for reactive state in Vue Composition API components

Applied to files:

  • src/renderer/extensions/vueNodes/components/OutputSlot.vue
  • src/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.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/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.vue
  • src/renderer/extensions/vueNodes/components/InputSlot.vue
  • src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue
  • src/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() and ctx.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 :color to :slot-data correctly 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 :color to :slot-data is consistent with the refactoring and enables multi-type slot rendering.

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

9-14: Remove unused multi and hasError props.

The multi and hasError props are defined but never passed from parent components (InputSlot.vue and OutputSlot.vue). The multi prop is referenced in the template (lines 61–63) but will always be falsy, and hasError is used in getStyle() (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 definitions
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: 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
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
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: .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
Copy link
Contributor

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 / 2

Based 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.

Suggested change
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.

Comment on lines +175 to +184
const typesSet = new Set(
`${this.type}`
.split(',')
.map(
this.isConnected
? (type) => colorContext.getConnectedColor(type)
: (type) => colorContext.getDisconnectedColor(type)
)
)
const types = [...typesSet].slice(0, 3)
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines 188 to 200
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()
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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.

Suggested change
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.

Comment on lines 202 to 212
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()
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines 18 to 35
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'
}
}
Copy link
Contributor

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.

Suggested change
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()
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 13, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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").

Copy link
Contributor

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?

Copy link
Contributor

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

Comment on lines 201 to 212
//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()
Copy link
Contributor

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)

@AustinMroz
Copy link
Collaborator Author

Going to try and cleanup the vue implementation on this one by moving to SVGs. For posterity, my very rough attempt at dividing lines with conic gradient
image

)
"
:style="{ backgroundColor: types[0] }"
:class="slotClass"
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@jtydhr88 jtydhr88 merged commit 108cfaa into main Dec 16, 2025
27 checks passed
@jtydhr88 jtydhr88 deleted the austin/multitype-slots branch December 16, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants