Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Dec 14, 2025

Fixes #7453.

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested a review from a team as a code owner December 14, 2025 08:08
@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

The PR refactors the getSubgraphOptions function signature to accept an object parameter with hasSubgraphs and hasMultipleSelection flags instead of a single boolean. It introduces conditional logic that displays the "Convert to Subgraph" option when no subgraphs are present or when multiple selections exist, fixing a bug where the option was unavailable during mixed selections.

Changes

Cohort / File(s) Summary
Subgraph menu options logic
src/composables/graph/useSelectionMenuOptions.ts, src/composables/graph/useMoreOptionsMenu.ts
getSubgraphOptions method signature updated to accept a destructured object parameter containing hasSubgraphs and hasMultipleSelection. Conditional logic added to show "Convert to Subgraph" option when !hasSubgraphs || hasMultipleSelection. Call site in useMoreOptionsMenu.ts updated to pass object argument derived from hasSubgraphs and hasMultipleNodes.value.
Test coverage
src/composables/graph/useSelectionMenuOptions.test.ts
New test file for useSelectionMenuOptions with three test scenarios: no subgraphs selected (shows only Convert option), subgraphs selected (shows Convert, Add to Library, Unpack options), and exactly one subgraph selected (hides Convert option). Mocks dependencies including vue-i18n, selection operations, and subgraph operations.

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR correctly addresses issue #7453 by modifying getSubgraphOptions to accept a hasMultipleSelection parameter, enabling the 'Convert to Subgraph' option to display when multiple nodes are selected regardless of whether a subgraph is included in the selection.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the 'Convert to Subgraph' context menu visibility issue. The parameter signature change and conditional logic modifications align with the stated objective to show the option when a subgraph is in the selection.
✨ 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 subgraph/fix-context-menu-options

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

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/14/2025, 08:19:03 AM UTC

📈 Summary

  • Total Tests: 505
  • Passed: 494 ✅
  • Failed: 0
  • Flaky: 2 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 482 / ❌ 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

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/14/2025, 08:09:56 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🔴 +284 B
  • Gzip: 3.39 MB baseline 3.39 MB — 🔴 +102 B
  • Brotli: 2.6 MB baseline 2.6 MB — 🔴 +188 B
  • Bundles: 98 current • 98 baseline • 40 added / 40 removed

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CVb8EnlH.js (removed) 3.02 MB 🟢 -3.02 MB 🟢 -627 kB 🟢 -477 kB
assets/index-QBkgw9qU.js (new) 3.02 MB 🔴 +3.02 MB 🔴 +627 kB 🔴 +477 kB
assets/index-Bs6vyVC0.js (removed) 227 kB 🟢 -227 kB 🟢 -48.6 kB 🟢 -39.9 kB
assets/index-CaCmXiMr.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +39.9 kB
assets/index-BDwMEp9S.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +202 B
assets/index-DB0d12c0.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -234 B

Status: 3 added / 3 removed

Graph Workspace — 986 kB (baseline 986 kB) • 🔴 +284 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-CWsX3tyd.js (new) 986 kB 🔴 +986 kB 🔴 +191 kB 🔴 +146 kB
assets/GraphView-BxPkzzKF.js (removed) 986 kB 🟢 -986 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-CO6zfYjR.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.89 kB
assets/UserSelectView-q5QF1iUf.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-BDRIchm_.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/LegacyCreditsPanel-DnLpZYN5.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.16 kB 🔴 +4.5 kB
assets/KeybindingPanel-CIyILn5k.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.02 kB
assets/KeybindingPanel-NxCdSh1G.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.02 kB
assets/ExtensionPanel-C2bddvUn.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.26 kB
assets/ExtensionPanel-jXX_PqLS.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.58 kB 🔴 +2.26 kB
assets/AboutPanel-DGMkw8nY.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-Dz6bcopT.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-3DzH9se-.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-CHmBGWtS.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.84 kB 🔴 +1.63 kB
assets/UserPanel-D59w_JBc.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/UserPanel-D98vVez-.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-C0Ivs4oZ.js (removed) 53.7 kB 🟢 -53.7 kB 🟢 -8.49 kB 🟢 -7.29 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-uwTRdcHk.js (new) 53.7 kB 🔴 +53.7 kB 🔴 +8.49 kB 🔴 +7.29 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-DTSzVFLi.js (removed) 48 kB 🟢 -48 kB 🟢 -10.3 kB 🟢 -8.98 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-fdt2s4Qs.js (new) 48 kB 🔴 +48 kB 🔴 +10.3 kB 🔴 +8.99 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-cAQr7j59.js (new) 48 kB 🔴 +48 kB 🔴 +10.7 kB 🔴 +9.33 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DIRdmV8Y.js (removed) 48 kB 🟢 -48 kB 🟢 -10.6 kB 🟢 -9.32 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CCkUK3ed.js (removed) 19.5 kB 🟢 -19.5 kB 🟢 -5.04 kB 🟢 -4.47 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DAG4QMdt.js (new) 19.5 kB 🔴 +19.5 kB 🔴 +5.04 kB 🔴 +4.46 kB
assets/ComfyQueueButton-BD4sP-Jl.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/ComfyQueueButton-DDLfocNi.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-7LywPWq3.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -890 B 🟢 -761 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CusfVsn4.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +890 B 🔴 +761 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CZu4UlKH.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +441 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-Dmlsm5s-.js (removed) 897 B 🟢 -897 B 🟢 -500 B 🟢 -435 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-Bjfb_hoW.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-Bm2lwPFd.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-_j0iZQQq.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-BUX7_c3j.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.84 kB 🟢 -1.58 kB
assets/audioService-BgPxAEFU.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +961 B 🔴 +817 B
assets/audioService-Dreh9PzW.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -961 B 🟢 -824 B
assets/serverConfigStore-BP9UaJXd.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-CHN_8MT6.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -553 B
assets/audioUtils-CwPtITJf.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +547 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-W_3Knk2t.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BzuNIfYH.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-CmhMHYBF.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-DCLYW5rb.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-C3MDzIsc.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-CvcTGqv9.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-Dz7wcfUF.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-MXm9O7hz.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3.01 kB
assets/AudioPreviewPlayer-pr9xxIO1.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.01 kB
assets/NumberControlPopover-CiDl5LGa.js (removed) 7.49 kB 🟢 -7.49 kB 🟢 -2.16 kB 🟢 -1.91 kB
assets/NumberControlPopover-CJG1uyOg.js (new) 7.49 kB 🔴 +7.49 kB 🔴 +2.16 kB 🔴 +1.91 kB
assets/WidgetGalleria-B0MqsaKj.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetGalleria-Z0OxnxZn.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetColorPicker-CFguFo0i.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-D7DKQDKc.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-B01BJXOD.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.07 kB
assets/WidgetTextarea-CgBlqbGv.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetMarkdown-BC_ENfhv.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetMarkdown-BWEvMfUS.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetAudioUI-BZ_BojmQ.js (removed) 2.86 kB 🟢 -2.86 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-X0-Gy8xp.js (new) 2.86 kB 🔴 +2.86 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetInputText-AzamD7Yq.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +919 B 🔴 +856 B
assets/WidgetInputText-CX0R4NLK.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -919 B 🟢 -850 B
assets/WidgetToggleSwitch-BbeB715L.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +835 B 🔴 +732 B
assets/WidgetToggleSwitch-D1KJS8o9.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -834 B 🟢 -731 B
assets/MediaImageBottom-Bg7TK0jT.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +737 B 🔴 +643 B
assets/MediaImageBottom-DlrdXEfR.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -733 B 🟢 -640 B
assets/MediaAudioBottom-BVyMTV8x.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +736 B 🔴 +654 B
assets/MediaAudioBottom-oHNzRhby.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -735 B 🟢 -647 B
assets/Media3DBottom-ChwB1BFM.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -657 B
assets/Media3DBottom-oJR36sqc.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +654 B
assets/MediaVideoBottom-C8ggrHAI.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +733 B 🔴 +652 B
assets/MediaVideoBottom-CRXjSRmK.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -647 B
assets/Media3DTop-Bc4tI33o.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +766 B 🔴 +651 B
assets/Media3DTop-CQGpH-CR.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -765 B 🟢 -655 B
assets/WidgetSelect-CzOMjqIA.js (removed) 655 B 🟢 -655 B 🟢 -344 B 🟢 -289 B
assets/WidgetSelect-xkh04iIV.js (new) 655 B 🔴 +655 B 🔴 +344 B 🔴 +287 B
assets/WidgetInputNumber-8Cn2zRlG.js (new) 595 B 🔴 +595 B 🔴 +331 B 🔴 +277 B
assets/WidgetInputNumber-Cr-yV4RR.js (removed) 595 B 🟢 -595 B 🟢 -333 B 🟢 -274 B
assets/Load3D-B63TvmE8.js (new) 424 B 🔴 +424 B 🔴 +268 B 🔴 +223 B
assets/Load3D-Dq9ys3xu.js (removed) 424 B 🟢 -424 B 🟢 -266 B 🟢 -225 B
assets/WidgetLegacy-CV_BoGvV.js (removed) 364 B 🟢 -364 B 🟢 -236 B 🟢 -223 B
assets/WidgetLegacy-D4MfIS17.js (new) 364 B 🔴 +364 B 🔴 +238 B 🔴 +227 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-taU5Yj_Q.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BoT3yC-l.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-Csf8f_9c.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-CWEwKtMY.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DSf2ZEwg.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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ca58ce and 7ebd28b.

📒 Files selected for processing (3)
  • src/composables/graph/useMoreOptionsMenu.ts (1 hunks)
  • src/composables/graph/useSelectionMenuOptions.test.ts (1 hunks)
  • src/composables/graph/useSelectionMenuOptions.ts (2 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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.ts
src/composables/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Composable files must follow the naming pattern useXyz.ts

Files:

  • src/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Write tests for all changes, especially bug fixes to catch future regressions
Unit/component test files must be named **/*.test.ts or in tests-ui/ directory
Do not write change detector tests that just assert default values
Do not write tests dependent on non-behavioral features like utility classes or styles
Be parsimonious in testing; do not write redundant tests; see composable tests approach
Follow 'Don't Mock What You Don't Own' principle - avoid mocking external dependencies
Do not write tests that just test the mocks; ensure tests fail when code behaves unexpectedly
Leverage Vitest's mocking utilities where possible for test mocking
Keep module mocks contained in test files; do not use global mutable state within test files; use vi.hoisted() if necessary
For Component testing, use Vue Test Utils and follow advice about making components easy to test
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • src/composables/graph/useSelectionMenuOptions.test.ts
🧠 Learnings (15)
📚 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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.ts
  • src/composables/graph/useSelectionMenuOptions.test.ts
  • src/composables/graph/useMoreOptionsMenu.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/composables/graph/useSelectionMenuOptions.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.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 **/*.test.ts : Keep module mocks contained in test files; do not use global mutable state within test files; use `vi.hoisted()` if necessary

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.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 **/*.test.ts : Leverage Vitest's mocking utilities where possible for test mocking

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.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/composables/graph/useSelectionMenuOptions.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • src/composables/graph/useSelectionMenuOptions.test.ts
🧬 Code graph analysis (1)
src/composables/graph/useSelectionMenuOptions.ts (1)
src/composables/graph/useMoreOptionsMenu.ts (1)
  • MenuOption (13-22)
⏰ 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: setup
  • GitHub Check: lint-and-format
  • GitHub Check: collect
  • GitHub Check: test
🔇 Additional comments (2)
src/composables/graph/useSelectionMenuOptions.ts (1)

66-103: Confirm “Convert to Subgraph” visibility for single-selection + multi-subgraph-only selection.

showConvertOption = !hasSubgraphs || hasMultipleSelection fixes the mixed-selection bug, but it also implies:

  • single non-subgraph selection (hasSubgraphs: false, hasMultipleSelection: false) will still show “Convert to Subgraph”
  • multi-selection consisting only of subgraph nodes (hasSubgraphs: true, hasMultipleSelection: true) will show “Convert to Subgraph”

Please confirm convertToSubgraph supports both (or tighten the predicate).

src/composables/graph/useMoreOptionsMenu.ts (1)

176-181: Verify hasMultipleSelection semantics match desired “mixed selection” behavior.

This passes hasMultipleNodes.value (aliased from useSelectionState().hasMultipleSelection) into getSubgraphOptions({ hasMultipleSelection }). Please confirm that flag is true for the problematic case (subgraph node + other selected nodes), and not accidentally false due to selection-type nuances (e.g., groups/items vs nodes).

Comment on lines +62 to +73
it('returns only convert option when no subgraphs are selected', () => {
const { getSubgraphOptions } = useSelectionMenuOptions()
const options = getSubgraphOptions({
hasSubgraphs: false,
hasMultipleSelection: true
})

expect(options).toHaveLength(1)
expect(options[0]?.label).toBe('contextMenu.Convert to Subgraph')
expect(options[0]?.action).toBe(subgraphMocks.convertToSubgraph)
})

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 | 🟡 Minor

Test description is misleading; consider covering single-selection/no-subgraph case.

The test says “no subgraphs are selected” but sets hasMultipleSelection: true (it’s really “no subgraphs + multiple selection”). If UX differs for hasMultipleSelection: false, consider adding an explicit case to lock intended behavior.

🤖 Prompt for AI Agents
In src/composables/graph/useSelectionMenuOptions.test.ts around lines 62 to 73
the test description "returns only convert option when no subgraphs are
selected" is misleading because it passes hasMultipleSelection: true; change the
test text to accurately reflect "no subgraphs + multiple selection" or better,
add a new test case that covers the single-selection/no-subgraph scenario by
calling getSubgraphOptions with hasSubgraphs: false and hasMultipleSelection:
false and asserting the expected options for single selection; ensure both tests
have precise descriptions and matching expectations.

@christian-byrne christian-byrne added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.35 Backport PRs for core 1.35 labels Dec 15, 2025
Copy link
Collaborator

@Myestery Myestery left a comment

Choose a reason for hiding this comment

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

LGTM

@Myestery Myestery merged commit a89fa5a into main Dec 15, 2025
52 checks passed
@Myestery Myestery deleted the subgraph/fix-context-menu-options branch December 15, 2025 15:39
@comfy-pr-bot
Copy link
Member

@christian-byrne Successfully backported to #7492

@github-actions github-actions bot removed the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Dec 15, 2025
christian-byrne added a commit that referenced this pull request Dec 16, 2025
…menu if subgraph inside the selection context (#7492)

Backport of #7470 to `core/1.35`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7492-backport-core-1-35-fix-convert-to-subgraph-not-shown-in-context-menu-if-subgraph-ins-2ca6d73d365081f2a76de1b4fee31744)
by [Unito](https://www.unito.io)

Co-authored-by: Christian Byrne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:context-menus area:subgraph core/1.35 Backport PRs for core 1.35 size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cant convert nodes to subgraph

4 participants