Conversation
📝 WalkthroughWalkthroughThe PR modifies node hit-testing in LGraphCanvas pointer event handlers (processMouseMove, processMouseDown). When Vue nodes mode is enabled, hit-testing is bypassed to delegate node interactions to Vue-based handling instead of LiteGraph's native hit-detection. Changes
Possibly related PRs
Suggested reviewers
✨ Finishing touches
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/18/2026, 09:12:48 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Tests:
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 18.1 kB (baseline 18.1 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 878 kB (baseline 878 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 66.6 kB (baseline 66.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 385 kB (baseline 385 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 8 added / 8 removed User & Accounts — 4.22 kB (baseline 4.22 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.85 kB (baseline 2.85 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 26.3 kB (baseline 26.3 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 2.75 MB (baseline 2.75 MB) • 🔴 +32 BStores, services, APIs, and repositories
Status: 7 added / 7 removed Utilities & Hooks — 16.6 kB (baseline 16.6 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 4 added / 4 removed Vendor & Third-Party — 9.09 MB (baseline 9.09 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 5.91 MB (baseline 5.91 MB) • ⚪ 0 BBundles that do not match a named category
Status: 25 added / 25 removed |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/litegraph/src/LGraph.ts (1)
1097-1103: Guard disables node hit-testing in Vue mode.
getNodeOnPosnow always returns null whenLiteGraph.vueNodesModeis active, which can break selection/dragging/linking/hover logic that still relies on this hit-test in Vue mode. The reported bug is cursor-only at the edge; this change suppresses all node hit detection globally. Please confirm Vue mode interactions still work and consider moving the suppression toLGraphCanvas.processMouseMove(cursor decision point) or gating it to the specific edge/canvas-overlap scenario instead of blanket disabling.Run this to inspect call sites and the cursor logic:
#!/bin/bash # Find getNodeOnPos call sites and inspect processMouseMove behavior rg -n -C3 '\bgetNodeOnPos\b' src/lib/litegraph rg -n -C3 '\bprocessMouseMove\b' src/lib/litegraph/src/LGraphCanvas.ts
|
PR causes a regression with requiring a draggedlink to be directly over a vue node to connect instead of just being near to one. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/lib/litegraph/src/LGraphCanvas.ts`:
- Around line 3190-3193: The current change in LGraphCanvas (where node is set
to null when LiteGraph.vueNodesMode is true) disables hit-testing and breaks
link-snapping; instead, call graph.getNodeOnPos(x, y, this.visible_nodes) in all
modes (so processMouseMove still receives a node) but when Vue mode is active
suppress the cursor/hover logic by masking out CanvasItem.Node (i.e., gate the
cursor crosshair/hover checks in processMouseMove by checking
LiteGraph.vueNodesMode before using the CanvasItem.Node flag); return undefined
rather than null to follow litegraph conventions and ensure no other code treats
the value as a deliberate null.
| const node = LiteGraph.vueNodesMode | ||
| ? null | ||
| : graph.getNodeOnPos(x, y, this.visible_nodes) | ||
|
|
There was a problem hiding this comment.
Regression risk: disabling node hit-testing breaks link snapping in Vue mode.
Setting node to null in Vue mode bypasses all slot/hover/link highlight logic in processMouseMove, which matches the reported regression where dragged links only connect when directly over the node. Keep hit-testing, and instead suppress the cursor crosshair by gating the CanvasItem.Node flag. Also prefer undefined over null for litegraph internals.
✅ Suggested fix (preserve hit-testing, suppress cursor)
- const node = LiteGraph.vueNodesMode
- ? null
- : graph.getNodeOnPos(x, y, this.visible_nodes)
+ const node = graph.getNodeOnPos(x, y, this.visible_nodes) ?? undefined
+ const allowNodeHover = !LiteGraph.vueNodesMode
@@
- if (node) {
- underPointer |= CanvasItem.Node
+ if (node) {
+ if (allowNodeHover) underPointer |= CanvasItem.NodeAs per coding guidelines, prefer returning undefined over null in litegraph code.
🤖 Prompt for AI Agents
In `@src/lib/litegraph/src/LGraphCanvas.ts` around lines 3190 - 3193, The current
change in LGraphCanvas (where node is set to null when LiteGraph.vueNodesMode is
true) disables hit-testing and breaks link-snapping; instead, call
graph.getNodeOnPos(x, y, this.visible_nodes) in all modes (so processMouseMove
still receives a node) but when Vue mode is active suppress the cursor/hover
logic by masking out CanvasItem.Node (i.e., gate the cursor crosshair/hover
checks in processMouseMove by checking LiteGraph.vueNodesMode before using the
CanvasItem.Node flag); return undefined rather than null to follow litegraph
conventions and ensure no other code treats the value as a deliberate null.
When the mouse cursor is at the very edge of a a node in vue mode, a crosshair cursor will sometimes display. This happens because the mouse is over the canvas, and `LGraphCanvas.processMouseMove` determines the cursor is still above the node. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8120-Fix-crosshair-cursor-in-vue-mode-2eb6d73d36508116a3cfdd407c5e1e9c) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
When the mouse cursor is at the very edge of a a node in vue mode, a crosshair cursor will sometimes display. This happens because the mouse is over the canvas, and
LGraphCanvas.processMouseMovedetermines the cursor is still above the node.This fix feels kinda ick. I don't believe that we can trust thegetNodeOnPoscall to be accurate when in vue mode, but this change could likely have side effects. Perhaps the check should be performed inprocessMouseMoveinstead?┆Issue is synchronized with this Notion page by Unito