-
Notifications
You must be signed in to change notification settings - Fork 461
Fix vue node slot position calculation #7877
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
base: main
Are you sure you want to change the base?
Conversation
- update get input/output pos to use getSlotPosition, handling both node types - add regression test
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe changes refactor slot position calculations by centralizing the logic through delegation to a unified Changes
Sequence DiagramsequenceDiagram
participant Test as Test Suite
participant VueNodeHelpers as VueNodeHelpers
participant ComfyPage as ComfyPage
participant Canvas as Canvas/Subgraph
participant DOM as DOM Elements
Test->>ComfyPage: Create workflow, select KSampler
ComfyPage->>Canvas: Convert node to subgraph
Test->>VueNodeHelpers: enterSubgraph()
VueNodeHelpers->>DOM: Click subgraph-enter-button
Test->>ComfyPage: getNodeRefsByType (includeSubgraph: true)
ComfyPage->>Canvas: Query canvas.graph for nodes
ComfyPage-->>Test: Return KSampler node reference
Test->>DOM: Query slot position (slot-key selector)
DOM-->>Test: Return on-screen slot coordinates
Test->>Canvas: Calculate source slot position
Canvas-->>Test: Return subgraph input position
Test->>Test: Perform drag operation
Test->>Canvas: Drop at target slot
Canvas->>Canvas: Create connection
Test->>Canvas: Assert link count on slots
Canvas-->>Test: Verify positive=1, negative=0
Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 01/09/2026, 04:31:56 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results❌ Some tests failed ⏰ Completed at: 01/09/2026, 04:37:34 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.24 MB (baseline 3.24 MB) • 🔴 +8 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 1.05 MB (baseline 1.05 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 302 kB (baseline 302 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 198 kB (baseline 198 kB) • ⚪ 0 BReusable component library chunks
Status: 8 added / 8 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 9.19 MB (baseline 9.19 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.6 MB (baseline 3.6 MB) • ⚪ 0 BBundles that do not match a named category
Status: 16 added / 16 removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
browser_tests/fixtures/ComfyPage.tsbrowser_tests/fixtures/VueNodeHelpers.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.ts
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not useanytype oras anytype assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code
Files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
**/*.{ts,tsx,vue,js,jsx,json,css}
📄 CodeRabbit inference engine (AGENTS.md)
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width
Files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Minimize the surface area (exported values) of each module and composable
Files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
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/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.ts
src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety
Files:
src/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.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/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.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/LGraphNode.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/LGraphNode.ts
browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (browser_tests/CLAUDE.md)
browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx}: Test user workflows in browser tests
Use Playwright fixtures for browser tests
Follow naming conventions for browser tests
Check assets/ directory for test data when writing tests
Prefer specific selectors in browser tests
Test across multiple viewports
Files:
browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
browser_tests/**/*.spec.ts
📄 CodeRabbit inference engine (AGENTS.md)
browser_tests/**/*.spec.ts: Use E2E tests inbrowser_tests/**/*.spec.tswith Playwright framework
Do not usewaitForTimeoutin Playwright tests; use Locator actions and retrying assertions instead
Use tags like@mobileand@2xin Playwright tests for relevant test variations; tags are respected by config
Files:
browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
Applied to files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.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:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.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:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).
Applied to files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Applied to files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
browser_tests/fixtures/VueNodeHelpers.tssrc/lib/litegraph/src/LGraphNode.tssrc/renderer/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.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} : 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
Applied to files:
src/lib/litegraph/src/LGraphNode.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues
Applied to files:
src/lib/litegraph/src/LGraphNode.tsbrowser_tests/fixtures/ComfyPage.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx} : Minimize the surface area (exported values) of each module and composable
Applied to files:
src/renderer/core/canvas/litegraph/slotCalculations.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/core/canvas/litegraph/slotCalculations.tsbrowser_tests/fixtures/ComfyPage.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor
Applied to files:
browser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
📚 Learning: 2025-12-13T05:54:35.779Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7415
File: browser_tests/tests/mobileBaseline.spec.ts:17-22
Timestamp: 2025-12-13T05:54:35.779Z
Learning: In browser_tests tests for the Comfy-Org/ComfyUI_frontend repository, the `comfyPage.loadWorkflow()` method already handles all necessary synchronization and waiting. No additional `await comfyPage.nextFrame()` call is needed before taking screenshots after loading a workflow.
Applied to files:
browser_tests/fixtures/ComfyPage.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.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:
browser_tests/fixtures/ComfyPage.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:
browser_tests/fixtures/ComfyPage.ts
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Prefer specific selectors in browser tests
Applied to files:
browser_tests/fixtures/ComfyPage.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} : Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the `pnpm lint:fix` command
Applied to files:
browser_tests/fixtures/ComfyPage.ts
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests
Applied to files:
browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
📚 Learning: 2025-12-13T05:34:15.488Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7415
File: browser_tests/tests/mobileBaseline.spec.ts:7-15
Timestamp: 2025-12-13T05:34:15.488Z
Learning: In Playwright tests for the ComfyUI frontend, the toPass() assertion uses incremental backoff during retries. When a test may involve async operations, increasing the timeout (e.g., to 5000 ms) can be sufficient instead of aggressively extending timeouts. Apply this understanding to tests under browser_tests/tests/; if not resolved, review the toPass() backoff behavior and ensure timeouts align with expected async completion without masking issues.
Applied to files:
browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
🧬 Code graph analysis (3)
src/lib/litegraph/src/LGraphNode.ts (1)
src/renderer/core/canvas/litegraph/slotCalculations.ts (1)
getSlotPosition(136-189)
browser_tests/fixtures/ComfyPage.ts (3)
src/scripts/app.ts (1)
graph(165-167)browser_tests/fixtures/VueNodeHelpers.ts (1)
nodes(14-16)src/lib/litegraph/src/LGraphNode.ts (4)
LGraphNode(209-211)LGraphNode(221-4193)LGraphNode(743-751)LGraphNode(753-759)
browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts (1)
browser_tests/helpers/fitToView.ts (1)
fitToViewInstant(15-104)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test
- GitHub Check: lint-and-format
- GitHub Check: setup
- GitHub Check: collect
🔇 Additional comments (4)
src/lib/litegraph/src/LGraphNode.ts (1)
3346-3348: Centralizing slot position viagetSlotPositionlooks correct
getInputPos/getOutputPosnow delegate to the sharedgetSlotPositionutility, so both Vue and LiteGraph nodes use the same DOM/layout‑aware path with consistent fallbacks. Signatures are preserved and the change keeps behavior aligned with the new slot calculation pipeline.Also applies to: 3366-3368
src/renderer/core/canvas/litegraph/slotCalculations.ts (1)
48-56: Slot calculation helpers are correctly internalized behindgetSlotPositionMaking
calculateInputSlotPos/calculateOutputSlotPosinternal and routing external callers throughgetSlotPositionkeeps a single public API while preserving the same collapsed/absolute/default‑stack behavior. TheSlotPositionContextconstruction ingetSlotPositionmatches usage inLGraphNode, so Vue and LiteGraph paths stay consistent.Also applies to: 96-126, 136-189
browser_tests/fixtures/ComfyPage.ts (1)
6-6: Subgraph‑aware node lookup and graph‑node wait helper look sound
waitForGraphNodeswatchingwindow['app']?.canvas.graph?.nodes?.lengthplus the updatedgetNodeRefsByType(type, includeSubgraph)that selectscanvas.graphvsgraphgive tests a clear way to target either the active subgraph or the root graph without changing existing call sites. The use of TS‑onlyLGraph/LGraphNodetypes insidepage.evaluateis safe at runtime and keeps the browser context unpolluted.Also applies to: 1594-1619
browser_tests/fixtures/VueNodeHelpers.ts (1)
167-175:enterSubgraphhelper is straightforward and matches test usageSelecting either a specific node container or the whole page and clicking
data-testid="subgraph-enter-button"cleanly encapsulates “enter subgraph” behavior for tests; no additional synchronization is strictly required here since callers already wait on layout/graph state.
Summary
Fix slot position for Vue nodes using LiteGraph calculation
Fixes #7446
Changes
┆Issue is synchronized with this Notion page by Unito