Skip to content

Conversation

@AustinMroz
Copy link
Collaborator

@AustinMroz AustinMroz commented Dec 13, 2025

Disconnections are frequently performed by dragging a link from an input slot and dropping it on the canvas, but needing to wait for the searchbox to pop up, and then needing to manually close out of this can make it feel slow. Sometimes, this will even result in users disabling the link release action for more responsive graph building.

Instead, this PR introduces new functionality where a link which is moved only a short distance from a node input and dropped will be immediately disconnected instead of performing the default link release action.
fast-disco_00001

┆Issue is synchronized with this Notion page by Unito

When a link is dragged only a short disctance from an input slot before
being dropped on canvas, immediately disconnect it instead of displaying
the node search dialogue
Only applied on input links

Once snapped, stays disabled

Simplified logic

Some actual themeing
@AustinMroz AustinMroz requested review from a team and benceruleanlu as code owners December 13, 2025 22:56
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This PR enhances link dragging interactions by introducing visual feedback circles for input links, implementing proximity-based disconnect behavior controlled by a disconnectOnDrop flag, and extending input link initialization to accept layout information for positioning alignment.

Changes

Cohort / File(s) Summary
Visual feedback and proximity-based disconnect
src/lib/litegraph/src/canvas/MovingInputLink.ts, src/lib/litegraph/src/LGraphCanvas.ts
Introduces disconnectOnDrop flag and drawConnectionCircle() method to MovingInputLink; adds rendering logic in LGraphCanvas to draw connection circle during link drag and toggle disconnect flag based on distance proximity.
Drop-on-nothing disconnect logic
src/lib/litegraph/src/canvas/LinkConnector.ts
Adds logic in dropOnNothing() to remove all MovingInputLink instances where disconnectOnDrop is truthy, using remove() utility.
Layout-aware input link initialization
src/renderer/core/canvas/links/linkConnectorAdapter.ts, src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
Extends beginFromInput() options to accept layout (SlotLayout) parameter for updating input slot position; composable passes layout information when initiating input link drag.

Sequence Diagram

sequenceDiagram
    participant User
    participant useSlotLinkInteraction
    participant linkConnectorAdapter
    participant LGraphCanvas
    participant MovingInputLink
    participant LinkConnector

    User->>useSlotLinkInteraction: Drag from input slot
    useSlotLinkInteraction->>linkConnectorAdapter: beginFromInput(nodeId, index, {layout, moveExisting})
    linkConnectorAdapter->>linkConnectorAdapter: Apply layout positioning
    linkConnectorAdapter->>MovingInputLink: Create/configure link

    loop During drag
        User->>LGraphCanvas: Mouse move
        LGraphCanvas->>MovingInputLink: drawConnectionCircle(ctx, mousePos)
        MovingInputLink->>MovingInputLink: Compute distance to target
        alt Distance within radius
            MovingInputLink->>MovingInputLink: Set disconnectOnDrop = true
        else Distance beyond radius
            MovingInputLink->>MovingInputLink: Set disconnectOnDrop = false
        end
        LGraphCanvas->>LGraphCanvas: Render visual feedback
    end

    User->>LinkConnector: Release mouse (drop)
    LinkConnector->>MovingInputLink: Check disconnectOnDrop flag
    alt disconnectOnDrop is true
        LinkConnector->>MovingInputLink: Remove from renderLinks
    end
Loading

Possibly related PRs

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

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:33:37 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 13, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 12/16/2025, 02:14:32 AM UTC

📈 Summary

  • Total Tests: 507
  • Passed: 497 ✅
  • Failed: 1 ❌
  • Flaky: 0
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 485 / ❌ 1 / ⚠️ 0 / ⏭️ 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 — 🔴 +1.39 kB
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +994 B
  • Brotli: 2.6 MB baseline 2.6 MB — 🟢 -15 B
  • Bundles: 98 current • 98 baseline • 53 added / 53 removed

Category Glance
App Entry Points 🔴 +1.39 kB (3.24 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.24 MB (baseline 3.24 MB) • 🔴 +1.39 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-B6x33u3p.js (new) 3.02 MB 🔴 +3.02 MB 🔴 +628 kB 🔴 +477 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-QqCiwKpa.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +39.8 kB
assets/index-CoaFbc_b.js (removed) 345 B 🟢 -345 B 🟢 -242 B 🟢 -229 B
assets/index-ISo-s6Et.js (new) 345 B 🔴 +345 B 🔴 +244 B 🔴 +202 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-C2iw6lN_.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-5NfepiAK.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB
assets/UserSelectView-Bl5LxSww.js (removed) 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-DpCMEfDQ.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.16 kB 🔴 +4.5 kB
assets/KeybindingPanel-COmn2XVK.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/KeybindingPanel-Dskaro-p.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/ExtensionPanel-CQMecw2Q.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-b87V9OLN.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-DLwuNhRD.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.84 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-DaNawqJb.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-DW6UXnNf.js (new) 53.7 kB 🔴 +53.7 kB 🔴 +8.49 kB 🔴 +7.29 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BFUuwWbZ.js (new) 48 kB 🔴 +48 kB 🔴 +10.3 kB 🔴 +8.98 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BHHuc566.js (removed) 48 kB 🟢 -48 kB 🟢 -10.3 kB 🟢 -8.97 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Cm11zZgp.js (new) 48 kB 🔴 +48 kB 🔴 +10.7 kB 🔴 +9.31 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-BpvAeKzF.js (new) 19.5 kB 🔴 +19.5 kB 🔴 +5.04 kB 🔴 +4.48 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/ComfyQueueButton-C-P83nGD.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.22 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-D9WIPoHg.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +890 B 🔴 +761 B
assets/WidgetButton-BHcJixJX.js (new) 2.04 kB 🔴 +2.04 kB 🔴 +931 B 🔴 +828 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-B05IwG6n.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +689 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-D3n--e38.js (new) 897 B 🔴 +897 B 🔴 +500 B 🔴 +435 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-DdWX1y1n.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.84 kB 🔴 +1.58 kB
assets/serverConfigStore-CL972F7g.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +909 B 🔴 +791 B
assets/serverConfigStore-DJOGMzM9.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -907 B 🟢 -788 B
assets/audioService-BGRQkYGM.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +963 B 🔴 +822 B
assets/audioService-FnHi5JSR.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -826 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-DKTyyxIf.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +650 B 🔴 +548 B
assets/audioUtils-DmXEp0J2.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -551 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-7kzjXMtr.js (new) 3.98 MB 🔴 +3.98 MB 🔴 +843 kB 🔴 +673 kB
assets/vendor-other-Bpr1teP3.js (removed) 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-xH3QHCDO.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-YzIWKPmg.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-CxKzFNZ6.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-vue-B16u0tpj.js (new) 160 kB 🔴 +160 kB 🔴 +37.3 kB 🔴 +31.5 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-C54AGu45.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-Bxebh-DP.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.01 kB
assets/AudioPreviewPlayer-wTAS2bdF.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3.02 kB
assets/NumberControlPopover-CBYKDX21.js (removed) 6.31 kB 🟢 -6.31 kB 🟢 -1.93 kB 🟢 -1.7 kB
assets/NumberControlPopover-DEXt1z7B.js (new) 6.31 kB 🔴 +6.31 kB 🔴 +1.93 kB 🔴 +1.71 kB
assets/WidgetGalleria-DrMDOMJ8.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetGalleria-ZNCofi6L.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetColorPicker-DIOcD4aS.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-DMD9YoAD.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-CF0acPhL.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.08 kB
assets/WidgetTextarea-CGQD-tNI.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.08 kB
assets/WidgetMarkdown-Cmv5DjKi.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-B2VdUSK3.js (new) 2.86 kB 🔴 +2.86 kB 🔴 +1.17 kB 🔴 +1.06 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-DBylchYJ.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.02 kB 🔴 +871 B
assets/WidgetChart-AD_gT626.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +934 B 🔴 +816 B
assets/WidgetChart-BCz3KGHg.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -933 B 🟢 -816 B
assets/WidgetImageCompare-hxKmDAJk.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -748 B 🟢 -664 B
assets/WidgetImageCompare-M6-5Rqqo.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +750 B 🔴 +661 B
assets/WidgetInputText--E_0Xx-h.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +919 B 🔴 +847 B
assets/WidgetInputText-ADBVtLgg.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -915 B 🟢 -852 B
assets/WidgetToggleSwitch-C_tqPp5F.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -832 B 🟢 -730 B
assets/WidgetToggleSwitch-CESzU2tS.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +837 B 🔴 +736 B
assets/MediaImageTop-CwqdJFy1.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -841 B 🟢 -717 B
assets/MediaImageTop-DOdHX-OF.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +842 B 🔴 +714 B
assets/MediaImageBottom-C-lF6Y2e.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -731 B 🟢 -638 B
assets/MediaImageBottom-Dw_FCyvm.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +733 B 🔴 +639 B
assets/MediaAudioBottom-CWqBXoVY.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +735 B 🔴 +652 B
assets/MediaAudioBottom-CXcTMOTO.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -733 B 🟢 -650 B
assets/Media3DBottom-DX9CCyYL.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -652 B
assets/Media3DBottom-IS53Y0K5.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +736 B 🔴 +652 B
assets/MediaVideoBottom-CIPkwZMn.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +651 B
assets/MediaVideoBottom-D2wKNUoW.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -649 B
assets/Media3DTop-CjNwErAn.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +765 B 🔴 +651 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-NV_CVl40.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +739 B 🔴 +617 B
assets/WidgetSelect-ClAlOv4F.js (removed) 655 B 🟢 -655 B 🟢 -344 B 🟢 -287 B
assets/WidgetSelect-wUKrC3af.js (new) 655 B 🔴 +655 B 🔴 +343 B 🔴 +286 B
assets/WidgetInputNumber-B4qUE9ug.js (new) 595 B 🔴 +595 B 🔴 +328 B 🔴 +274 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-dHyooPVC.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +226 B
assets/WidgetLegacy-BlzzMsc9.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +194 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

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: 5

📜 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 f0a0868.

📒 Files selected for processing (5)
  • src/lib/litegraph/src/LGraphCanvas.ts (2 hunks)
  • src/lib/litegraph/src/canvas/LinkConnector.ts (2 hunks)
  • src/lib/litegraph/src/canvas/MovingInputLink.ts (4 hunks)
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts (2 hunks)
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/lib/litegraph/src/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
**/*.{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/lib/litegraph/src/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/lib/litegraph/src/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.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/composables/useSlotLinkInteraction.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/composables/useSlotLinkInteraction.ts
🧠 Learnings (12)
📚 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/lib/litegraph/src/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.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} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/lib/litegraph/src/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
📚 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/**/*.ts : Use es-toolkit for utility functions

Applied to files:

  • src/lib/litegraph/src/canvas/LinkConnector.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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:

  • src/lib/litegraph/src/canvas/LinkConnector.ts
  • src/lib/litegraph/src/canvas/MovingInputLink.ts
  • src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts
  • src/renderer/core/canvas/links/linkConnectorAdapter.ts
  • src/lib/litegraph/src/LGraphCanvas.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/canvas/MovingInputLink.ts
  • src/lib/litegraph/src/LGraphCanvas.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} : When writing methods, prefer returning idiomatic JavaScript `undefined` over `null`

Applied to files:

  • src/lib/litegraph/src/canvas/MovingInputLink.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:

  • src/lib/litegraph/src/canvas/MovingInputLink.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} : Prefer single line `if` syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement

Applied to files:

  • src/lib/litegraph/src/canvas/MovingInputLink.ts
🧬 Code graph analysis (4)
src/lib/litegraph/src/canvas/LinkConnector.ts (2)
src/lib/litegraph/src/Reroute.ts (1)
  • remove (476-481)
src/lib/litegraph/src/canvas/MovingInputLink.ts (1)
  • MovingInputLink (20-153)
src/lib/litegraph/src/canvas/MovingInputLink.ts (2)
src/lib/litegraph/src/interfaces.ts (1)
  • Point (229-229)
src/lib/litegraph/src/litegraph.ts (1)
  • LiteGraph (17-17)
src/renderer/core/canvas/links/linkConnectorAdapter.ts (1)
src/renderer/core/layout/types.ts (2)
  • RerouteId (42-42)
  • SlotLayout (55-61)
src/lib/litegraph/src/LGraphCanvas.ts (2)
src/lib/litegraph/src/canvas/MovingInputLink.ts (1)
  • MovingInputLink (20-153)
src/lib/litegraph/src/litegraph.ts (1)
  • MovingInputLink (167-167)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: collect
🔇 Additional comments (6)
src/lib/litegraph/src/canvas/LinkConnector.ts (1)

1-1: The import and implementation are correct; no action needed.

The use of es-toolkit's remove() function is appropriate—it's an established dependency (^1.39.9) already used throughout the codebase. The type assertion (link as MovingLinkBase) is safe because MovingInputLink extends MovingLinkBase and implements the disconnect() method. The disconnectOnDrop flag is intentionally updated during dragging via drawConnectionCircle() and correctly reflects the cursor proximity at drop time—not a stale value, but live state.

src/renderer/extensions/vueNodes/composables/useSlotLinkInteraction.ts (1)

673-676: No changes needed. The layout object from layoutStore.getSlotLayout() is only read by beginFromInput() (accessing position.x and position.y); the adapter does not mutate it. Passing the store-owned reference directly is safe.

src/lib/litegraph/src/canvas/MovingInputLink.ts (2)

2-2: LGTM: Import added for runtime constant access.

The non-type import of LiteGraph is correctly used to access WIDGET_OUTLINE_COLOR in the new rendering method.


28-28: LGTM: Property correctly declared and initialized.

The disconnectOnDrop flag is appropriately initialized to true, enabling the disconnect-on-drop behavior by default.

Also applies to: 43-43

src/renderer/core/canvas/links/linkConnectorAdapter.ts (2)

1-1: LGTM: Type import correctly added.

Proper use of import type for the SlotLayout interface.


85-89: No issues to address. The code correctly uses the standard LiteGraph slot API.

The pos property is a documented, optional property of slot objects (declared in SlotBase.ts:35 and implemented in NodeSlot.ts:35) designed to store "the centre point of the slot." Setting input.pos before calling dragNewFromInput or moveInputLink is the intended usage pattern, not a side effect or maintainability concern. Other parts of the codebase (e.g., LGraphCanvas.ts:5672) explicitly expect input.pos to be set, and lifecycle cleanup (e.g., SubgraphNode.ts:217 deleting input.pos) is already handled appropriately. This follows the established LiteGraph API design.

Comment on lines 76 to 80
opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
layout: SlotLayout
}
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 | 🟠 Major

Type inconsistency: layout should be optional.

The type declares layout: SlotLayout (required when opts is present), but line 85 checks opts?.layout, treating it as optional. This mismatch weakens type safety.

Apply this diff to correct the type:

   opts?: {
     moveExisting?: boolean
     fromRerouteId?: RerouteId
-    layout: SlotLayout
+    layout?: SlotLayout
   }
📝 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
opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
layout: SlotLayout
}
opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
layout?: SlotLayout
}
🤖 Prompt for AI Agents
In src/renderer/core/canvas/links/linkConnectorAdapter.ts around lines 76 to 80,
the opts type currently declares layout as required (layout: SlotLayout) but the
code treats opts?.layout as optional; change the opts type so layout is optional
(layout?: SlotLayout) to match usage and restore type safety. Update the type
definition only (making layout optional) and run TypeScript checks to ensure no
other call-sites relied on layout being mandatory; if any call-sites assumed
layout exists, add safe guards (e.g., optional chaining or defaults) where
necessary.

@AustinMroz AustinMroz marked this pull request as draft December 14, 2025 01:00
Comment on lines 76 to 80
opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
layout: SlotLayout
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Required before Optional

Suggested change
opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
layout: SlotLayout
}
opts?: {
layout: SlotLayout
moveExisting?: boolean
fromRerouteId?: RerouteId
}

Moving the draw operation to the background means that the distance
check logic was no longer being tracked. since only a single bg draw was
made.

This is slightly less than ideal, but it's reasonable to expect that the
user will continually be dragging the mouse when moving links
@without-ordinary
Copy link

Stupid question, doesn't ctrl+alt+click doing this already?

@AustinMroz
Copy link
Collaborator Author

Yes. The functionality is similar and ctrl+alt+click is not being removed.

This functionality is

  • More discoverable and doesn't require remembering specific modifiers
  • Doesn't require a keyboard
  • 0 cost. Unless you're disconnecting a node and creating a new one directly on top, functionality is unchanged.

But I do value your opinon. Is there a problem I've missed?

@without-ordinary
Copy link

  • More discoverable and doesn't require remembering specific modifiers

Unless the user doesn't read patch nodes and is expecting the default setting of Action on link release (No modifier) to be followed.

If this is an opt-in behavior that will be added under the existing Link Release settings or will have a clear visual cue that a different action will be preformed based on which side of a invisible radius the drop occurs on, then I retract the above.

The me that knows short link release will disconnect wants this. The me that didn't know that was an intentional change would be filing a bug report for link release being inconsistently broken. :v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants