Skip to content

Conversation

@simula-r
Copy link
Contributor

@simula-r simula-r commented Dec 3, 2025

Summary

Fixes drift when switching between modes introduced after #6966

Changes

  • What: ensureCorrectLayoutScale

Screenshots (if applicable)

chrome_TKEzo6twFR.mp4

https://www.notion.so/Bug-Spamming-Nodes-2-0-button-causes-nodes-to-grow-longer-2bd6d73d3650818492a4e0cc53da7017

┆Issue is synchronized with this Notion page by Unito

@simula-r simula-r requested a review from a team as a code owner December 3, 2025 00:33
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 3, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

Refactored layout scaling calculations in the Vue node layout module to simplify Y-coordinate positioning. Consolidated height adjustment logic and unified relativeY derivation by removing intermediate title-height adjustments, deriving all Y positions directly as oldY - originY, and applying the simplified scaledY consistently across node, group, and reroute updates.

Changes

Cohort / File(s) Change Summary
Layout scale calculation simplification
src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
Reworked layout scaling math: removed intermediate title-height adjustment in Y position calculations; changed scaledHeight formula to conditionally add or subtract LiteGraph.NODE_TITLE_HEIGHT based on needsUpscale; replaced finalY with direct scaledY assignments for node bounds, layout store updates, and reroute/IO group handling; relocated LiteGraph import.

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 fix/layoutScale

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

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/03/2025, 12:43:42 AM UTC

📈 Summary

  • Total Tests: 497
  • Passed: 486 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 477 / ❌ 0 / ⚠️ 2 / ⏭️ 9
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 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 3, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/03/2025, 12:35:21 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Bundle Size Report

Summary

  • Raw size: 17 MB baseline 17 MB — 🟢 -264 B
  • Gzip: 3.37 MB baseline 3.37 MB — 🟢 -96 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🟢 -173 B
  • Bundles: 97 current • 97 baseline • 37 added / 37 removed

Category Glance
App Entry Points 🟢 -264 B (3.19 MB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.84 MB) · Graph Workspace ⚪ 0 B (929 kB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (169 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.19 MB (baseline 3.19 MB) • 🟢 -264 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-BFnjTKJb.js (removed) 2.97 MB 🟢 -2.97 MB 🟢 -619 kB 🟢 -470 kB
assets/index-D4-Qy-C-.js (new) 2.97 MB 🔴 +2.97 MB 🔴 +619 kB 🔴 +470 kB
assets/index-aMb0yIB4.js (removed) 223 kB 🟢 -223 kB 🟢 -47.5 kB 🟢 -39.2 kB
assets/index-D283qV8J.js (new) 223 kB 🔴 +223 kB 🔴 +47.5 kB 🔴 +39.2 kB
assets/index-DUqXVt-g.js (removed) 345 B 🟢 -345 B 🟢 -244 B 🟢 -235 B
assets/index-sOdfhp8y.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +226 B

Status: 3 added / 3 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView--Zh2XElR.js (removed) 929 kB 🟢 -929 kB 🟢 -180 kB 🟢 -138 kB
assets/GraphView-BBfUXJEZ.js (new) 929 kB 🔴 +929 kB 🔴 +180 kB 🔴 +138 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-B3EkxOtT.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-BTaqhrJp.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/CreditsPanel-DqWJR8GG.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/CreditsPanel-HhVnH9-8.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/KeybindingPanel-D9MIWy6C.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.02 kB
assets/KeybindingPanel-DqxxZzE4.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.03 kB
assets/ExtensionPanel-D5pZ6mwd.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.58 kB 🟢 -2.26 kB
assets/ExtensionPanel-D8oa3i6Y.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.26 kB
assets/AboutPanel-JgDrH4yc.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-zEGj7LVC.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-cZ1eIe6x.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-DJJ2NaKv.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/UserPanel-Bjoqytno.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/UserPanel-xnXyq5DS.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-DA10lhMr.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.31 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-DAUdrn2s.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.31 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BP-yrHmS.js (removed) 47.6 kB 🟢 -47.6 kB 🟢 -10.3 kB 🟢 -8.9 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CmkmoXLE.js (new) 47.6 kB 🔴 +47.6 kB 🔴 +10.3 kB 🔴 +8.9 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-_MH9Vq7-.js (new) 39.4 kB 🔴 +39.4 kB 🔴 +9.08 kB 🔴 +7.96 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DWG5BZM4.js (removed) 39.4 kB 🟢 -39.4 kB 🟢 -9.08 kB 🟢 -7.97 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-b6abXkc8.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.96 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BSHmbr_q.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.97 kB
assets/ComfyQueueButton-C8BtvSYb.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/ComfyQueueButton-CAISyEwl.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DAFi5j6c.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -436 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DxpDEwza.js (new) 897 B 🔴 +897 B 🔴 +502 B 🔴 +438 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-B4R5m1qI.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-C9RSl9Jc.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-C-GzTNBl.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 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-D4VXPSpZ.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-DUxVxUaK.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/audioService-CxxWvLDX.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +959 B 🔴 +819 B
assets/audioService-DLRHc5uy.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -959 B 🟢 -823 B
assets/serverConfigStore-W1zhjkBH.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BX8_tg5F.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +547 B
assets/audioUtils-o0VhI2X3.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -652 B 🟢 -543 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 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-BCOr5Gfm.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-DsoOPVgr.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-CjsaCDb8.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-CzjUILzD.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-BEWVLQIi.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.84 MB (baseline 3.84 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-CEjJFYf1.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/WidgetRecordAudio-DUCyYUZT.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-BakUKG82.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.04 kB
assets/AudioPreviewPlayer-CmhmncI4.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.04 kB
assets/WidgetGalleria-1wlssJ9w.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetGalleria-C758itTT.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetColorPicker-DBKbTWfI.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-DsN9zUlP.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-Aebyl2Dd.js (removed) 3.1 kB 🟢 -3.1 kB 🟢 -1.29 kB 🟢 -1.13 kB
assets/WidgetMarkdown-hKXHUK46.js (new) 3.1 kB 🔴 +3.1 kB 🔴 +1.29 kB 🔴 +1.13 kB
assets/WidgetAudioUI-BAn31gVL.js (removed) 2.82 kB 🟢 -2.82 kB 🟢 -1.12 kB 🟢 -1.02 kB
assets/WidgetAudioUI-C9OSqpe-.js (new) 2.82 kB 🔴 +2.82 kB 🔴 +1.12 kB 🔴 +1.01 kB
assets/WidgetTextarea-BnChLQ-M.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -1.01 kB 🟢 -886 B
assets/WidgetTextarea-GrCWre0U.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +1.01 kB 🔴 +901 B
assets/WidgetInputText-9FPc0XzT.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +917 B 🔴 +847 B
assets/WidgetInputText-bZtYbhk2.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -918 B 🟢 -850 B
assets/MediaImageBottom-Ct4Zw7gb.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -740 B 🟢 -645 B
assets/MediaImageBottom-D22A4vjx.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +742 B 🔴 +645 B
assets/MediaAudioBottom-C9na8MHK.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +742 B 🔴 +655 B
assets/MediaAudioBottom-DTobOPpx.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -743 B 🟢 -655 B
assets/MediaVideoBottom-CNTNrT4F.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +741 B 🔴 +653 B
assets/MediaVideoBottom-y52FPjst.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -742 B 🟢 -658 B
assets/Media3DBottom-_7QbG9nc.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -734 B 🟢 -648 B
assets/Media3DBottom-CjWj96Ve.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +650 B
assets/Media3DTop-Bto2xJwt.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +654 B
assets/Media3DTop-C4qiFG7l.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -768 B 🟢 -655 B
assets/WidgetSelect-Bpv12SmG.js (new) 655 B 🔴 +655 B 🔴 +343 B 🔴 +308 B
assets/WidgetSelect-BWDEo0qt.js (removed) 655 B 🟢 -655 B 🟢 -343 B 🟢 -285 B
assets/WidgetInputNumber-DCS2MPWi.js (new) 595 B 🔴 +595 B 🔴 +328 B 🔴 +274 B
assets/WidgetInputNumber-hgjjPIwK.js (removed) 595 B 🟢 -595 B 🟢 -329 B 🟢 -276 B
assets/Load3D-DkBwuTlR.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -226 B
assets/Load3D-gjfkxOw_.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +223 B
assets/WidgetLegacy-BDQ0sTV6.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -198 B
assets/WidgetLegacy-D4UR-7IN.js (new) 364 B 🔴 +364 B 🔴 +237 B 🔴 +197 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-5lOBdqcC.js 84.5 kB 84.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BOCuaVpE.js 73.4 kB 73.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ClrEFGUz.js 72.4 kB 72.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CyNU0iQX.js 99.3 kB 99.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D7gwLxft.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DC8o4BCt.js 86.8 kB 86.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DKiesCV4.js 94.3 kB 94.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Hq2q-OtB.js 83.6 kB 83.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-USAlAlnj.js 82 kB 82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-B_r9Y3e-.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-Df0PRhSp.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-_g8aBAAL.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-_Px5dSNW.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-7z21KPoS.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BWKZzBPK.js 346 kB 346 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CGbgH4Yl.js 320 kB 320 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CjjjdWkV.js 313 kB 313 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CVrNtxvj.js 288 kB 288 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DLRSA0IK.js 309 kB 309 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DQV2gnwA.js 372 kB 372 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-ofqLG5vz.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-f0b59iz3.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-65U3rWW6.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
assets/WidgetToggleSwitch-C53mIaDW.js 1.58 kB 1.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

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

🧹 Nitpick comments (1)
src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts (1)

60-90: Verify NODE_TITLE_HEIGHT-based height math covers all node shapes

The updated scaling logic for nodes:

  • Uses relativeY = oldY - originY and scaledY for position, which is affine and symmetric with scaleFactor / 1 / scaleFactor, so Y positions should no longer drift when toggling between up/down scale.
  • Adjusts height as:
const scaledHeight = needsUpscale
  ? lgNode.size[1] * scaleFactor + LiteGraph.NODE_TITLE_HEIGHT
  : (lgNode.size[1] - LiteGraph.NODE_TITLE_HEIGHT) * scaleFactor

This is mathematically reversible (upscale then downscale, or vice versa) if Vue-mode heights satisfy H_vue = H_lg * SCALE_FACTOR + NODE_TITLE_HEIGHT, which matches the intent to fix cumulative drift.

One edge case: if any lgNode.size[1] can be ≤ LiteGraph.NODE_TITLE_HEIGHT in real graphs (e.g. custom plugin nodes with very small heights), the downscale branch would produce zero or negative heights. If that's possible, consider guarding via a non-negative content height:

const baseHeight =
  lgNode.size[1] - LiteGraph.NODE_TITLE_HEIGHT
const scaledHeight = needsUpscale
  ? lgNode.size[1] * scaleFactor + LiteGraph.NODE_TITLE_HEIGHT
  : Math.max(baseHeight, 0) * scaleFactor

If all node implementations guarantee size[1] > NODE_TITLE_HEIGHT, then the current code is fine as-is.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b7b100 and 5a5ef7c.

📒 Files selected for processing (1)
  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.{vue,ts,tsx} : Leverage VueUse functions for performance-enhancing utilities

Applied to files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
📚 Learning: 2025-11-24T19:47:14.779Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:14.779Z
Learning: Applies to **/*.{ts,tsx,vue} : Use `const settingStore = useSettingStore()` and `settingStore.get('Comfy.SomeSetting')` to retrieve settings in TypeScript/Vue files

Applied to files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/**/*.{vue,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the `pnpm lint:fix` command

Applied to files:

  • src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.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/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts
🧬 Code graph analysis (1)
src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts (1)
src/lib/litegraph/src/litegraph.ts (1)
  • LiteGraph (17-17)
⏰ 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: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (2)
src/renderer/extensions/vueNodes/layout/ensureCorrectLayoutScale.ts (2)

11-11: LiteGraph import for NODE_TITLE_HEIGHT is appropriate

Importing LiteGraph here to access LiteGraph.NODE_TITLE_HEIGHT keeps the height math tied to the canonical LiteGraph constant and avoids magic numbers; looks good.


147-158: Consistent group Y scaling with node/reroute logic

Using relativeY = oldY - originY for groups and assigning group.pos = [scaledX, scaledY] aligns group movement with nodes and reroutes around the same origin, which should help avoid visual drift of groups relative to their contents when switching renderers.

@DrJKL DrJKL merged commit 5c330fd into main Dec 3, 2025
32 checks passed
@DrJKL DrJKL deleted the fix/layoutScale branch December 3, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants