Skip to content

Conversation

@pythongosssss
Copy link
Member

@pythongosssss pythongosssss commented Jan 5, 2026

Summary

For users who don't use subgraphs, the workflow name in the top left can be unnecessarily obstructive so this updated collapses it to a simple icon until a subgraph is entered.

Changes

  • Add menu button to WorkflowTab for quick workflow actions
  • Add menu and back button to SubgraphBreadcrumb
  • Extract shared menu items to useBreadcrumbMenu composable
  • Add Comfy.RenameWorkflow command for renaming persisted workflows
  • Menu always shows root workflow menu, even when in subgraph

Screenshots (if applicable)

image image

┆Issue is synchronized with this Notion page by Unito

- Add menu button to WorkflowTab for quick workflow actions
- Add menu and back button to SubgraphBreadcrumb
- Extract shared menu items to useBreadcrumbMenu composable
- Add Comfy.RenameWorkflow command for renaming persisted workflows
- Menu always shows root workflow menu, even when in subgraph
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

The pull request enhances breadcrumb navigation and workflow management by adding a responsive control panel with menu and back buttons to the subgraph breadcrumb component, introducing a shared breadcrumb menu composable for context operations (rename, duplicate, save, delete), and adding a new rename workflow command to the core command system.

Changes

Cohort / File(s) Summary
Breadcrumb Component Enhancements
src/components/breadcrumb/SubgraphBreadcrumb.vue
Added responsive control panel with menu and back action buttons; introduced computed properties for subgraph context detection (isInSubgraph), home menu item, active item tracking (activeItemKey), and breadcrumb element reference (breadcrumbElement); extended breadcrumb item rendering with ref callbacks for rootItemRef and activeItemRef; wired click handlers to telemetry and command store actions
Breadcrumb Item Updates
src/components/breadcrumb/SubgraphBreadcrumbItem.vue
Delegated menu items construction to new useBreadcrumbMenu composable; introduced startRename logic for in-place rename with special handling for hidden root items; exposed public toggleMenu method; reduced item height from h-12 to h-8; updated menu visibility condition to render when active or root
Menu Integration & Composition
src/composables/useBreadcrumbMenu.ts
New composable that constructs reactive breadcrumb context menu with conditional entries for rename, duplicate, save/save-as, clear, publish (blueprints), and delete; wires commands via workflowService and useCommandStore; applies conditional visibility based on root item and blueprint status
Workflow Tab Context Menu
src/components/topbar/WorkflowTab.vue
Integrated breadcrumb context menu into active tabs with new menu button and click handler; uses useBreadcrumbMenu composable to populate menu items; augments existing tab interactions with breadcrumb-based command flow
Core Command System
src/composables/useCoreCommands.ts
Added new Comfy.RenameWorkflow command that prompts user for new filename, validates against current name, and invokes workflowService.renameWorkflow with constructed path

Possibly related PRs

  • feat: right side panel #6952: Shares the same useBreadcrumbMenu composable and modifies useCoreCommands.ts for breadcrumb/menu command surface integration.
✨ Finishing touches
  • 📝 Generate docstrings

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 Jan 5, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/06/2026, 09:56:02 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 01/06/2026, 10:04:04 AM UTC

📈 Summary

  • Total Tests: 487
  • Passed: 452 ✅
  • Failed: 25 ❌
  • Flaky: 2 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 450 / ❌ 20 / ⚠️ 2 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ -1 / ❌ 5 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Bundle Size Report

Summary

  • Raw size: 17.4 MB baseline 17.4 MB — 🔴 +4.7 kB
  • Gzip: 3.57 MB baseline 3.57 MB — 🔴 +881 B
  • Brotli: 2.72 MB baseline 2.72 MB — 🔴 +617 B
  • Bundles: 99 current • 99 baseline • 46 added / 46 removed

Category Glance
Graph Workspace 🔴 +4.7 kB (1.01 MB) · Vendor & Third-Party ⚪ 0 B (9.19 MB) · Other ⚪ 0 B (3.5 MB) · App Entry Points ⚪ 0 B (3.23 MB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (193 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.23 MB (baseline 3.23 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-0-ZRvV8_.js (removed) 3.03 MB 🟢 -3.03 MB 🟢 -637 kB 🟢 -484 kB
assets/index-BhoiW9Z8.js (new) 3.03 MB 🔴 +3.03 MB 🔴 +637 kB 🔴 +484 kB
assets/index-BfArBgiH.js (new) 194 kB 🔴 +194 kB 🔴 +42.3 kB 🔴 +35.1 kB
assets/index-BjQdrK0E.js (removed) 194 kB 🟢 -194 kB 🟢 -42.3 kB 🟢 -35.2 kB
assets/index-DH4VRHwR.js (removed) 345 B 🟢 -345 B 🟢 -247 B 🟢 -200 B
assets/index-DVo_hsUt.js (new) 345 B 🔴 +345 B 🔴 +243 B 🔴 +210 B

Status: 3 added / 3 removed

Graph Workspace — 1.01 MB (baseline 1 MB) • 🔴 +4.7 kB

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-B_-7KWM6.js (new) 1.01 MB 🔴 +1.01 MB 🔴 +196 kB 🔴 +148 kB
assets/GraphView-CuxXpvx7.js (removed) 1 MB 🟢 -1 MB 🟢 -195 kB 🟢 -148 kB

Status: 1 added / 1 removed

Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-DE87bmVi.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.14 kB 🔴 +1.9 kB
assets/UserSelectView-DRpEEECs.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.14 kB 🟢 -1.9 kB

Status: 1 added / 1 removed

Panels & Settings — 300 kB (baseline 300 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-Csrv_82W.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.25 kB 🔴 +4.6 kB
assets/LegacyCreditsPanel-CVh-D0Oc.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.25 kB 🟢 -4.61 kB
assets/KeybindingPanel-BO2Gtnwf.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.13 kB
assets/KeybindingPanel-zH1656IZ.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.12 kB
assets/ExtensionPanel-1RRU3MdT.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.29 kB
assets/ExtensionPanel-ClLZMSgT.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.61 kB 🔴 +2.29 kB
assets/AboutPanel-BIOQ4gcb.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.2 kB
assets/AboutPanel-D8kwifgX.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-D0Vl3UCy.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.8 kB
assets/ServerConfigPanel-DiNEaCik.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.8 kB
assets/UserPanel-CAc4fes9.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.56 kB
assets/UserPanel-CuRUuVsv.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.57 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-MzsBgiwB.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-3wNBLXpA.js (new) 60.1 kB 🔴 +60.1 kB 🔴 +12.4 kB 🔴 +10.8 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DMyG3Dc7.js (removed) 60.1 kB 🟢 -60.1 kB 🟢 -12.4 kB 🟢 -10.8 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-B0dS9eNN.js (removed) 54.4 kB 🟢 -54.4 kB 🟢 -8.6 kB 🟢 -7.38 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-D_ASV0pD.js (new) 54.4 kB 🔴 +54.4 kB 🔴 +8.6 kB 🔴 +7.38 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-9Pu23t8O.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-C5m9-BJH.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.13 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BERQZ2NE.js (removed) 10.9 kB 🟢 -10.9 kB 🟢 -2.9 kB 🟢 -2.55 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DGlY1PpC.js (new) 10.9 kB 🔴 +10.9 kB 🔴 +2.89 kB 🔴 +2.55 kB
assets/ComfyQueueButton-CNPxg51s.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.58 kB 🟢 -2.3 kB
assets/ComfyQueueButton-DQI1Z3W4.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.29 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-Cj1RHLr9.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.46 kB 🟢 -1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-D1uWYMeb.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.45 kB 🔴 +1.32 kB
assets/WidgetButton-8kXjRWp7.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -997 B 🟢 -870 B
assets/WidgetButton-CPPVHYiW.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +996 B 🔴 +889 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CZw3vjsE.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +891 B 🔴 +767 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Dfs8yo_h.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -890 B 🟢 -774 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-Btc-ocVv.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -685 B 🟢 -593 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-C-QLumu_.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +686 B 🔴 +595 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BepYsJlF.js (new) 897 B 🔴 +897 B 🔴 +501 B 🔴 +465 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BRLbcC4n.js (removed) 897 B 🟢 -897 B 🟢 -501 B 🟢 -442 B

Status: 10 added / 10 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-DmZHwqjf.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.57 kB
assets/keybindingService-DOCJK-GQ.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.57 kB
assets/audioService-C-wKhtBf.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +962 B 🔴 +823 B
assets/audioService-DkEYooJ8.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -963 B 🟢 -829 B
assets/serverConfigStore-CLS4uKu9.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-B3VdaLdt.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -552 B
assets/audioUtils-CadJZQL7.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +653 B 🔴 +547 B

Status: 1 added / 1 removed

Vendor & Third-Party — 9.19 MB (baseline 9.19 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-primevue-BDWrguEb.js (new) 1.95 MB 🔴 +1.95 MB 🔴 +334 kB 🔴 +201 kB
assets/vendor-primevue-woBPd4cb.js (removed) 1.95 MB 🟢 -1.95 MB 🟢 -334 kB 🟢 -201 kB
assets/vendor-chart-vIZEp4HX.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-fFl5a9Y4.js 3.9 MB 3.9 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-r9r5tF_O.js 2.08 MB 2.08 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-C79JtMXE.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-BXnt3M34.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Other — 3.5 MB (baseline 3.5 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-CBzDGQAh.js (new) 29 kB 🔴 +29 kB 🔴 +6.42 kB 🔴 +5.59 kB
assets/SubscriptionRequiredDialogContent-DfaTdV1i.js (removed) 29 kB 🟢 -29 kB 🟢 -6.42 kB 🟢 -5.59 kB
assets/WidgetRecordAudio-Bs2z5zui.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.64 kB
assets/WidgetRecordAudio-DgKaiXo3.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.64 kB
assets/AudioPreviewPlayer-D48eIG9s.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -2.99 kB
assets/AudioPreviewPlayer-Do0FLLXQ.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +2.99 kB
assets/ValueControlPopover-D97Ulq1d.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.7 kB 🟢 -1.52 kB
assets/ValueControlPopover-DYgPP_ff.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.7 kB 🔴 +1.51 kB
assets/WidgetGalleria-CTmE7SnD.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetGalleria-CWhKuoei.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetColorPicker-B3W0If9h.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-BQHaRUyK.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.24 kB
assets/WidgetTextarea-6dflbFKe.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.08 kB
assets/WidgetTextarea-CsvSnSbT.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.07 kB
assets/WidgetMarkdown-BccmcMa2.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetMarkdown-DR0ixvlG.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-_GUNiNix.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetAudioUI-CQdxlYr2.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetChart-arE2XQUm.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +931 B 🔴 +815 B
assets/WidgetChart-dhwVJAgU.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -931 B 🟢 -816 B
assets/WidgetInputText-BNjds7sq.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +917 B 🔴 +856 B
assets/WidgetInputText-mb74WK_5.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -920 B 🟢 -846 B
assets/WidgetToggleSwitch-BD4vvycG.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +835 B 🔴 +732 B
assets/WidgetToggleSwitch-PIAmZhSn.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -833 B 🟢 -728 B
assets/MediaImageBottom-CsTIpjvs.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +731 B 🔴 +640 B
assets/MediaImageBottom-DzlcEFcu.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -733 B 🟢 -641 B
assets/MediaAudioBottom-CpciSPWY.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +730 B 🔴 +649 B
assets/MediaAudioBottom-DtPIypXI.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -731 B 🟢 -647 B
assets/Media3DBottom-HMtw74hi.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -646 B
assets/Media3DBottom-yj_4vYy8.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +726 B 🔴 +649 B
assets/MediaVideoBottom-BnRB8rLk.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +727 B 🔴 +647 B
assets/MediaVideoBottom-CIVQKp4J.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -646 B
assets/Media3DTop-DqfuNcF-.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +762 B 🔴 +656 B
assets/Media3DTop-QqSFBALO.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -763 B 🟢 -651 B
assets/WidgetSelect-BhwKRM__.js (new) 733 B 🔴 +733 B 🔴 +357 B 🔴 +306 B
assets/WidgetSelect-C4Ae-26T.js (removed) 733 B 🟢 -733 B 🟢 -364 B 🟢 -325 B
assets/WidgetInputNumber-BPTTEWE2.js (removed) 673 B 🟢 -673 B 🟢 -351 B 🟢 -288 B
assets/WidgetInputNumber-cGqMgbSe.js (new) 673 B 🔴 +673 B 🔴 +346 B 🔴 +313 B
assets/Load3D-B1GP7Zde.js (new) 424 B 🔴 +424 B 🔴 +265 B 🔴 +223 B
assets/Load3D-DpiNpDU3.js (removed) 424 B 🟢 -424 B 🟢 -265 B 🟢 -223 B
assets/WidgetLegacy-9onG36ZR.js (new) 364 B 🔴 +364 B 🔴 +234 B 🔴 +196 B
assets/WidgetLegacy-C8biUcWj.js (removed) 364 B 🟢 -364 B 🟢 -236 B 🟢 -196 B
assets/commands-09qoDJrw.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Ba_fO77I.js 91.3 kB 91.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DrF_Vdi7.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-DmgiGEEz.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-BXyavTZf.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Zy145v5w.js 279 kB 279 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2Worker-GDlTeC1j.js 4.69 kB 4.69 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-C2io158s.js 3.18 kB 3.18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 21 added / 21 removed

@pythongosssss pythongosssss added the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 6, 2026
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Updating Playwright Expectations

@github-actions github-actions bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 6, 2026
@pythongosssss pythongosssss marked this pull request as ready for review January 6, 2026 15:00
@pythongosssss pythongosssss requested a review from a team as a code owner January 6, 2026 15:00
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 6, 2026
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: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/breadcrumb/SubgraphBreadcrumb.vue (1)

119-127: Missing error handling in subgraph navigation command.

Lines 123-126 throw a TypeError if canvas.graph is null, similar to the home command. This should handle errors gracefully instead of throwing.

🔎 Proposed fix
     command: () => {
       useTelemetry()?.trackUiButtonClicked({
         button_id: 'breadcrumb_subgraph_item_selected'
       })
       const canvas = useCanvasStore().getCanvas()
-      if (!canvas.graph) throw new TypeError('Canvas has no graph')
+      if (!canvas.graph) {
+        console.error('Canvas has no graph')
+        return
+      }

       canvas.setGraph(subgraph)
     },
🤖 Fix all issues with AI Agents
In @src/components/breadcrumb/SubgraphBreadcrumb.vue:
- Around line 99-113: The breadcrumb's home computed property command currently
throws a TypeError when canvas.graph is missing; wrap the command body in a
try/catch to prevent an unhandled exception, e.g., in the computed property home
-> command: call useCanvasStore().getCanvas(), check for canvas and
canvas.graph, and if missing handle gracefully in the catch by logging the error
(or using the app's notifier/telemetry) and returning early instead of throwing;
keep the existing telemetry.trackUiButtonClicked call and only call
canvas.setGraph(canvas.graph.rootGraph) when canvas.graph is present.
- Around line 150-152: The handler handleBackClick is calling
useCommandStore().execute('Comfy.Graph.ExitSubgraph') and dropping the returned
Promise with void, so failures will be lost; make handleBackClick async, await
useCommandStore().execute(...) and wrap the await in a try/catch (or return the
Promise) to surface/log errors (reference handleBackClick and
useCommandStore().execute).

In @src/components/topbar/WorkflowTab.vue:
- Around line 150-159: Guard against a null/undefined workflow before accessing
its properties: check props.workflowOption.workflow and use a safe fallback when
building rootMenuItem (e.g., use a default label like 'Untitled' and isBlueprint
= false) so that label and the call to
useSubgraphStore().isSubgraphBlueprint(...) never read properties of null; then
pass that safe rootMenuItem into useBreadcrumbMenu and keep the existing command
invocation useCommandStore().execute('Comfy.RenameWorkflow').

In @src/composables/useBreadcrumbMenu.ts:
- Around line 29-30: The code dereferences workflowStore.activeWorkflow with a
non-null assertion when calling workflowService.duplicateWorkflow, risking a
runtime error if no workflow is active; add a guard in the useBreadcrumbMenu
action so you check that workflowStore.activeWorkflow is defined before calling
duplicateWorkflow (e.g., if not defined, return early or show an error/disable
the action), and use the non-asserted value (no "!") when passing it to
workflowService.duplicateWorkflow to ensure safe runtime behavior.
- Line 71: The code dereferences workflowStore.activeWorkflow with a non-null
assertion when calling saveWorkflowAs, which can throw if activeWorkflow is
null; add a null/undefined guard before calling workflowService.saveWorkflowAs
(e.g., check if workflowStore.activeWorkflow is present and handle the missing
case by returning early or showing an error) and only call
workflowService.saveWorkflowAs(workflowStore.activeWorkflow) when the guard
passes; update any caller paths that assume success accordingly.
- Line 85: The code dereferences workflowStore.activeWorkflow with a non-null
assertion when calling workflowService.deleteWorkflow; add a null/undefined
guard before calling deleteWorkflow (e.g., check if workflowStore.activeWorkflow
exists and return or throw a handled error if not) and pass the validated value
to workflowService.deleteWorkflow instead of using the `!` operator so you avoid
potential runtime exceptions.
- Around line 17-90: The computed menuItems currently includes entries with a
visible property so hidden items remain in the array; change the logic inside
the computed menuItems to only return items that meet their visibility
conditions (e.g., include entries conditionally instead of setting visible) and
filter out falsy entries before returning, ensuring you also avoid
leading/trailing or duplicate separators when conditions remove neighboring
items; update the computed block that builds MenuItem[] (menuItems) to construct
items conditionally and then call a final .filter(Boolean) and a small pass to
collapse/remove redundant separators.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7d0825 and 83354aa.

⛔ Files ignored due to path filters (24)
  • browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.png is excluded by !**/*.png
  • browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-empty-canvas-mobile-chrome-linux.png is excluded by !**/*.png
  • browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-settings-dialog-mobile-chrome-linux.png is excluded by !**/*.png
  • browser_tests/tests/viewport.spec.ts-snapshots/viewport-fits-when-saved-offscreen-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-fit-to-contents-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-dragging-link-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-ctrl-alt-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-reuses-origin-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-input-drag-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-output-shift-drag-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-shift-output-multi-link-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-node-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-slot-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-touch-mobile-chrome-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-light-all-colors-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts-snapshots/vue-nodes-upload-widgets-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/topbar/WorkflowTab.vue
  • src/composables/useBreadcrumbMenu.ts
  • src/composables/useCoreCommands.ts
🧰 Additional context used
📓 Path-based instructions (16)
src/**/*.vue

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

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
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/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
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/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
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/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
src/components/**/*.vue

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.vue: Use setup() function in Vue 3 Composition API
Destructure props using Vue 3.5 style in Vue components
Use ref/reactive for state management in Vue 3 Composition API
Implement computed() for derived state in Vue 3 Composition API
Use provide/inject for dependency injection in Vue components
Prefer emit/@event-name for state changes over other communication patterns
Use defineExpose only for imperative operations (such as form.validate(), modal.open())
Replace PrimeVue Dropdown component with Select
Replace PrimeVue OverlayPanel component with Popover
Replace PrimeVue Calendar component with DatePicker
Replace PrimeVue InputSwitch component with ToggleSwitch
Replace PrimeVue Sidebar component with Drawer
Replace PrimeVue Chips component with AutoComplete with multiple enabled
Replace PrimeVue TabMenu component with Tabs without panels
Replace PrimeVue Steps component with Stepper without panels
Replace PrimeVue InlineMessage component with Message
Extract complex conditionals to computed properties
Implement cleanup for async operations in Vue components
Use lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API
Use Teleport/Suspense when needed for component rendering
Define proper props and emits definitions in Vue components

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
src/components/**/*.{vue,css}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,css}: Use Tailwind CSS only for styling (no custom CSS)
Use the correct tokens from style.css in the design system package

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3.5+ with TypeScript in .vue files, exclusively using Composition API with <script setup lang="ts"> syntax
Use Tailwind 4 for styling in Vue components; avoid <style> blocks
Name Vue components using PascalCase (e.g., MenuHamburger.vue)
Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer computed() over ref with watch when deriving values
Prefer useModel over separately defining prop and emit for two-way binding
Use vue-i18n in composition API for string literals; place new translation entries in src/locales/en/main.json
Use cn() utility function from @/utils/tailwindUtil for merging Tailwind class names; do not use :class="[]" syntax
Do not use the dark: Tailwind variant; use semantic values from the style.css theme instead (e.g., bg-node-component-surface)
Do not use !important or the ! important prefix for Tailwind classes; find and correct interfering !important classes instead
Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Leverage VueUse functions for performance-enhancing styles in Vue components
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
src/**/*.ts

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

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

Files:

  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.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/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
🧠 Learnings (34)
📓 Common learnings
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue TabMenu component with Tabs without panels

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue Sidebar component with Drawer

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue OverlayPanel component with Popover

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue InputSwitch component with ToggleSwitch

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.

Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-16T22:26:49.463Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.vue:17-17
Timestamp: 2025-12-16T22:26:49.463Z
Learning: In Vue 3.5+ with <script setup>, when using defineProps<Props>() with partial destructuring (e.g., const { as = 'button', class: customClass = '' } = defineProps<Props>() ), props that are not destructured (e.g., variant, size) stay accessible by name in the template scope. This pattern is valid: you can destructure only a subset of props for convenience while referencing the remaining props directly in template expressions. Apply this guideline to Vue components across the codebase (all .vue files).

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-22T21:36:08.369Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/platform/cloud/subscription/components/PricingTable.vue:185-201
Timestamp: 2025-12-22T21:36:08.369Z
Learning: In Vue components, avoid creating single-use variants for common UI components (e.g., Button and other shared components). Aim for reusable variants that cover multiple use cases. It’s acceptable to temporarily mix variant props with inline Tailwind classes when a styling need is unique to one place, but plan and consolidate into shared, reusable variants as patterns emerge across the codebase.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 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/components/topbar/WorkflowTab.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-18T02:07:38.870Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7598
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:131-131
Timestamp: 2025-12-18T02:07:38.870Z
Learning: Tailwind CSS v4 safe utilities (e.g., items-center-safe, justify-*-safe, place-*-safe) are allowed in Vue components under src/ and in story files. Do not flag these specific safe variants as invalid when reviewing code in src/**/*.vue or related stories.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-18T21:15:46.862Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7603
File: src/components/queue/QueueOverlayHeader.vue:49-59
Timestamp: 2025-12-18T21:15:46.862Z
Learning: In the ComfyUI_frontend repository, for Vue components, do not add aria-label to buttons that have visible text content (e.g., buttons containing <span> text). The visible text provides the accessible name. Use aria-label only for elements without visible labels (e.g., icon-only buttons). If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-21T01:06:02.786Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/components/graph/selectionToolbox/ColorPickerButton.vue:15-18
Timestamp: 2025-12-21T01:06:02.786Z
Learning: In Comfy-Org/ComfyUI_frontend, in Vue component files, when a filled icon is required (e.g., 'pi pi-circle-fill'), you may mix PrimeIcons with Lucide icons since Lucide lacks filled variants. This mixed usage is acceptable when one icon library does not provide an equivalent filled icon. Apply consistently across Vue components in the src directory where icons are used, and document the rationale when a mixed approach is chosen.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-18T16:03:02.066Z
Learnt from: henrikvilhelmberglund
Repo: Comfy-Org/ComfyUI_frontend PR: 7617
File: src/components/actionbar/ComfyActionbar.vue:301-308
Timestamp: 2025-12-18T16:03:02.066Z
Learning: In the ComfyUI frontend queue system, useQueuePendingTaskCountStore().count indicates the number of tasks in the queue, where count = 1 means a single active/running task and count > 1 means there are pending tasks in addition to the active task. Therefore, in src/components/actionbar/ComfyActionbar.vue, enable the 'Clear Pending Tasks' button only when count > 1 to avoid clearing the currently running task. The active task should be canceled using the 'Cancel current run' button instead. This rule should be enforced via a conditional check on the queue count, with appropriate disabled/aria-disabled states for accessibility, and tests should verify behavior for count = 1 and count > 1.

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 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/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.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/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

  • src/composables/useCoreCommands.ts
  • src/composables/useBreadcrumbMenu.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 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/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Leverage VueUse functions for performance-enhancing styles in Vue components

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 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 : Implement computed properties with computed()

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 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/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Extract complex conditionals to computed properties

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use vue-i18n for ALL UI strings

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue Steps component with Stepper without panels

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue Dropdown component with Select

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Use Vue 3.5+ with TypeScript in `.vue` files, exclusively using Composition API with `<script setup lang="ts">` syntax

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue Chips component with AutoComplete with multiple enabled

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 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/components/breadcrumb/SubgraphBreadcrumb.vue
📚 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} : Use TypeScript for type safety in state management stores

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
🧬 Code graph analysis (2)
src/composables/useCoreCommands.ts (1)
src/stores/queueStore.ts (1)
  • workflow (314-316)
src/composables/useBreadcrumbMenu.ts (1)
src/stores/commandStore.ts (1)
  • useCommandStore (75-147)
🔇 Additional comments (11)
src/composables/useCoreCommands.ts (1)

177-196: LGTM! The rename workflow command is well-implemented.

The command correctly:

  • Guards against null workflows and non-persisted workflows
  • Prompts for a new filename with the current filename as default
  • Validates that the new name differs from the current name
  • Constructs the new path by combining directory + filename + extension
  • Delegates to the workflow service for the actual rename operation

The path construction on line 193 correctly uses the workflow's directory and appends .json, ensuring the renamed file stays in the same location.

src/components/topbar/WorkflowTab.vue (2)

10-18: LGTM! Context menu button is correctly implemented.

The button:

  • Only renders when isActiveTab is true
  • Uses appropriate styling and size
  • Stops event propagation with @click.stop to prevent triggering the parent click handler
  • Uses PrimeIcons consistently with other menu buttons in the codebase

174-180: No action needed; the implementation is correct.

The Menu ref is properly initialized because both the button (line 11, v-if="isActiveTab") and the Menu component (line 48, v-if="isActiveTab") are conditionally rendered with the same reactive condition. When isActiveTab is true, both the triggering button and the Menu are mounted. Since handleMenuClick can only be called when the button is visible, menu.value will always be defined. The optional chaining (?.toggle()) is appropriate defensive programming and consistent with similar patterns throughout the codebase (e.g., TopbarBadge.vue, ComfyMenuButton.vue). No race conditions exist because both button and menu visibility are tied to the same reactive value.

src/components/breadcrumb/SubgraphBreadcrumbItem.vue (4)

28-28: Menu rendering extended to root item - verify menu items are appropriate.

The Menu now renders when isActive || isRoot, meaning the root item can show a menu even when not active. Ensure the menu items returned by useBreadcrumbMenu are appropriate for both active and inactive root items.

Based on the useBreadcrumbMenu implementation, when isRoot is true, the menu includes save/delete actions even if not active. This might be intentional for allowing quick access to workflow actions from the collapsed breadcrumb.

Verify this behavior aligns with the UX design intent, especially when the breadcrumb is collapsed and only the root item is visible.


139-158: LGTM! The startRename function handles collapsed breadcrumb correctly.

The function:

  • Checks if the root element is hidden using offsetParent === null (correct check for CSS display:none)
  • Falls back to executing the rename command when collapsed (line 143)
  • Otherwise enables in-place editing with proper focus and selection (lines 147-157)
  • Dynamically sizes the input to match or exceed the wrapper width (line 154)

This is a well-thought-out solution for handling both expanded and collapsed states.


189-195: LGTM! Exposing toggleMenu enables external control.

The toggleMenu method is exposed via defineExpose, allowing parent components (like SubgraphBreadcrumb.vue) to programmatically open the menu. This is a clean API for inter-component communication.


10-10: No layout concern — height is consistently aligned across all breadcrumb components.

The h-8 height is already applied consistently throughout the breadcrumb system. The parent container (SubgraphBreadcrumb.vue) uses h-8, as do the menu buttons and all breadcrumb items. All components are uniformly sized, so there is no visual misalignment risk with adjacent elements.

src/components/breadcrumb/SubgraphBreadcrumb.vue (3)

16-23: LGTM! Context menu button is well-implemented.

The button:

  • Uses consistent styling with other breadcrumb controls
  • Has appropriate transitions and hover states
  • Uses PrimeVue Button component as per project guidelines
  • Has proper icon and accessibility attributes

24-33: LGTM! Back button is conditionally rendered and accessible.

The button:

  • Only shows when in a subgraph (v-if="isInSubgraph")
  • Uses a clear "undo" icon to indicate navigation back
  • Has consistent styling with the menu button
  • Properly wires to handleBackClick

143-148: LGTM! Menu click handler is correctly implemented.

The handler:

  • Logs telemetry for UI tracking
  • Safely accesses rootItemRef with optional chaining
  • Passes the event to toggle the menu at the correct position
src/composables/useBreadcrumbMenu.ts (1)

23-23: The rename action is properly protected against non-persisted workflows.

The disabled state at line 23 correctly prevents UI interaction for non-persisted workflows (disabled: isRoot && !workflowStore.activeWorkflow?.isPersisted). The edge case concern about direct callback invocation is already mitigated: the underlying Comfy.RenameWorkflow command handler validates if (!workflow || !workflow.isPersisted) return, providing a safeguard against programmatic invocation bypassing the disabled state. No changes needed.

Comment on lines +44 to +52
:ref="
(el) => {
const ref = el as
| InstanceType<typeof SubgraphBreadcrumbItem>
| undefined
if (item.key === 'root') rootItemRef = ref
if (item.key === activeItemKey) activeItemRef = ref
}
"
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Verify type safety of ref callback.

The ref callback casts el to InstanceType<typeof SubgraphBreadcrumbItem> | undefined and assigns refs based on item keys. This pattern works but could be fragile if the component type changes.

Consider using a more type-safe approach with a Map or dedicated ref handling:

🔎 Alternative approach
const itemRefs = new Map<string, InstanceType<typeof SubgraphBreadcrumbItem>>()

const setItemRef = (key: string) => (el: unknown) => {
  const ref = el as InstanceType<typeof SubgraphBreadcrumbItem> | undefined
  if (ref) {
    itemRefs.set(key, ref)
    if (key === 'root') rootItemRef.value = ref
    if (key === activeItemKey.value) activeItemRef.value = ref
  }
}

// In template:
// :ref="setItemRef(item.key)"

Comment on lines +99 to +113
const home = computed(() => ({
label: workflowName.value,
icon: 'pi pi-home',
key: 'root',
isBlueprint: isBlueprint.value,
command: () => {
useTelemetry()?.trackUiButtonClicked({
button_id: 'breadcrumb_subgraph_root_selected'
})
const canvas = useCanvasStore().getCanvas()
if (!canvas.graph) throw new TypeError('Canvas has no graph')
canvas.setGraph(canvas.graph.rootGraph)
}
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing error handling in home command.

Lines 108-111 throw a TypeError if canvas.graph is null, but there's no try-catch to handle this gracefully. If the error occurs during user interaction, it will propagate unhandled.

🔎 Proposed fix
   command: () => {
     useTelemetry()?.trackUiButtonClicked({
       button_id: 'breadcrumb_subgraph_root_selected'
     })
     const canvas = useCanvasStore().getCanvas()
-    if (!canvas.graph) throw new TypeError('Canvas has no graph')
+    if (!canvas.graph) {
+      console.error('Canvas has no graph')
+      return
+    }

     canvas.setGraph(canvas.graph.rootGraph)
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const home = computed(() => ({
label: workflowName.value,
icon: 'pi pi-home',
key: 'root',
isBlueprint: isBlueprint.value,
command: () => {
useTelemetry()?.trackUiButtonClicked({
button_id: 'breadcrumb_subgraph_root_selected'
})
const canvas = useCanvasStore().getCanvas()
if (!canvas.graph) throw new TypeError('Canvas has no graph')
canvas.setGraph(canvas.graph.rootGraph)
}
}))
const home = computed(() => ({
label: workflowName.value,
icon: 'pi pi-home',
key: 'root',
isBlueprint: isBlueprint.value,
command: () => {
useTelemetry()?.trackUiButtonClicked({
button_id: 'breadcrumb_subgraph_root_selected'
})
const canvas = useCanvasStore().getCanvas()
if (!canvas.graph) {
console.error('Canvas has no graph')
return
}
canvas.setGraph(canvas.graph.rootGraph)
}
}))
🤖 Prompt for AI Agents
In @src/components/breadcrumb/SubgraphBreadcrumb.vue around lines 99 - 113, The
breadcrumb's home computed property command currently throws a TypeError when
canvas.graph is missing; wrap the command body in a try/catch to prevent an
unhandled exception, e.g., in the computed property home -> command: call
useCanvasStore().getCanvas(), check for canvas and canvas.graph, and if missing
handle gracefully in the catch by logging the error (or using the app's
notifier/telemetry) and returning early instead of throwing; keep the existing
telemetry.trackUiButtonClicked call and only call
canvas.setGraph(canvas.graph.rootGraph) when canvas.graph is present.

Comment on lines +150 to +152
const handleBackClick = () => {
void useCommandStore().execute('Comfy.Graph.ExitSubgraph')
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing await for async command execution.

Line 151 calls useCommandStore().execute() which returns a Promise, but the result is voided without awaiting. If the command fails, the error won't be caught.

🔎 Proposed fix
-const handleBackClick = () => {
+const handleBackClick = async () => {
-  void useCommandStore().execute('Comfy.Graph.ExitSubgraph')
+  try {
+    await useCommandStore().execute('Comfy.Graph.ExitSubgraph')
+  } catch (error) {
+    console.error('Failed to exit subgraph:', error)
+  }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const handleBackClick = () => {
void useCommandStore().execute('Comfy.Graph.ExitSubgraph')
}
const handleBackClick = async () => {
try {
await useCommandStore().execute('Comfy.Graph.ExitSubgraph')
} catch (error) {
console.error('Failed to exit subgraph:', error)
}
}
🤖 Prompt for AI Agents
In @src/components/breadcrumb/SubgraphBreadcrumb.vue around lines 150 - 152, The
handler handleBackClick is calling
useCommandStore().execute('Comfy.Graph.ExitSubgraph') and dropping the returned
Promise with void, so failures will be lost; make handleBackClick async, await
useCommandStore().execute(...) and wrap the await in a try/catch (or return the
Promise) to surface/log errors (reference handleBackClick and
useCommandStore().execute).

Comment on lines +150 to +159
const rootMenuItem: MenuItem = {
label: props.workflowOption.workflow.filename,
key: 'root',
isBlueprint: useSubgraphStore().isSubgraphBlueprint(
props.workflowOption.workflow
)
}
const { menuItems } = useBreadcrumbMenu(rootMenuItem, () =>
useCommandStore().execute('Comfy.RenameWorkflow')
)
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Missing null check for workflow before accessing properties.

Lines 151 and 153-155 access props.workflowOption.workflow properties without verifying the workflow exists. While this is likely safe given the component props, defensive coding would add a guard.

🔎 Proposed fix
+const workflow = props.workflowOption.workflow
+if (!workflow) {
+  console.error('WorkflowTab: workflow is missing')
+  // Return empty menuItems or throw
+}
+
 const rootMenuItem: MenuItem = {
-  label: props.workflowOption.workflow.filename,
+  label: workflow.filename,
   key: 'root',
   isBlueprint: useSubgraphStore().isSubgraphBlueprint(
-    props.workflowOption.workflow
+    workflow
   )
 }

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @src/components/topbar/WorkflowTab.vue around lines 150 - 159, Guard against
a null/undefined workflow before accessing its properties: check
props.workflowOption.workflow and use a safe fallback when building rootMenuItem
(e.g., use a default label like 'Untitled' and isBlueprint = false) so that
label and the call to useSubgraphStore().isSubgraphBlueprint(...) never read
properties of null; then pass that safe rootMenuItem into useBreadcrumbMenu and
keep the existing command invocation
useCommandStore().execute('Comfy.RenameWorkflow').

Comment on lines +17 to +90
const menuItems = computed<MenuItem[]>(() => {
return [
{
label: t('g.rename'),
icon: 'pi pi-pencil',
command: startRename,
disabled: isRoot && !workflowStore.activeWorkflow?.isPersisted
},
{
label: t('breadcrumbsMenu.duplicate'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
},
visible: isRoot && !isBlueprint
},
{
separator: true,
visible: isRoot
},
{
label: t('menuLabels.Save'),
icon: 'pi pi-save',
command: async () => {
await useCommandStore().execute('Comfy.SaveWorkflow')
},
visible: isRoot
},
{
label: t('menuLabels.Save As'),
icon: 'pi pi-save',
command: async () => {
await useCommandStore().execute('Comfy.SaveWorkflowAs')
},
visible: isRoot
},
{
separator: true
},
{
label: t('breadcrumbsMenu.clearWorkflow'),
icon: 'pi pi-trash',
command: async () => {
await useCommandStore().execute('Comfy.ClearWorkflow')
}
},
{
separator: true,
visible: isRoot && isBlueprint
},
{
label: t('subgraphStore.publish'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
},
visible: isRoot && isBlueprint
},
{
separator: true,
visible: isRoot
},
{
label: isBlueprint
? t('breadcrumbsMenu.deleteBlueprint')
: t('breadcrumbsMenu.deleteWorkflow'),
icon: 'pi pi-times',
command: async () => {
await workflowService.deleteWorkflow(workflowStore.activeWorkflow!)
},
visible: isRoot
}
]
})
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider filtering menu items instead of using visible property.

The menu items use a visible property to conditionally show/hide items, which means invisible items are still part of the array. PrimeVue Menu will handle this correctly, but filtering the array would be more efficient and cleaner.

🔎 Proposed refactor
 const menuItems = computed<MenuItem[]>(() => {
-  return [
+  const allItems = [
     {
       label: t('g.rename'),
       icon: 'pi pi-pencil',
       command: startRename,
       disabled: isRoot && !workflowStore.activeWorkflow?.isPersisted
     },
     // ... rest of items
   ]
+  return allItems.filter(item => item.visible !== false)
 })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const menuItems = computed<MenuItem[]>(() => {
return [
{
label: t('g.rename'),
icon: 'pi pi-pencil',
command: startRename,
disabled: isRoot && !workflowStore.activeWorkflow?.isPersisted
},
{
label: t('breadcrumbsMenu.duplicate'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
},
visible: isRoot && !isBlueprint
},
{
separator: true,
visible: isRoot
},
{
label: t('menuLabels.Save'),
icon: 'pi pi-save',
command: async () => {
await useCommandStore().execute('Comfy.SaveWorkflow')
},
visible: isRoot
},
{
label: t('menuLabels.Save As'),
icon: 'pi pi-save',
command: async () => {
await useCommandStore().execute('Comfy.SaveWorkflowAs')
},
visible: isRoot
},
{
separator: true
},
{
label: t('breadcrumbsMenu.clearWorkflow'),
icon: 'pi pi-trash',
command: async () => {
await useCommandStore().execute('Comfy.ClearWorkflow')
}
},
{
separator: true,
visible: isRoot && isBlueprint
},
{
label: t('subgraphStore.publish'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
},
visible: isRoot && isBlueprint
},
{
separator: true,
visible: isRoot
},
{
label: isBlueprint
? t('breadcrumbsMenu.deleteBlueprint')
: t('breadcrumbsMenu.deleteWorkflow'),
icon: 'pi pi-times',
command: async () => {
await workflowService.deleteWorkflow(workflowStore.activeWorkflow!)
},
visible: isRoot
}
]
})
const menuItems = computed<MenuItem[]>(() => {
const allItems = [
{
label: t('g.rename'),
icon: 'pi pi-pencil',
command: startRename,
disabled: isRoot && !workflowStore.activeWorkflow?.isPersisted
},
{
label: t('breadcrumbsMenu.duplicate'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
},
visible: isRoot && !isBlueprint
},
{
separator: true,
visible: isRoot
},
{
label: t('menuLabels.Save'),
icon: 'pi pi-save',
command: async () => {
await useCommandStore().execute('Comfy.SaveWorkflow')
},
visible: isRoot
},
{
label: t('menuLabels.Save As'),
icon: 'pi pi-save',
command: async () => {
await useCommandStore().execute('Comfy.SaveWorkflowAs')
},
visible: isRoot
},
{
separator: true
},
{
label: t('breadcrumbsMenu.clearWorkflow'),
icon: 'pi pi-trash',
command: async () => {
await useCommandStore().execute('Comfy.ClearWorkflow')
}
},
{
separator: true,
visible: isRoot && isBlueprint
},
{
label: t('subgraphStore.publish'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
},
visible: isRoot && isBlueprint
},
{
separator: true,
visible: isRoot
},
{
label: isBlueprint
? t('breadcrumbsMenu.deleteBlueprint')
: t('breadcrumbsMenu.deleteWorkflow'),
icon: 'pi pi-times',
command: async () => {
await workflowService.deleteWorkflow(workflowStore.activeWorkflow!)
},
visible: isRoot
}
]
return allItems.filter(item => item.visible !== false)
})
🤖 Prompt for AI Agents
In @src/composables/useBreadcrumbMenu.ts around lines 17 - 90, The computed
menuItems currently includes entries with a visible property so hidden items
remain in the array; change the logic inside the computed menuItems to only
return items that meet their visibility conditions (e.g., include entries
conditionally instead of setting visible) and filter out falsy entries before
returning, ensuring you also avoid leading/trailing or duplicate separators when
conditions remove neighboring items; update the computed block that builds
MenuItem[] (menuItems) to construct items conditionally and then call a final
.filter(Boolean) and a small pass to collapse/remove redundant separators.

Comment on lines +29 to +30
await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
},
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 | 🔴 Critical

Missing null check before dereferencing activeWorkflow.

Line 29 uses workflowStore.activeWorkflow! with a non-null assertion, but there's no guard ensuring activeWorkflow exists. If duplicateWorkflow is invoked when no workflow is active, this will throw a runtime error.

🔎 Proposed fix
       command: async () => {
+        if (!workflowStore.activeWorkflow) return
         await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
       },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
},
command: async () => {
if (!workflowStore.activeWorkflow) return
await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
},
🤖 Prompt for AI Agents
In @src/composables/useBreadcrumbMenu.ts around lines 29 - 30, The code
dereferences workflowStore.activeWorkflow with a non-null assertion when calling
workflowService.duplicateWorkflow, risking a runtime error if no workflow is
active; add a guard in the useBreadcrumbMenu action so you check that
workflowStore.activeWorkflow is defined before calling duplicateWorkflow (e.g.,
if not defined, return early or show an error/disable the action), and use the
non-asserted value (no "!") when passing it to workflowService.duplicateWorkflow
to ensure safe runtime behavior.

label: t('subgraphStore.publish'),
icon: 'pi pi-copy',
command: async () => {
await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
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 | 🔴 Critical

Missing null check before dereferencing activeWorkflow.

Line 71 uses workflowStore.activeWorkflow! with a non-null assertion, but there's no guard ensuring activeWorkflow exists when publishing a blueprint.

🔎 Proposed fix
       command: async () => {
+        if (!workflowStore.activeWorkflow) return
         await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
       },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
command: async () => {
if (!workflowStore.activeWorkflow) return
await workflowService.saveWorkflowAs(workflowStore.activeWorkflow!)
},
🤖 Prompt for AI Agents
In @src/composables/useBreadcrumbMenu.ts at line 71, The code dereferences
workflowStore.activeWorkflow with a non-null assertion when calling
saveWorkflowAs, which can throw if activeWorkflow is null; add a null/undefined
guard before calling workflowService.saveWorkflowAs (e.g., check if
workflowStore.activeWorkflow is present and handle the missing case by returning
early or showing an error) and only call
workflowService.saveWorkflowAs(workflowStore.activeWorkflow) when the guard
passes; update any caller paths that assume success accordingly.

: t('breadcrumbsMenu.deleteWorkflow'),
icon: 'pi pi-times',
command: async () => {
await workflowService.deleteWorkflow(workflowStore.activeWorkflow!)
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 | 🔴 Critical

Missing null check before dereferencing activeWorkflow.

Line 85 uses workflowStore.activeWorkflow! with a non-null assertion, but there's no guard ensuring activeWorkflow exists when deleting.

🔎 Proposed fix
       command: async () => {
+        if (!workflowStore.activeWorkflow) return
         await workflowService.deleteWorkflow(workflowStore.activeWorkflow!)
       },

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @src/composables/useBreadcrumbMenu.ts at line 85, The code dereferences
workflowStore.activeWorkflow with a non-null assertion when calling
workflowService.deleteWorkflow; add a null/undefined guard before calling
deleteWorkflow (e.g., check if workflowStore.activeWorkflow exists and return or
throw a handled error if not) and pass the validated value to
workflowService.deleteWorkflow instead of using the `!` operator so you avoid
potential runtime exceptions.

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.

2 participants