Skip to content

live selection#7465

Merged
jtydhr88 merged 2 commits intomainfrom
live-selection
Dec 16, 2025
Merged

live selection#7465
jtydhr88 merged 2 commits intomainfrom
live-selection

Conversation

@jtydhr88
Copy link
Collaborator

@jtydhr88 jtydhr88 commented Dec 14, 2025

Summary

Add real-time selection feedback during marquee drag, matching the behavior users expect from other applications.

Changes

  • Nodes and groups are now selected/deselected instantly as the selection rectangle moves
  • Supports all modifier keys (Shift to add, Alt to subtract) during drag
  • Added Comfy.Graph.LiveSelection setting (off by default)

Rationale

This interaction pattern is standard across virtually all design and productivity software:

  • Operating Systems: Windows Explorer, macOS Finder, and Linux file managers all show live selection feedback when dragging
  • Design Tools: Figma, Sketch, Adobe Illustrator, Photoshop, and Blender use real-time selection
  • IDEs: VS Code, JetBrains IDEs show live selection in file explorers
  • Node Editors: Unreal Engine Blueprints, Unity Shader Graph, and Houdini all support live selection

Screenshots

2025-12-01.22-09-04.mp4

┆Issue is synchronized with this Notion page by Unito

@jtydhr88 jtydhr88 requested a review from a team as a code owner December 14, 2025 02:25
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 14, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

📝 Walkthrough

Walkthrough

Adds a live selection mode to the LiteGraph canvas that updates selection in real time during drag. Exposes a public liveSelection flag, adds private helpers for drag-rectangle normalization and item collection, emits selection-change events, and wires the setting into the settings store and public schema.

Changes

Cohort / File(s) Summary
LGraphCanvas live selection
src/lib/litegraph/src/LGraphCanvas.ts
Adds public liveSelection boolean; replaces single drag-end selection with per-move live-selection hooks when enabled; adds private helpers #normalizeDragRect, #getItemsInRect, handleLiveSelect, finalizeLiveSelect; refactors multi-select logic to use normalized rects and new item collection; emits onSelectionChange and marks canvas dirty during live updates.
Settings integration
src/platform/settings/composables/useLitegraphSettings.ts
Adds a watcher that syncs Comfy.Graph.LiveSelection from the settings store to canvas.liveSelection.
Core settings constant
src/platform/settings/constants/coreSettings.ts
Adds new core setting entry Comfy.Graph.LiveSelection (boolean, default: false, versionAdded: 1.36.1) with category and tooltip.
Public schema
src/schemas/apiSchema.ts
Adds Comfy.Graph.LiveSelection boolean to the exported zSettings schema.

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 live-selection

📜 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 6f634a8 and 9554d66.

📒 Files selected for processing (4)
  • src/lib/litegraph/src/LGraphCanvas.ts (3 hunks)
  • src/platform/settings/composables/useLitegraphSettings.ts (1 hunks)
  • src/platform/settings/constants/coreSettings.ts (1 hunks)
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/lib/litegraph/src/LGraphCanvas.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/platform/settings/composables/useLitegraphSettings.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/lib/litegraph/src/LGraphCanvas.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/platform/settings/composables/useLitegraphSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/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/LGraphCanvas.ts
🧠 Learnings (10)
📚 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 watch and watchEffect for side effects

Applied to files:

  • src/platform/settings/composables/useLitegraphSettings.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 : Use `watch` and `watchEffect` for side effects in Vue components

Applied to files:

  • src/platform/settings/composables/useLitegraphSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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} : 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/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} : 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/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/LGraphCanvas.ts
📚 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/**/stores/**/*.{ts,tsx} : Maintain clear public interfaces and restrict extension access in stores

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.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 **/*.{ts,tsx,vue} : Favor pure functions, especially testable ones

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.ts
🧬 Code graph analysis (1)
src/lib/litegraph/src/LGraphCanvas.ts (4)
src/lib/litegraph/src/interfaces.ts (2)
  • Rect (235-237)
  • Positionable (77-119)
src/lib/litegraph/src/infrastructure/NullGraphError.ts (1)
  • NullGraphError (1-9)
src/lib/litegraph/src/measure.ts (3)
  • overlapBounding (118-127)
  • containsRect (156-172)
  • isPointInRect (58-68)
src/lib/litegraph/src/types/events.ts (1)
  • CanvasPointerEvent (45-45)
⏰ 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: lint-and-format
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: collect
🔇 Additional comments (6)
src/platform/settings/constants/coreSettings.ts (1)

709-718: LGTM! Well-structured setting definition.

The Live Selection setting is correctly defined with all necessary fields. The tooltip clearly explains the feature behavior, the default value of false is appropriately conservative for a new feature, and the version matches previous review feedback.

src/schemas/apiSchema.ts (1)

403-403: LGTM! Schema addition is correct.

The schema entry correctly exposes the new Comfy.Graph.LiveSelection setting as a boolean type in the public API, maintaining alphabetical ordering and consistency with the setting definition.

src/platform/settings/composables/useLitegraphSettings.ts (1)

96-100: LGTM! Consistent watcher implementation.

The watcher correctly propagates the Comfy.Graph.LiveSelection setting value to canvas.liveSelection. The implementation follows the established pattern in this file (consistent with the dragZoomEnabled and maximumFps watchers), which promotes maintainability and readability.

src/lib/litegraph/src/LGraphCanvas.ts (3)

710-711: liveSelection flag wiring looks consistent with existing canvas state.

The new liveSelection boolean integrates cleanly with the drag-setup logic and defaults to false, so behavior is unchanged unless explicitly enabled.


2614-2647: Live vs classic marquee selection split in #setupNodeSelectionDrag looks correct.

Branching on liveSelection to choose between per‑move updates and classic end‑of‑drag selection is straightforward, and the pointer.onClick path for simple clicks is preserved.


4106-4119: #normalizeDragRect implementation and docs are now accurate.

The normalization logic (making width/height positive and adjusting x/y) is correct, and the JSDoc clearly states that the rect is modified in place, matching how callers use it.


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 14, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/15/2025, 07:47:50 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 14, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/15/2025, 08:21:34 PM UTC

📈 Summary

  • Total Tests: 506
  • Passed: 495 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 483 / ❌ 0 / ⚠️ 2 / ⏭️ 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 14, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🔴 +3.03 kB
  • Gzip: 3.39 MB baseline 3.39 MB — 🔴 +578 B
  • Brotli: 2.6 MB baseline 2.6 MB — 🔴 +415 B
  • Bundles: 98 current • 98 baseline • 40 added / 40 removed

Category Glance
App Entry Points 🔴 +2.49 kB (3.25 MB) · Graph Workspace 🔴 +535 B (989 kB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.82 MB) · 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.25 MB) • 🔴 +2.49 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-DTS_O69p.js (new) 3.02 MB 🔴 +3.02 MB 🔴 +628 kB 🔴 +478 kB
assets/index-CT6PTZpG.js (removed) 3.02 MB 🟢 -3.02 MB 🟢 -628 kB 🟢 -477 kB
assets/index-CU2di_Bz.js (removed) 227 kB 🟢 -227 kB 🟢 -48.6 kB 🟢 -39.9 kB
assets/index-DFqeV-KY.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +39.9 kB
assets/index-Buk5khwO.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +203 B
assets/index-DukZsu8P.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -199 B

Status: 3 added / 3 removed

Graph Workspace — 989 kB (baseline 989 kB) • 🔴 +535 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-Bwz5syx4.js (new) 989 kB 🔴 +989 kB 🔴 +191 kB 🔴 +146 kB
assets/GraphView-DUSApqvt.js (removed) 989 kB 🟢 -989 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-DfPqmdZh.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.89 kB
assets/UserSelectView-DqOgVGtx.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 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-D8_abi4b.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/LegacyCreditsPanel-DewdK9CB.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/KeybindingPanel-BPaAvAsy.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/KeybindingPanel-DFKpCUne.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/ExtensionPanel-DEBu5564.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.25 kB
assets/ExtensionPanel-eDePFRlM.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.26 kB
assets/AboutPanel-BN0CJsTe.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-BoyJeISM.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-Cas4jwy3.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-S3XsvFLa.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/UserPanel-CBx8CG6r.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/UserPanel-CWObGDAB.js (removed) 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-DO7OWOH8.js (new) 53.7 kB 🔴 +53.7 kB 🔴 +8.49 kB 🔴 +7.29 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-F6TEnlYD.js (removed) 53.7 kB 🟢 -53.7 kB 🟢 -8.49 kB 🟢 -7.29 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-22GEsoTx.js (removed) 48 kB 🟢 -48 kB 🟢 -10.3 kB 🟢 -8.97 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CpznN0xl.js (new) 48 kB 🔴 +48 kB 🔴 +10.3 kB 🔴 +8.97 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-CcFWlLYb.js (removed) 48 kB 🟢 -48 kB 🟢 -10.7 kB 🟢 -9.32 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-CDQA8xer.js (new) 48 kB 🔴 +48 kB 🔴 +10.6 kB 🔴 +9.32 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-C_rr8AFo.js (new) 19.5 kB 🔴 +19.5 kB 🔴 +5.04 kB 🔴 +4.46 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DOoU18PD.js (removed) 19.5 kB 🟢 -19.5 kB 🟢 -5.04 kB 🟢 -4.47 kB
assets/ComfyQueueButton-BbYH8W4y.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.22 kB
assets/ComfyQueueButton-CyWEA0aQ.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-C4U5BH4f.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +889 B 🔴 +764 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-hrTFumup.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -888 B 🟢 -765 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CCueHA6P.js (new) 897 B 🔴 +897 B 🔴 +501 B 🔴 +445 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-N6LXuyO_.js (removed) 897 B 🟢 -897 B 🟢 -501 B 🟢 -439 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-w3tJv_nT.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-DOJNBkZW.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 7 added / 7 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-CTE2fjgT.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.84 kB 🔴 +1.58 kB
assets/keybindingService-DdS-0gI2.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.84 kB 🟢 -1.58 kB
assets/audioService-BxD3egoN.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -825 B
assets/audioService-CSvrdWuN.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +958 B 🔴 +827 B
assets/serverConfigStore-DJOGMzM9.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 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-Blm0S2ga.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -650 B 🟢 -543 B
assets/audioUtils-BzzvseM3.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +544 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-chart-AbygYk1r.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-Bpr1teP3.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-Bo6kY08Z.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-B5bBARf1.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-LuJ8go0g.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.82 MB (baseline 3.82 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-CGIOcIJ-.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.62 kB
assets/WidgetRecordAudio-DTPMTvA1.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.62 kB
assets/AudioPreviewPlayer-DJ46gCx_.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3.01 kB
assets/AudioPreviewPlayer-EYZZgrP5.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.01 kB
assets/NumberControlPopover-CuVDZUf0.js (new) 7.54 kB 🔴 +7.54 kB 🔴 +2.17 kB 🔴 +1.92 kB
assets/NumberControlPopover-DGwcOV7J.js (removed) 7.54 kB 🟢 -7.54 kB 🟢 -2.17 kB 🟢 -1.92 kB
assets/WidgetGalleria-BIg9op0l.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetGalleria-DFaqdDKQ.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.31 kB
assets/WidgetColorPicker-DQ2uCXl3.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-koRCX20l.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.24 kB
assets/WidgetTextarea-CfM3GTzf.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetTextarea-CwScVyEI.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.07 kB
assets/WidgetMarkdown-CSjPr0Wp.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetMarkdown-D2LYBOOk.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-Bd3y_DbW.js (new) 2.86 kB 🔴 +2.86 kB 🔴 +1.16 kB 🔴 +1.05 kB
assets/WidgetAudioUI-Dp0DA7jw.js (removed) 2.86 kB 🟢 -2.86 kB 🟢 -1.16 kB 🟢 -1.06 kB
assets/WidgetInputText-_e_0bgsU.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +918 B 🔴 +851 B
assets/WidgetInputText-CUAND2GG.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -916 B 🟢 -848 B
assets/WidgetToggleSwitch-Bptn035q.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +833 B 🔴 +729 B
assets/WidgetToggleSwitch-CnaSXcXP.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -831 B 🟢 -730 B
assets/MediaImageBottom-C7BnXchu.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -732 B 🟢 -641 B
assets/MediaImageBottom-CfRRLtUj.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +732 B 🔴 +639 B
assets/MediaAudioBottom-bt3j6Rjn.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +732 B 🔴 +650 B
assets/MediaAudioBottom-BUDOpv8-.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -734 B 🟢 -650 B
assets/Media3DBottom-Cq3_RqqW.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +648 B
assets/Media3DBottom-umMjWg_K.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -732 B 🟢 -648 B
assets/MediaVideoBottom-BVYlpctJ.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -731 B 🟢 -650 B
assets/MediaVideoBottom-fxDIB340.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +648 B
assets/Media3DTop-ArxaXFbY.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -765 B 🟢 -652 B
assets/Media3DTop-D19AWNtv.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +763 B 🔴 +651 B
assets/WidgetSelect-CSa9HyZW.js (removed) 655 B 🟢 -655 B 🟢 -342 B 🟢 -289 B
assets/WidgetSelect-CtW5i6Kd.js (new) 655 B 🔴 +655 B 🔴 +341 B 🔴 +288 B
assets/WidgetInputNumber-_2C-M7rh.js (new) 595 B 🔴 +595 B 🔴 +328 B 🔴 +272 B
assets/WidgetInputNumber-BxVaUaq2.js (removed) 595 B 🟢 -595 B 🟢 -329 B 🟢 -276 B
assets/Load3D-DYX8oeXy.js (new) 424 B 🔴 +424 B 🔴 +268 B 🔴 +222 B
assets/Load3D-JR6iZuHm.js (removed) 424 B 🟢 -424 B 🟢 -267 B 🟢 -222 B
assets/WidgetLegacy-4_xm4CW9.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +196 B
assets/WidgetLegacy-VNY85HOh.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -225 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-BMi-Aksj.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CqR8skJT.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DcRHAFEy.js 81.7 kB 81.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DdFdLxku.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DJAtuVu5.js 84.3 kB 84.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DK8I9Rk3.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-gP_ssnMb.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-nxXY9vGp.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Ycd3gqkA.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-CYgnPvxj.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-CwqdJFy1.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-D9Cly-Iv.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-_qLI3Y-X.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BoBMp_wf.js 307 kB 307 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Ce9u3PlO.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CgjGEDDp.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CL3A8ieS.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DNUc-sw4.js 303 kB 303 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DxUbhTnC.js 282 kB 282 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-i8mv_3Jj.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-wCFicyab.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-BCz3KGHg.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-hxKmDAJk.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 19 added / 19 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

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/LGraphCanvas.ts (1)

2614-2648: Update dragRect dimensions in pointer.onDrag callback before #handleLiveSelect uses them.

The rectangle's width and height (indices 2 and 3) are updated in processMouseMove (lines 3219-3220) AFTER pointer.move(e) (line 3186) invokes the onDrag callback. This causes #handleLiveSelect to read stale rectangle dimensions on the first frame of movement and every subsequent frame until the next processMouseMove executes.

Pass the updated dimensions directly to #handleLiveSelect:

pointer.onDrag = (eMove) => {
  const w = eMove.canvasX - dragRect[0]
  const h = eMove.canvasY - dragRect[1]
  this.#handleLiveSelect(eMove, dragRect, initialSelection, w, h)
}

Then update #handleLiveSelect to accept and use w and h instead of relying on stale dragRect[2/3] values.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb04dc2 and df25f35.

📒 Files selected for processing (4)
  • src/lib/litegraph/src/LGraphCanvas.ts (3 hunks)
  • src/platform/settings/composables/useLitegraphSettings.ts (1 hunks)
  • src/platform/settings/constants/coreSettings.ts (1 hunks)
  • src/schemas/apiSchema.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/platform/settings/composables/useLitegraphSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/lib/litegraph/src/LGraphCanvas.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/platform/settings/composables/useLitegraphSettings.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/lib/litegraph/src/LGraphCanvas.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/platform/settings/composables/useLitegraphSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/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/LGraphCanvas.ts
🧠 Learnings (3)
📚 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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/platform/settings/composables/useLitegraphSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/lib/litegraph/src/LGraphCanvas.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). (4)
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: collect
  • GitHub Check: lint-and-format
🔇 Additional comments (3)
src/schemas/apiSchema.ts (1)

403-403: LGTM! Schema extension is correct.

The addition of 'Comfy.Graph.LiveSelection': z.boolean() to the settings schema is properly integrated, follows the existing pattern for boolean settings, and is appropriately placed among other Graph-related settings.

src/platform/settings/constants/coreSettings.ts (1)

709-718: LGTM! Setting definition is complete and well-documented.

The new Comfy.Graph.LiveSelection setting is properly configured with:

  • Appropriate category placement under LiteGraph/Canvas
  • Clear name and descriptive tooltip
  • Safe default value (false) for opt-in adoption
  • Proper version tracking (1.35.0)

The definition follows the established pattern for boolean canvas settings and integrates consistently with the rest of the codebase.

src/platform/settings/composables/useLitegraphSettings.ts (1)

96-100: LGTM! Watcher implementation follows existing patterns.

The watchEffect correctly propagates the Comfy.Graph.LiveSelection setting to canvas.liveSelection. The liveSelection property is properly defined on LGraphCanvas at line 711 with explicit boolean type, ensuring type safety.

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

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/LGraphCanvas.ts (1)

2614-2648: Live selection wiring is solid, but onDragEnd should receive the final event (and can cover “no-move” drags).
Right now pointer.onDragEnd = () => this.finalizeLiveSelect() can’t recompute selection if no onDrag fires; also it can’t ensure the rect reflects final pointer-up coords. Consider capturing the event and running one last handleLiveSelect before finalize.

-      pointer.onDragEnd = () => this.finalizeLiveSelect()
+      pointer.onDragEnd = (eUp) => {
+        this.handleLiveSelect(eUp, dragRect, initialSelection)
+        this.finalizeLiveSelect()
+      }
♻️ Duplicate comments (5)
src/lib/litegraph/src/LGraphCanvas.ts (5)

710-712: liveSelection is public mutable state—still too easy to toggle mid-drag.
This was already flagged; please hide writes behind an accessor (and/or document intended owner). Also, adding more #private members conflicts with the “TS private vs #private” pain noted by DrJKL.


4106-4120: JSDoc on #normalizeDragRect is technically true but misleading in how it’s used (callers typically pass a copy).


4121-4157: #getItemsInRect is still a hot-path full scan + calls group.recomputeInsideNodes() while scanning.
With live selection, this runs every pointer move: graph._nodes, graph.groups, graph.reroutes full iteration, and recomputeInsideNodes() in-loop is expensive. Also, containsRect() returns false for identical rects, so a marquee that exactly matches a group’s bounds won’t select it.

Suggested direction:

  • Use this.visible_nodes / visible reroutes where safe (selection rect is confined to the viewport anyway).
  • Move group.recomputeInsideNodes() to the moment a group becomes selected (diff-based), not during hit-testing.
  • Replace containsRect() with an inclusive containment check for groups.
-    for (const group of graph.groups) {
-      if (containsRect(rect, group._bounding)) {
-        group.recomputeInsideNodes()
-        items.add(group)
-      }
-    }
+    for (const group of graph.groups) {
+      const g = group._bounding
+      const rectRight = rect[0] + rect[2]
+      const rectBottom = rect[1] + rect[3]
+      const gRight = g[0] + g[2]
+      const gBottom = g[1] + g[3]
+      if (rect[0] <= g[0] && rect[1] <= g[1] && rectRight >= gRight && rectBottom >= gBottom)
+        items.add(group)
+    }

4224-4256: Classic replace-mode still mutates selectedItems while iterating it.
This is brittle (and was previously flagged). Snapshot first. Also consider dirtying bg here too for the same “groups/links/reroutes” reason as live mode.

     } else {
       // Replace selection
-      for (const item of selectedItems.values()) {
+      for (const item of [...selectedItems]) {
         if (!itemsInRect.has(item)) this.deselect(item)
       }
       for (const item of itemsInRect) this.select(item)
     }

     this.onSelectionChange?.(this.selected_nodes)
+    this.setDirty(true, true)

4215-4223: finalizeLiveSelect() re-fires onSelectionChange unconditionally (extra churn).
If the last move already emitted (or nothing changed), this is redundant; if you keep it, gate it (or just ensure a final redraw).

   private finalizeLiveSelect(): void {
-    // Selection is already updated by handleLiveSelect
-    // Just trigger the final selection change callback
-    this.onSelectionChange?.(this.selected_nodes)
+    // Selection is already updated by handleLiveSelect; no-op (or only force a final redraw if needed)
+    // this.setDirty(true, true)
   }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df25f35 and 6f634a8.

📒 Files selected for processing (2)
  • src/lib/litegraph/src/LGraphCanvas.ts (3 hunks)
  • src/platform/settings/constants/coreSettings.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/lib/litegraph/src/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.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/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/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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.ts
🧠 Learnings (8)
📚 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/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} : 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/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/LGraphCanvas.ts
📚 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/**/stores/**/*.{ts,tsx} : Maintain clear public interfaces and restrict extension access in stores

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.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 **/*.{ts,tsx,vue} : Favor pure functions, especially testable ones

Applied to files:

  • src/lib/litegraph/src/LGraphCanvas.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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.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/LGraphCanvas.ts
  • src/platform/settings/constants/coreSettings.ts
🧬 Code graph analysis (1)
src/lib/litegraph/src/LGraphCanvas.ts (2)
src/lib/litegraph/src/interfaces.ts (2)
  • Rect (235-237)
  • Positionable (77-119)
src/lib/litegraph/src/measure.ts (3)
  • overlapBounding (118-127)
  • containsRect (156-172)
  • isPointInRect (58-68)
⏰ 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: lint-and-format
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (1)
src/platform/settings/constants/coreSettings.ts (1)

709-718: LGTM! Well-structured setting entry.

The new Comfy.Graph.LiveSelection setting follows all conventions in the file:

  • Proper placement in the LiteGraph/Canvas section
  • Clear, descriptive tooltip explaining the real-time selection behavior
  • Appropriate default value (false) for an opt-in feature that changes existing interaction patterns
  • Correct version number matching previous review feedback

Copy link
Member

@benceruleanlu benceruleanlu left a comment

Choose a reason for hiding this comment

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

Some tests would be beneficial

also, there is technically an edge case where previously, shift and alt both being held would prio shift, but in liveSelection it falls through to the else case and treats it as "replace selection" instead

@jtydhr88 jtydhr88 merged commit dec9299 into main Dec 16, 2025
27 checks passed
@jtydhr88 jtydhr88 deleted the live-selection branch December 16, 2025 00:22
Enferlain pushed a commit to Enferlain/ComfyUI_frontend that referenced this pull request Dec 18, 2025
## Summary

Add real-time selection feedback during marquee drag, matching the
behavior users expect from other applications.

## Changes

- Nodes and groups are now selected/deselected instantly as the
selection rectangle moves
- Supports all modifier keys (Shift to add, Alt to subtract) during drag
- Added Comfy.Graph.LiveSelection setting (off by default)

## Rationale

This interaction pattern is standard across virtually all design and
productivity software:
- Operating Systems: Windows Explorer, macOS Finder, and Linux file
managers all show live selection feedback when dragging
- Design Tools: Figma, Sketch, Adobe Illustrator, Photoshop, and Blender
use real-time selection
- IDEs: VS Code, JetBrains IDEs show live selection in file explorers
- Node Editors: Unreal Engine Blueprints, Unity Shader Graph, and
Houdini all support live selection

## Screenshots

https://github.com/user-attachments/assets/8b0c2217-47f9-4422-9cab-cb39e145310c

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7465-live-selection-2c96d73d36508133a4a6f917955d55b3)
by [Unito](https://www.unito.io)
Yourz pushed a commit that referenced this pull request Dec 24, 2025
## Summary

Add real-time selection feedback during marquee drag, matching the
behavior users expect from other applications.

## Changes

- Nodes and groups are now selected/deselected instantly as the
selection rectangle moves
- Supports all modifier keys (Shift to add, Alt to subtract) during drag
- Added Comfy.Graph.LiveSelection setting (off by default)

## Rationale

This interaction pattern is standard across virtually all design and
productivity software:
- Operating Systems: Windows Explorer, macOS Finder, and Linux file
managers all show live selection feedback when dragging
- Design Tools: Figma, Sketch, Adobe Illustrator, Photoshop, and Blender
use real-time selection
- IDEs: VS Code, JetBrains IDEs show live selection in file explorers
- Node Editors: Unreal Engine Blueprints, Unity Shader Graph, and
Houdini all support live selection

## Screenshots

https://github.com/user-attachments/assets/8b0c2217-47f9-4422-9cab-cb39e145310c

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7465-live-selection-2c96d73d36508133a4a6f917955d55b3)
by [Unito](https://www.unito.io)
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.

3 participants