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

Adds a workflow actions composable and OverlayIcon component, integrates menu/rename flows into breadcrumb and topbar components, introduces a Rename Workflow core command, and updates breadcrumb navigation with menu/back controls, per-item refs, and rename/menu wiring.

Changes

Cohort / File(s) Summary
Breadcrumb Navigation
src/components/breadcrumb/SubgraphBreadcrumb.vue
Adds flex layout, menu and back Buttons, conditional visibility via isInSubgraph, per-item rootItemRef, activeItemKey, home item, keys subgraph-{id}, updateTitle support, handleMenuClick/handleBackClick, overflow handling, and styling/height adjustments.
Breadcrumb Item
src/components/breadcrumb/SubgraphBreadcrumbItem.vue
Reduces anchor height, shows menu when isActive or isRoot, delegates menu construction to useWorkflowActionsMenu, adds startRename with collapsed-root handling, and exposes toggleMenu via defineExpose.
Topbar: Workflow Tab
src/components/topbar/WorkflowTab.vue
Adds active-tab context-menu button, PrimeVue Menu popup, handleMenuClick telemetry, and integrates useWorkflowActionsMenu for menu items.
Topbar: Workflow Tabs
src/components/topbar/WorkflowTabs.vue
Introduces itemicon slot to render OverlayIcon for per-item overlay icons, replaces bookmarks logic with useWorkflowActionsMenu-driven menu construction, and supplies per-item overlayIcon configs.
Workflow Actions Composable
src/composables/useWorkflowActionsMenu.ts
New composable returning reactive menuItems (Rename, Duplicate, Save, Bookmark, Export, Publish, Delete, etc.), with ensureWorkflowActive, visibility/disabled rules, and integration with workflow/bookmark/command/subgraph stores.
Core Commands
src/composables/useCoreCommands.ts
Adds Comfy.RenameWorkflow command that prompts for a new filename and calls workflowService.renameWorkflow with the new path.
UI: Overlay Icon
src/components/common/OverlayIcon.vue
New component rendering a main icon with a positioned sub-icon; configurable position, offsets, scale, and shadow styling.
Tests
browser_tests/tests/menu.spec.ts
Changes menu close click target to top-right viewport coordinates using viewportSize() to compute click point.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BreadcrumbItem as SubgraphBreadcrumbItem
    participant ActionsMenu as useWorkflowActionsMenu
    participant CommandStore
    participant WorkflowService

    User->>BreadcrumbItem: Click menu button (handleClick / handleMenuClick)
    BreadcrumbItem->>ActionsMenu: request menu items / startRename
    ActionsMenu->>CommandStore: invoke command (e.g., Comfy.RenameWorkflow) or trigger action
    alt Rename via command
        CommandStore->>User: prompt for new filename
        User->>CommandStore: submit name
        CommandStore->>WorkflowService: renameWorkflow(workflow, newPath)
        WorkflowService-->>ActionsMenu: confirm rename
        ActionsMenu-->>BreadcrumbItem: update label/title via updateTitle
    else Other menu action (navigate/duplicate/etc.)
        ActionsMenu->>WorkflowService: perform action (open/navigate/duplicate)
        WorkflowService-->>CommandStore: update state
        CommandStore-->>BreadcrumbItem: reflect state changes
    end
Loading
sequenceDiagram
    participant User
    participant Breadcrumb as SubgraphBreadcrumb
    participant CommandStore
    participant Canvas

    User->>Breadcrumb: Click subgraph breadcrumb item
    Breadcrumb->>CommandStore: execute navigation command (subgraph-{id})
    CommandStore->>Canvas: switch to subgraph context
    Canvas-->>Breadcrumb: update navigationStack / active item
    Breadcrumb->>User: show breadcrumb controls (isInSubgraph = true)
    User->>Breadcrumb: Click Back button
    Breadcrumb->>CommandStore: execute ExitSubgraph
    CommandStore->>Canvas: switch to parent/root graph
    Canvas-->>Breadcrumb: clear navigationStack
    Breadcrumb->>User: hide breadcrumb controls
Loading

Possibly related PRs


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/12/2026, 10:24:55 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

🎭 Playwright Tests: ❌ Failed

Results: 502 passed, 1 failed, 1 flaky, 8 skipped (Total: 512)

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 492 / ❌ 1 / ⚠️ 0 / ⏭️ 8)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0)

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Bundle Size Report

Summary

  • Raw size: 18.9 MB baseline 18.8 MB — 🔴 +8.4 kB
  • Gzip: 3.86 MB baseline 3.85 MB — 🔴 +1.88 kB
  • Brotli: 2.94 MB baseline 2.94 MB — 🔴 +1.36 kB
  • Bundles: 98 current • 98 baseline • 41 added / 41 removed

Category Glance
Graph Workspace 🔴 +8.4 kB (1.04 MB) · Vendor & Third-Party ⚪ 0 B (9.19 MB) · Other ⚪ 0 B (4.74 MB) · App Entry Points ⚪ 0 B (3.32 MB) · Panels & Settings ⚪ 0 B (337 kB) · UI Components ⚪ 0 B (199 kB) · + 3 more

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-D8LUewsg.js (removed) 3.12 MB 🟢 -3.12 MB 🟢 -654 kB 🟢 -496 kB
assets/index-owISOgYG.js (new) 3.12 MB 🔴 +3.12 MB 🔴 +654 kB 🔴 +496 kB
assets/index-C7LYvjEY.js (removed) 200 kB 🟢 -200 kB 🟢 -44 kB 🟢 -36.4 kB
assets/index-CoK8SlX3.js (new) 200 kB 🔴 +200 kB 🔴 +44 kB 🔴 +36.4 kB
assets/index-BBzBtaxm.js (removed) 345 B 🟢 -345 B 🟢 -243 B 🟢 -203 B
assets/index-FDYQa81u.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +234 B

Status: 3 added / 3 removed

Graph Workspace — 1.04 MB (baseline 1.03 MB) • 🔴 +8.4 kB

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-OAsH342V.js (new) 1.04 MB 🔴 +1.04 MB 🔴 +200 kB 🔴 +151 kB
assets/GraphView-BFNikkAu.js (removed) 1.03 MB 🟢 -1.03 MB 🟢 -198 kB 🟢 -150 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-D1XTas-k.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.15 kB 🟢 -1.9 kB
assets/UserSelectView-DzmVZd_N.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.15 kB 🔴 +1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-BrJS2Myl.js (removed) 25.1 kB 🟢 -25.1 kB 🟢 -5.74 kB 🟢 -5 kB
assets/LegacyCreditsPanel-D4S4iOX9.js (new) 25.1 kB 🔴 +25.1 kB 🔴 +5.74 kB 🔴 +5 kB
assets/KeybindingPanel-DNggJRw3.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.12 kB
assets/KeybindingPanel-xA7wUBvo.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.13 kB
assets/ExtensionPanel-BXMmwGBH.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/ExtensionPanel-hEhYcZhV.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.3 kB
assets/AboutPanel-BlLRH9D1.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.2 kB
assets/AboutPanel-OC1CgdR-.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.2 kB
assets/ServerConfigPanel-B6X3aZL9.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.81 kB
assets/ServerConfigPanel-Cb8Vxthp.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.81 kB
assets/UserPanel-BOICu8-C.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.56 kB
assets/UserPanel-CNYc3kzl.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.57 kB
assets/settings-BbW1wrcp.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CtIClcWI.js 26 kB 26 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D_f3uAqO.js 22.4 kB 22.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DiVjuKQX.js 34.4 kB 34.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DJiF1Y59.js 25.8 kB 25.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DKkx6nFR.js 28.2 kB 28.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DX5qVgIQ.js 24.9 kB 24.9 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-pR7Ue3ei.js 26.7 kB 26.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-y_-zNlA6.js 27.5 kB 27.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-B8Hanulx.js (removed) 64.5 kB 🟢 -64.5 kB 🟢 -13.1 kB 🟢 -11.4 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DL_QBygw.js (new) 64.5 kB 🔴 +64.5 kB 🔴 +13.1 kB 🔴 +11.4 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-oYnGPoxl.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.77 kB 🟢 -7.53 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-xqEV8PhL.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.78 kB 🔴 +7.53 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CQKe7BnY.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-Dtdy9ICO.js (new) 49 kB 🔴 +49 kB 🔴 +10.6 kB 🔴 +9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DIedIjVO.js (removed) 10.9 kB 🟢 -10.9 kB 🟢 -2.89 kB 🟢 -2.56 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-OFdYd5uh.js (new) 10.9 kB 🔴 +10.9 kB 🔴 +2.9 kB 🔴 +2.55 kB
assets/ComfyQueueButton-C622l7Rd.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.29 kB
assets/ComfyQueueButton-mi57XGmM.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.57 kB 🟢 -2.28 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-Dks-TJ1I.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.45 kB 🟢 -1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-ZkZPSz62.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.46 kB 🔴 +1.32 kB
assets/WidgetButton-BxY1HMf2.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -998 B 🟢 -905 B
assets/WidgetButton-DjuCgeps.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +996 B 🔴 +898 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BrmrbfsM.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -889 B 🟢 -770 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-RU59q1I6.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +893 B 🔴 +770 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CmvGBeCh.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -686 B 🟢 -594 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DWEfpRJs.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +688 B 🔴 +598 B

Status: 9 added / 9 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-8D3D7Tix.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.59 kB
assets/keybindingService-Bhwc7mBe.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.57 kB
assets/audioService-BhulCGAj.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -962 B 🟢 -822 B
assets/audioService-DmoaTfec.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +960 B 🔴 +821 B
assets/serverConfigStore-lZrt20fn.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-boC6NZKH.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +548 B
assets/audioUtils-BpeGGXIO.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -650 B 🟢 -546 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-CIEAfgED.js (removed) 1.95 MB 🟢 -1.95 MB 🟢 -333 kB 🟢 -201 kB
assets/vendor-primevue-CvitJUGk.js (new) 1.95 MB 🔴 +1.95 MB 🔴 +333 kB 🔴 +201 kB
assets/vendor-chart-C2WamoVK.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-Da7BzmIq.js 3.9 MB 3.9 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-Ds3gPtNh.js 2.08 MB 2.08 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-WJL3cqV8.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-E9hBZNUh.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 — 4.74 MB (baseline 4.74 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-BOUYsOBg.js (removed) 29.3 kB 🟢 -29.3 kB 🟢 -6.5 kB 🟢 -5.65 kB
assets/SubscriptionRequiredDialogContent-DwGWNi7O.js (new) 29.3 kB 🔴 +29.3 kB 🔴 +6.51 kB 🔴 +5.67 kB
assets/WidgetRecordAudio-B7JL-YAO.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-CkjEPQOe.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-BlYe-BGX.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -2.99 kB
assets/AudioPreviewPlayer-BVL67Kiy.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/ValueControlPopover-Cjmc-yuT.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.52 kB
assets/ValueControlPopover-CREQlv1z.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.52 kB
assets/WidgetGalleria-BLNfbkfY.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetGalleria-DC1LECmD.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetColorPicker-ahcKFOzN.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.39 kB 🔴 +1.24 kB
assets/WidgetColorPicker-BKo7eI6V.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetTextarea-BF1uSp99.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.08 kB
assets/WidgetTextarea-F7DMMKUQ.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetMarkdown-BN3D1ERq.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetMarkdown-FRYxZnS9.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetAudioUI-BVb0CDey.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-Dwo33mfB.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetToggleSwitch-BSNVFMAL.js (new) 2.66 kB 🔴 +2.66 kB 🔴 +1.13 kB 🔴 +1.02 kB
assets/WidgetToggleSwitch-qV5AfLea.js (removed) 2.66 kB 🟢 -2.66 kB 🟢 -1.13 kB 🟢 -1.02 kB
assets/WidgetChart-515bxB6A.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +934 B 🔴 +816 B
assets/WidgetChart-DJzJLSiP.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -932 B 🟢 -820 B
assets/WidgetInputText-B7hA7Szp.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +924 B 🔴 +871 B
assets/WidgetInputText-GMzWlEa1.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -920 B 🟢 -861 B
assets/Media3DTop-CHs-JpiK.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +652 B
assets/Media3DTop-DUJQtk66.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -764 B 🟢 -649 B
assets/WidgetSelect-C-q-Ibqa.js (removed) 733 B 🟢 -733 B 🟢 -360 B 🟢 -334 B
assets/WidgetSelect-IS9CSk_C.js (new) 733 B 🔴 +733 B 🔴 +364 B 🔴 +334 B
assets/WidgetInputNumber-BwVhpRet.js (new) 673 B 🔴 +673 B 🔴 +349 B 🔴 +290 B
assets/WidgetInputNumber-DeN2eZtN.js (removed) 673 B 🟢 -673 B 🟢 -345 B 🟢 -290 B
assets/Load3D-CAWvQe_y.js (new) 424 B 🔴 +424 B 🔴 +269 B 🔴 +223 B
assets/Load3D-CBR4jUf9.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -223 B
assets/WidgetLegacy-9Th_MTm7.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -193 B
assets/WidgetLegacy-BIoNUxP5.js (new) 364 B 🔴 +364 B 🔴 +239 B 🔴 +193 B
assets/commands-7wafkPd1.js 15.6 kB 15.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-B3CjBnJe.js 14.6 kB 14.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Bbu2TJPy.js 18.1 kB 18.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-C4khqsmz.js 15.6 kB 15.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CDQ7KnIn.js 16.4 kB 16.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CtjMsXHh.js 15.4 kB 15.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CW_l758_.js 16.1 kB 16.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DbX4HUlI.js 15.6 kB 15.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DiGLEtFT.js 16.9 kB 16.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-vRVJOWju.js 14.8 kB 14.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-AHzlz6Hv.js 106 kB 106 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B-yEiomY.js 106 kB 106 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BdD2EpUU.js 149 kB 149 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CLN9TbD-.js 108 kB 108 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CSUSXmMZ.js 123 kB 123 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-De35cJhO.js 129 kB 129 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DmGxyfV2.js 110 kB 110 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DqO_HJuV.js 94.1 kB 94.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-fjwyoOAj.js 94.9 kB 94.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Ic_H-Vim.js 113 kB 113 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DIQlZoPQ.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-C3CvQRZ8.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-euoHxxM5.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B-XzzBeS.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BGwoeek4.js 329 kB 329 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-C6xl5-mL.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CRZGOJB7.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D8-Yzlzh.js 289 kB 289 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Du8VrAwA.js 320 kB 320 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-jjlLVrIs.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-JQwk1kgy.js 292 kB 292 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-JuuXdMpv.js 391 kB 391 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-l2Y20bod.js 314 kB 314 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DOYclIRS.js 3.21 kB 3.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: 17 added / 17 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 +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 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.

@comfydesigner
Copy link
Collaborator

Is it possible to also put "Export, "Export (API)", and "Bookmark" into this menu as well?

Screenshot 2026-01-08 at 11 17 06 AM

Into

image

@comfydesigner
Copy link
Collaborator

Thoughts on also showing this menu on right clicking the tab too? We should utilize right click more (long press on mobile)
Screenshot 2026-01-08 at 11 26 08 AM

To keep the functionality I suppose we should throw the other tab closing options in here as well, but I'm not sure how often they're used. They're more dangerous than just closing the current workflow, so placing them at the bottom away from the other actions is preferred. Maybe these extra tab options should only show up when right clicking? Thoughts?
Screenshot 2026-01-08 at 11 26 23 AM

- add overlay icon for close tab variants
- simplify subgraphbreadcrumb ref handling
- refactor breadcrumb menu composable to more generic
- ensure actions that require active workflow set it
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 9, 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: 4

🤖 Fix all issues with AI agents
In @src/components/breadcrumb/SubgraphBreadcrumb.vue:
- Around line 95-109: The breadcrumb home computed's command currently throws a
TypeError when canvas.graph is missing; instead catch and handle this case:
update the command function inside the home computed (the command property on
the computed returned object) to check for canvas and canvas.graph early, and if
missing log the error via the existing logger/telemetry and show a user-facing
notification or toast (or disable/return early) rather than throwing; ensure you
still call useTelemetry()?.trackUiButtonClicked and only call
canvas.setGraph(canvas.graph.rootGraph) when canvas.graph is valid, and add a
clear telemetry/log message and a user notification to surface the problem.
- Around line 16-33: Replace the PrimeVue <Button> usages in
SubgraphBreadcrumb.vue with the repo’s IconButton component: add an import for
IconButton, swap the two <Button> elements (the menu button that calls
handleMenuClick and the conditional back button that calls handleBackClick) to
use IconButton, keep the existing class attributes and click handlers, set the
menu icon to "pi pi-bars" and the back icon to "lucide--undo-2", and remove
PrimeVue-specific props (text, severity, size) in favor of IconButton’s API so
the visual/behavioral intent is preserved.

In @src/components/topbar/WorkflowTab.vue:
- Around line 10-18: The icon-only context menu Button (rendered when
isActiveTab) lacks an accessible name; add an aria-label to the Button (the same
component that uses @click.stop="handleMenuClick") using the i18n key (e.g.
$t('g.menu') or $t('tabMenu.contextMenu')) so screen readers get a meaningful
label, and ensure the chosen key exists in src/locales/en/main.json (or add it)
with appropriate text.

In @src/composables/useCoreCommands.ts:
- Around line 185-204: The Rename Workflow menu action (id
'Comfy.RenameWorkflow') calls workflowService.renameWorkflow without protection;
wrap the await workflowService.renameWorkflow(workflow, newPath) call in a
try-catch, and on catch show a user-visible error dialog (e.g., via
dialogService.alert or similar) with a translated title and the caught error
message so filesystem/permission/path errors don't become unhandled rejections.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

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

📒 Files selected for processing (7)
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/topbar/WorkflowTabs.vue
  • src/composables/useCoreCommands.ts
  • src/composables/useWorkflowActionsMenu.ts
🧰 Additional context used
📓 Path-based instructions (13)
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

src/**/*.vue: Use Vue 3 Single File Components (SFCs) with Composition API only; never use Options API
Use <script setup lang="ts"> syntax for component logic
Use Tailwind 4 utility classes for styling; avoid <style> blocks in Vue components
Do not use the dark: Tailwind variant; use semantic values from style.css theme instead (e.g., bg-node-component-surface)
Use cn() utility from @/utils/tailwindUtil for merging class names; never use :class="[]" syntax
Never use !important or the ! prefix for Tailwind classes; find and fix interfering classes instead
Use Tailwind fraction utilities instead of arbitrary percentages (e.g., w-4/5 instead of w-[80%], w-1/2 instead of w-[50%])
Use Vue 3.5 TypeScript style default prop declaration with destructuring; avoid withDefaults and runtime props
Use defineModel for v-model bindings instead of separately defining props and emits
Prefer reactive props destructuring over const props = defineProps<...>
Define slots via template usage, not defineSlots
Use same-name shorthand for slot prop bindings (e.g., :isExpanded instead of :is-expanded="isExpanded")
Use ref for reactive state, computed() for computed properties, and watch/watchEffect for side effects
Avoid using ref and watch t...

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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

Leverage VueUse functions for performance-enhancing utilities

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/composables/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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

src/**/*.{ts,tsx,vue}: Use separate import type statements; do not mix inline type imports in the same statement
Sort and group imports by plugin; run pnpm format before committing
Derive component types using vue-component-type-helpers (ComponentProps, ComponentSlots) instead of separate type files
Code should be well-designed with clear names for everything; write code that is expressive and self-documenting
Avoid redundant comments and clean up code as you go; comments should explain why, not what
Ask if there is a simpler way to implement functionality; refactor complex code to simplify it
Minimize nesting depth (e.g., if () { ... } or for () { ... }); watch for arrow anti-pattern
Watch out for code smells and refactor to avoid them
Never use any type; use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Indent with 2 spaces; use single quotes; no trailing semicolons; max line width 80 (per .prettierrc)
Complex type definitions used in multiple related places should be extracted and named for reuse
Implement proper error handling

Files:

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

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/composables/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/composables/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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

Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.vue
src/**/*.ts

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

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

src/**/*.ts: Minimize the surface area (exported values) of each module and composable
Use es-toolkit for utility functions

Files:

  • src/composables/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.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/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
src/composables/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the useXyz.ts pattern

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx}: Keep functions short and functional; use function declarations instead of function expressions when possible
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • src/composables/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
🧠 Learnings (45)
📚 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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • 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 InlineMessage component with Message

Applied to files:

  • src/components/common/OverlayIcon.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/common/OverlayIcon.vue
  • 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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.vue
📚 Learning: 2026-01-08T02:26:18.357Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7893
File: src/components/button/IconGroup.vue:5-6
Timestamp: 2026-01-08T02:26:18.357Z
Learning: In components that use the cn utility from '@/utils/tailwindUtil' with tailwind-merge, rely on the behavior that conflicting Tailwind classes are resolved by keeping the last one. For example, cn('base-classes bg-default', propClass) will have any conflicting background class from propClass override bg-default. This additive pattern is intentional and aligns with the shadcn-ui convention; ensure you document or review expectations accordingly in Vue components.

Applied to files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/composables/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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 TabMenu component with Tabs without panels

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2025-12-12T23:02:37.473Z
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.

Applied to files:

  • src/components/topbar/WorkflowTab.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/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/topbar/WorkflowTabs.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.{vue,ts} : Leverage VueUse functions for performance-enhancing utilities

Applied to files:

  • src/components/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTab.vue
  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
  • src/components/topbar/WorkflowTabs.vue
📚 Learning: 2026-01-09T07:29:27.929Z
Learnt from: LittleSound
Repo: Comfy-Org/ComfyUI_frontend PR: 7812
File: src/components/rightSidePanel/RightSidePanel.vue:100-132
Timestamp: 2026-01-09T07:29:27.929Z
Learning: The `findParentGroupInGraph` function in `src/components/rightSidePanel/RightSidePanel.vue` is a temporary workaround for a bug where group sub-items were not updating correctly after a page refresh. It can be removed once that underlying bug is fixed.

Applied to files:

  • 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 : Use ref/reactive for state management 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 : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.vue : Use `ref` for reactive state, `computed()` for computed properties, and `watch`/`watchEffect` for side effects

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 : Utilize ref and reactive for reactive state

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.vue : Avoid using `ref` and `watch` together if a `computed` would work instead

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.vue : Use vue-i18n in Composition API for any string literals; place new translations in `src/locales/en/main.json`

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumbItem.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/composables/**/*.ts : Name composables using the `useXyz.ts` pattern

Applied to files:

  • src/composables/useWorkflowActionsMenu.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/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.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/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.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/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.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/useWorkflowActionsMenu.ts
  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.{vue,ts} : Implement proper error handling

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper error handling

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 : Implement cleanup for async operations in Vue components

Applied to files:

  • src/components/breadcrumb/SubgraphBreadcrumb.vue
📚 Learning: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.vue : Avoid new usage of PrimeVue components

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: 2026-01-09T00:50:57.103Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-09T00:50:57.103Z
Learning: Applies to src/**/*.vue : Use `<script setup lang="ts">` syntax for component logic

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
📚 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 useIntersectionObserver for visibility detection instead of custom scroll handlers

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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 : Utilize Vue 3's Teleport component when needed

Applied to files:

  • src/components/topbar/WorkflowTabs.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/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • src/components/topbar/WorkflowTabs.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: lint-and-format
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (13)
src/composables/useWorkflowActionsMenu.ts (2)

67-76: Consider consistency in active workflow handling.

The Rename action (lines 67-76) calls ensureWorkflowActive before startRename(), but the startRename callback eventually executes Comfy.RenameWorkflow, which also checks and uses the active workflow. Since the command in useCoreCommands.ts (line 191) directly accesses workflowStore.activeWorkflow, the ensureWorkflowActive call here ensures the correct workflow is active when the rename dialog opens. This is correct, but consider documenting this coordination pattern.


89-109: LGTM! Proper separation of Save actions.

The Save and Save As menu items correctly use the command store to execute their respective commands, ensuring consistency with keyboard shortcuts and other invocation paths. The separator on line 98 appropriately groups these actions.

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

46-61: LGTM! Menu component properly configured.

The Menu component is correctly set up with popup mode, appropriate styling via PrimeVue's passthrough props, and conditional rendering for performance optimization.


148-150: Verify command execution pattern.

The composable is invoked with () => useCommandStore().execute('Comfy.RenameWorkflow') as the startRename callback. This pattern works, but consider whether it's better to pass a ref to commandStore created at setup time (line 81 shows useCommandStore() is available). Current implementation is fine but creates a new store instance on each rename invocation.

♻️ Optional: Use setup-time store reference
+const commandStore = useCommandStore()
+
 const { menuItems } = useWorkflowActionsMenu(() =>
-  useCommandStore().execute('Comfy.RenameWorkflow')
+  commandStore.execute('Comfy.RenameWorkflow')
 )

Note: Both patterns are valid; this is a micro-optimization.

Likely an incorrect or invalid review comment.

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

27-40: LGTM! Menu visibility logic updated correctly.

The Menu component now renders when isActive || isRoot (line 28), which is necessary for the collapsed breadcrumb feature where the root item may be visible but not marked as active. This ensures users can access the workflow menu from the root breadcrumb item even when navigated into subgraphs.


189-195: LGTM! Proper use of defineExpose for imperative API.

The toggleMenu method (lines 189-195) is correctly exposed via defineExpose, following the guideline to use defineExpose only for imperative operations. This allows parent components (like SubgraphBreadcrumb.vue) to programmatically trigger the menu.


139-158: The offsetParent === null check appropriately detects when the breadcrumb collapses.

The startRename function uses offsetParent === null to detect when the root breadcrumb item is hidden, falling back to the command-based rename dialog. This is correct for this specific use case because the collapse mechanism (in SubgraphBreadcrumb.vue lines 294–305) exclusively uses CSS display: none via Tailwind's hidden class to hide breadcrumb items—no position: fixed or element removal occurs. The element remains in the DOM, so offsetParent reliably indicates visibility state here.

src/components/topbar/WorkflowTabs.vue (3)

70-84: LGTM! Custom icon slot implementation.

The itemicon slot template (lines 70-84) properly handles both overlay icons and regular icons, with all necessary props bound to the OverlayIcon component. This enables the visual distinction for composite actions like "Close Tabs To Right".


190-196: Verify includeDelete: false reasoning.

The useWorkflowActionsMenu composable is invoked with includeDelete: false (line 193). This prevents the Delete action from appearing in the tab context menu. Confirm this is intentional, as users might expect to delete workflows from tab right-click menus (though it could be considered too destructive for that context).

Based on the PR objectives and comments, verify whether:

  1. Delete should be available in tab context menus
  2. If not, whether it's accessible through other UI paths (e.g., breadcrumb menu, file browser)

204-251: No action required — overlayIcon property structure is correct.

The overlayIcon objects correctly use main, sub, positionX, positionY, and scale properties, which properly map to the OverlayIcon component's mainIcon, subIcon, positionX, positionY, and subIconScale props. The offsetX and offsetY props are optional with default values in the OverlayIcon component, so omitting them is valid. No TypeScript errors occur.

Likely an incorrect or invalid review comment.

src/components/common/OverlayIcon.vue (1)

1-64: LGTM! Well-designed overlay icon component.

The component correctly implements:

  • Vue 3.5 destructured props with defaults
  • Tailwind CSS with the cn utility for dynamic classes
  • Proper TypeScript typing
  • Font-relative sizing (1em) for flexible icon scaling
  • Multi-directional text shadow for visual consistency
  • Dynamic positioning logic based on props

The implementation is clean and follows all coding guidelines.

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

44-44: LGTM! Improved ref handling and active item detection.

The refactor to use item.key for active item detection is more robust than object identity comparison. The setItemRef callback correctly captures the root item reference for menu operations.

Also applies to: 46-46, 81-85, 137-137


150-156: Acceptable approach for accessing PrimeVue internals.

The type assertion and DOM query to access the internal breadcrumb list element is necessary for overflow handling. While not ideal, it's a pragmatic solution given the constraints of working with PrimeVue component internals.

Comment on lines +16 to +33
<Button
class="context-menu-button pointer-events-auto h-8 w-8 shrink-0 border border-transparent bg-transparent p-0 transition-all hover:rounded-lg hover:border-interface-stroke hover:bg-comfy-menu-bg"
icon="pi pi-bars"
text
severity="secondary"
size="small"
@click="handleMenuClick"
/>
<Button
v-if="isInSubgraph"
class="back-button pointer-events-auto h-8 w-8 shrink-0 border border-transparent bg-transparent p-0 transition-all hover:rounded-lg hover:border-interface-stroke hover:bg-comfy-menu-bg"
text
severity="secondary"
size="small"
@click="handleBackClick"
>
<i class="icon-[lucide--undo-2]" />
</Button>
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

Replace PrimeVue Button with IconButton from common components.

The new menu and back buttons use PrimeVue's Button component directly, which violates the coding guideline to avoid new PrimeVue usage and prefer the repo's common button components.

Based on coding guidelines, the project prefers common button components from src/components/button/.

♻️ Proposed refactor to use IconButton

Update the import:

-import Button from 'primevue/button'
+import IconButton from '@/components/button/IconButton.vue'

Replace the menu button:

-    <Button
-      class="context-menu-button pointer-events-auto h-8 w-8 shrink-0 border border-transparent bg-transparent p-0 transition-all hover:rounded-lg hover:border-interface-stroke hover:bg-comfy-menu-bg"
-      icon="pi pi-bars"
-      text
-      severity="secondary"
-      size="small"
-      @click="handleMenuClick"
-    />
+    <IconButton
+      class="context-menu-button"
+      icon="pi pi-bars"
+      @click="handleMenuClick"
+    />

Replace the back button:

-    <Button
-      v-if="isInSubgraph"
-      class="back-button pointer-events-auto h-8 w-8 shrink-0 border border-transparent bg-transparent p-0 transition-all hover:rounded-lg hover:border-interface-stroke hover:bg-comfy-menu-bg"
-      text
-      severity="secondary"
-      size="small"
-      @click="handleBackClick"
-    >
-      <i class="icon-[lucide--undo-2]" />
-    </Button>
+    <IconButton
+      v-if="isInSubgraph"
+      class="back-button"
+      icon="icon-[lucide--undo-2]"
+      @click="handleBackClick"
+    />

Also applies to: 58-58

🤖 Prompt for AI Agents
In @src/components/breadcrumb/SubgraphBreadcrumb.vue around lines 16 - 33,
Replace the PrimeVue <Button> usages in SubgraphBreadcrumb.vue with the repo’s
IconButton component: add an import for IconButton, swap the two <Button>
elements (the menu button that calls handleMenuClick and the conditional back
button that calls handleBackClick) to use IconButton, keep the existing class
attributes and click handlers, set the menu icon to "pi pi-bars" and the back
icon to "lucide--undo-2", and remove PrimeVue-specific props (text, severity,
size) in favor of IconButton’s API so the visual/behavioral intent is preserved.

Comment on lines +95 to +109
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

Consider improving error handling for missing graph.

The code throws a TypeError when canvas.graph is missing. While this surfaces the issue during development, it provides no user feedback and doesn't follow proper error handling patterns.

Consider one of these approaches:

  • Log the error and gracefully disable the command
  • Show a user-facing error message via a toast/notification
  • Guard the command execution earlier to prevent invalid states
💡 Example: Graceful error handling
  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('[SubgraphBreadcrumb] 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('[SubgraphBreadcrumb] Canvas has no graph')
return
}
canvas.setGraph(canvas.graph.rootGraph)
}
}))
🤖 Prompt for AI Agents
In @src/components/breadcrumb/SubgraphBreadcrumb.vue around lines 95 - 109, The
breadcrumb home computed's command currently throws a TypeError when
canvas.graph is missing; instead catch and handle this case: update the command
function inside the home computed (the command property on the computed returned
object) to check for canvas and canvas.graph early, and if missing log the error
via the existing logger/telemetry and show a user-facing notification or toast
(or disable/return early) rather than throwing; ensure you still call
useTelemetry()?.trackUiButtonClicked and only call
canvas.setGraph(canvas.graph.rootGraph) when canvas.graph is valid, and add a
clear telemetry/log message and a user notification to surface the problem.

Comment on lines +10 to +18
<Button
v-if="isActiveTab"
class="context-menu-button -mx-1 w-auto px-1 py-0"
variant="muted-textonly"
size="icon-sm"
@click.stop="handleMenuClick"
>
<i class="pi pi-bars" />
</Button>
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

Add accessible label to context menu button.

The context menu button (lines 10-18) displays only an icon without visible text. According to coding guidelines and learnings, icon-only buttons should have an aria-label to provide an accessible name for screen readers.

♿ Add aria-label
     <Button
       v-if="isActiveTab"
       class="context-menu-button -mx-1 w-auto px-1 py-0"
       variant="muted-textonly"
       size="icon-sm"
+      :aria-label="t('g.menu')"
       @click.stop="handleMenuClick"
     >
       <i class="pi pi-bars" />
     </Button>

Note: Ensure the g.menu i18n key exists in src/locales/en/main.json, or use an appropriate existing key like 'tabMenu.contextMenu'.

🤖 Prompt for AI Agents
In @src/components/topbar/WorkflowTab.vue around lines 10 - 18, The icon-only
context menu Button (rendered when isActiveTab) lacks an accessible name; add an
aria-label to the Button (the same component that uses
@click.stop="handleMenuClick") using the i18n key (e.g. $t('g.menu') or
$t('tabMenu.contextMenu')) so screen readers get a meaningful label, and ensure
the chosen key exists in src/locales/en/main.json (or add it) with appropriate
text.

@pythongosssss pythongosssss added the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 9, 2026
@github-actions github-actions bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jan 9, 2026
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jan 9, 2026
@comfydesigner
Copy link
Collaborator

Speedy right clicks show a context menu that would be hidden under the tooltip or workflow preview. No issues when manually clicking on the "menu" button of an active tab though

Screenshot 2026-01-10 at 6 54 57 PM

@comfydesigner
Copy link
Collaborator

comfydesigner commented Jan 11, 2026

image

Perhaps when right clicking on a tab, it should close the older menu that was triggered from the button?
Thanks for adding better distinguishing icons for the "Close tab" variants btw.


(Also a future iteration for the close tab variants could be to hide them behind a submenu? No need to take action on this yet)

I could see the list as:

| Clear workflow |
| Close specific tabs > |
| Close tab |
Screenshot 2026-01-10 at 7 00 31 PM

@christian-byrne
Copy link
Contributor

@pythongosssss Sorry there is a conflict after merging #7853 (seemingly)

@fengsi fengsi added preview and removed preview labels Jan 11, 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: 2

🤖 Fix all issues with AI agents
In @src/components/topbar/WorkflowTabs.vue:
- Around line 222-275: The overlayIcon objects inside the computed
contextMenuItems use wrong prop names and must be renamed to match the
OverlayIcon component: in each overlayIcon object (the ones on the
closeTabsToLeft, closeTabsToRight and closeOtherTabs menu items) change main →
mainIcon, sub → subIcon, and scale → subIconScale so the OverlayIcon receives
mainIcon, subIcon and subIconScale; keep the existing values and positions
otherwise and ensure the computed contextMenuItems retains the same structure
and disabled/command behavior.

In @src/composables/useCoreCommands.ts:
- Around line 191-210: The RenameWorkflow command (id 'Comfy.RenameWorkflow')
lacks validation, sanitization, error handling and user feedback; wrap the async
flow (dialogService.prompt and workflowService.renameWorkflow) in a try/catch,
validate and sanitize the user input (strip any trailing ".json", disallow path
traversal sequences like "../" or "..\\", and reject characters invalid for
filenames), build the new path safely using the workflow.directory plus the
sanitized filename and a single ".json" suffix (avoid simple string
concatenation), call workflowService.renameWorkflow(workflow, newPath) inside
the try and show success via
toastService.success(t('workflowService.workflowRenamed')), and on error show
toastService.error(t('workflowService.renameFailed')) while logging the caught
error for debugging; ensure you use the existing symbols workflow.filename,
workflow.directory, dialogService.prompt and workflowService.renameWorkflow and
add the translation keys suggested for messages.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3df3672 and 0b460a3.

⛔ Files ignored due to path filters (4)
  • browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-settings-dialog-mobile-chrome-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/widgets/load/uploadWidgets.spec.ts-snapshots/vue-nodes-upload-widgets-chromium-linux.png is excluded by !**/*.png
  • browser_tests/tests/widget.spec.ts-snapshots/image-preview-changed-by-combo-value-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • src/components/topbar/WorkflowTabs.vue
  • src/composables/useCoreCommands.ts
🧰 Additional context used
📓 Path-based instructions (14)
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/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.vue
src/**/*.ts

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

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

src/**/*.ts: Derive component types using vue-component-type-helpers (ComponentProps, ComponentSlots) instead of separate type files
Use es-toolkit for utility functions
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones

Files:

  • src/composables/useCoreCommands.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/**/*.{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

src/**/*.{ts,tsx,vue}: Use separate import type statements instead of inline type in mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, run pnpm format before committing
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them

Files:

  • src/composables/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.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/composables/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/composables/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.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/composables/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.vue
src/composables/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables as useXyz.ts (e.g., useForm.ts)

Files:

  • src/composables/useCoreCommands.ts
src/**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,vue}: Use ref for reactive state, computed() for derived values, and watch/watchEffect for side effects in Composition API
Avoid using ref with watch if a computed would suffice - minimize refs and derived state
Use provide/inject for dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals

Files:

  • src/composables/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.vue
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx}: Keep functions short and functional
Minimize nesting (if statements, for loops, etc.)
Use function declarations instead of function expressions when possible

Files:

  • src/composables/useCoreCommands.ts
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

src/**/*.vue: Use Vue 3 Single File Components (SFCs) with Composition API only
Use <script setup lang="ts"> for component logic in Vue SFCs
Avoid <style> blocks in Vue components - use Tailwind 4 styling instead
Use vue-i18n for all string literals in Vue components - place translation entries in src/locales/en/main.json
Use Tailwind utility classes instead of dark: variant - use semantic values from style.css theme (e.g., bg-node-component-surface)
Use cn() utility from @/utils/tailwindUtil for merging Tailwind class names instead of :class="[]" or hardcoding
Never use !important or ! Tailwind prefix - fix interfering classes instead
Use Tailwind fraction utilities instead of arbitrary percentage values (e.g., w-4/5 instead of w-[80%])
Use TypeScript Vue 3.5 style default prop declaration with reactive props destructuring - avoid withDefaults or runtime props
Prefer defineModel over separately defining a prop and emit for v-model bindings
Define slots via template usage, not via defineSlots
Use same-name shorthand for slot prop bindings (e.g., :isExpanded instead of :is-expanded="isExpanded")
Do not import Vue macros unnecessarily
Avoid new usage of PrimeVue components
Use Tailwind's plurals system via i18n instead of hardcoding ...

Files:

  • src/components/topbar/WorkflowTabs.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

Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
🧠 Learnings (27)
📚 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} : Implement proper error handling

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-12-12T23:02:37.473Z
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.

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2026-01-06T19:17:12.355Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7746
File: src/platform/assets/composables/useUploadModelWizard.ts:207-219
Timestamp: 2026-01-06T19:17:12.355Z
Learning: In `src/platform/assets/composables/useUploadModelWizard.ts`, the `uploadModel()` function should have a concurrency guard at the beginning that checks if `isUploading.value` is already true and returns false early to prevent race conditions from multiple rapid invocations.

Applied to files:

  • src/composables/useCoreCommands.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/useCoreCommands.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
📚 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
📚 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
📚 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/useCoreCommands.ts
  • src/components/topbar/WorkflowTabs.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 TabMenu component with Tabs without panels

Applied to files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Leverage VueUse functions for performance-enhancing composables

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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 useIntersectionObserver for visibility detection instead of custom scroll handlers

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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 : Utilize Vue 3's Teleport component when needed

Applied to files:

  • src/components/topbar/WorkflowTabs.vue
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Use VueUse function for useI18n in composition API for string literals

Applied to files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
📚 Learning: 2026-01-08T02:26:18.357Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7893
File: src/components/button/IconGroup.vue:5-6
Timestamp: 2026-01-08T02:26:18.357Z
Learning: In components that use the cn utility from '@/utils/tailwindUtil' with tailwind-merge, rely on the behavior that conflicting Tailwind classes are resolved by keeping the last one. For example, cn('base-classes bg-default', propClass) will have any conflicting background class from propClass override bg-default. This additive pattern is intentional and aligns with the shadcn-ui convention; ensure you document or review expectations accordingly in Vue components.

Applied to files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
⏰ 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). (3)
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (3)
src/components/topbar/WorkflowTabs.vue (3)

83-97: LGTM! Clean template structure with proper conditionals.

The itemicon slot implementation correctly handles both overlay icons and simple icons with appropriate fallbacks. The conditional rendering pattern is clear and follows Vue best practices.


111-111: LGTM! Import changes align with new functionality.

The new imports for OverlayIcon, useWorkflowActionsMenu, and commandStore are properly structured and support the enhanced menu functionality.

Also applies to: 119-119, 123-123, 145-145


214-220: No action needed — error handling is already in place.

The commandStore.execute() method wraps all command execution with wrapWithErrorHandlingAsync, which includes a try-catch block that automatically catches errors and displays them to the user via toastErrorHandler. Errors in the Comfy.RenameWorkflow command will not propagate as unhandled rejections; they are caught and shown in a toast notification.

Likely an incorrect or invalid review comment.

Comment on lines +191 to +210
{
id: 'Comfy.RenameWorkflow',
icon: 'pi pi-pencil',
label: 'Rename Workflow',
menubarLabel: 'Rename',
function: async () => {
const workflow = workflowStore.activeWorkflow
if (!workflow || !workflow.isPersisted) return

const newName = await dialogService.prompt({
title: t('g.rename'),
message: t('workflowService.enterFilename') + ':',
defaultValue: workflow.filename
})
if (!newName || newName === workflow.filename) return

const newPath = workflow.directory + '/' + newName + '.json'
await workflowService.renameWorkflow(workflow, newPath)
}
},
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

Add error handling and input validation for the rename workflow command.

The command has several critical and major issues:

  1. Missing error handling: No try-catch blocks around async operations. If dialogService.prompt() or workflowService.renameWorkflow() throw, the error will be unhandled.

  2. Path construction vulnerability (line 207): The path is built using string concatenation without sanitization. If the user enters myfile.json, the result becomes directory/myfile.json.json. Additionally, there's no validation to prevent path traversal characters (e.g., ../, ..\\) or invalid filename characters.

  3. No filename validation: Line 205 only checks if newName is truthy and different, but doesn't validate it's safe or appropriate as a filename.

  4. No user feedback: Unlike other commands in this file, there's no success/failure toast notification.

🛡️ Proposed fix with error handling and validation
    {
      id: 'Comfy.RenameWorkflow',
      icon: 'pi pi-pencil',
      label: 'Rename Workflow',
      menubarLabel: 'Rename',
      function: async () => {
-       const workflow = workflowStore.activeWorkflow
-       if (!workflow || !workflow.isPersisted) return
-
-       const newName = await dialogService.prompt({
-         title: t('g.rename'),
-         message: t('workflowService.enterFilename') + ':',
-         defaultValue: workflow.filename
-       })
-       if (!newName || newName === workflow.filename) return
-
-       const newPath = workflow.directory + '/' + newName + '.json'
-       await workflowService.renameWorkflow(workflow, newPath)
+       try {
+         const workflow = workflowStore.activeWorkflow
+         if (!workflow || !workflow.isPersisted) return
+
+         const newName = await dialogService.prompt({
+           title: t('g.rename'),
+           message: t('workflowService.enterFilename') + ':',
+           defaultValue: workflow.filename
+         })
+         if (!newName || newName === workflow.filename) return
+
+         // Validate filename
+         const sanitizedName = newName.trim()
+         if (!sanitizedName || /[<>:"|?*\\/]/.test(sanitizedName)) {
+           toastStore.add({
+             severity: 'error',
+             summary: t('g.error'),
+             detail: t('workflowService.invalidFilename'),
+             life: 3000
+           })
+           return
+         }
+
+         // Remove .json extension if user provided it
+         const nameWithoutExt = sanitizedName.replace(/\.json$/i, '')
+         const newPath = `${workflow.directory}/${nameWithoutExt}.json`
+         
+         await workflowService.renameWorkflow(workflow, newPath)
+         
+         toastStore.add({
+           severity: 'success',
+           summary: t('g.success'),
+           detail: t('workflowService.workflowRenamed'),
+           life: 3000
+         })
+       } catch (error) {
+         toastStore.add({
+           severity: 'error',
+           summary: t('g.error'),
+           detail: t('workflowService.renameFailed'),
+           life: 3000
+         })
+         console.error('Failed to rename workflow:', error)
+       }
      }
    },

Note: Add corresponding translation keys to src/locales/en/main.json:

{
  "workflowService": {
    "invalidFilename": "Invalid filename. Avoid special characters like < > : \" | ? * / \\",
    "workflowRenamed": "Workflow renamed successfully",
    "renameFailed": "Failed to rename workflow"
  }
}

Based on learnings, proper error handling is required throughout the codebase.

🤖 Prompt for AI Agents
In @src/composables/useCoreCommands.ts around lines 191 - 210, The
RenameWorkflow command (id 'Comfy.RenameWorkflow') lacks validation,
sanitization, error handling and user feedback; wrap the async flow
(dialogService.prompt and workflowService.renameWorkflow) in a try/catch,
validate and sanitize the user input (strip any trailing ".json", disallow path
traversal sequences like "../" or "..\\", and reject characters invalid for
filenames), build the new path safely using the workflow.directory plus the
sanitized filename and a single ".json" suffix (avoid simple string
concatenation), call workflowService.renameWorkflow(workflow, newPath) inside
the try and show success via
toastService.success(t('workflowService.workflowRenamed')), and on error show
toastService.error(t('workflowService.renameFailed')) while logging the caught
error for debugging; ensure you use the existing symbols workflow.filename,
workflow.directory, dialogService.prompt and workflowService.renameWorkflow and
add the translation keys suggested for messages.

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

🤖 Fix all issues with AI agents
In @src/components/common/OverlayIcon.vue:
- Around line 23-29: The Position union is too broad; create two specific types
(e.g., HorizontalPosition = 'left' | 'right' and VerticalPosition = 'top' |
'bottom') and update the OverlayIconProps to use positionX?: HorizontalPosition
and positionY?: VerticalPosition instead of Position; also update any
occurrences that reference Position (props definitions, default values, prop
validators, or usages in methods/templates) to use the new types so horizontal
and vertical props cannot be assigned invalid values.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b460a3 and a28b60c.

📒 Files selected for processing (2)
  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.vue
🧰 Additional context used
📓 Path-based instructions (10)
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

src/**/*.vue: Use Vue 3 Single File Components (SFCs) with Composition API only
Use <script setup lang="ts"> for component logic in Vue SFCs
Avoid <style> blocks in Vue components - use Tailwind 4 styling instead
Use vue-i18n for all string literals in Vue components - place translation entries in src/locales/en/main.json
Use Tailwind utility classes instead of dark: variant - use semantic values from style.css theme (e.g., bg-node-component-surface)
Use cn() utility from @/utils/tailwindUtil for merging Tailwind class names instead of :class="[]" or hardcoding
Never use !important or ! Tailwind prefix - fix interfering classes instead
Use Tailwind fraction utilities instead of arbitrary percentage values (e.g., w-4/5 instead of w-[80%])
Use TypeScript Vue 3.5 style default prop declaration with reactive props destructuring - avoid withDefaults or runtime props
Prefer defineModel over separately defining a prop and emit for v-model bindings
Define slots via template usage, not via defineSlots
Use same-name shorthand for slot prop bindings (e.g., :isExpanded instead of :is-expanded="isExpanded")
Do not import Vue macros unnecessarily
Avoid new usage of PrimeVue components
Use Tailwind's plurals system via i18n instead of hardcoding ...

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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

src/**/*.{ts,tsx,vue}: Use separate import type statements instead of inline type in mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, run pnpm format before committing
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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

Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.vue
src/**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,vue}: Use ref for reactive state, computed() for derived values, and watch/watchEffect for side effects in Composition API
Avoid using ref with watch if a computed would suffice - minimize refs and derived state
Use provide/inject for dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals

Files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.vue
🧠 Learnings (21)
📚 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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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 InlineMessage component with Message

Applied to files:

  • src/components/common/OverlayIcon.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.vue
📚 Learning: 2026-01-08T02:26:18.357Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7893
File: src/components/button/IconGroup.vue:5-6
Timestamp: 2026-01-08T02:26:18.357Z
Learning: In components that use the cn utility from '@/utils/tailwindUtil' with tailwind-merge, rely on the behavior that conflicting Tailwind classes are resolved by keeping the last one. For example, cn('base-classes bg-default', propClass) will have any conflicting background class from propClass override bg-default. This additive pattern is intentional and aligns with the shadcn-ui convention; ensure you document or review expectations accordingly in Vue components.

Applied to files:

  • src/components/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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/common/OverlayIcon.vue
  • src/components/topbar/WorkflowTabs.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 TabMenu component with Tabs without panels

Applied to files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.vue
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Leverage VueUse functions for performance-enhancing composables

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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 useIntersectionObserver for visibility detection instead of custom scroll handlers

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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/topbar/WorkflowTabs.vue
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Use VueUse function for useI18n in composition API for string literals

Applied to files:

  • src/components/topbar/WorkflowTabs.vue
⏰ 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). (3)
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (4)
src/components/common/OverlayIcon.vue (1)

1-65: LGTM!

Clean implementation following Vue 3.5 Composition API patterns. Good use of cn() for class composition, proper reactive prop destructuring, and computed style for dynamic properties.

src/components/topbar/WorkflowTabs.vue (3)

83-88: LGTM!

Clean slot implementation with proper conditional rendering. The v-bind spread pattern correctly passes overlayIcon props to the OverlayIcon component.


102-103: LGTM!

Imports correctly use separate import type statement for OverlayIconProps as per coding guidelines.

Also applies to: 111-111


214-267: LGTM!

The contextMenuItems computed property is well-structured:

  • Properly spreads baseMenuItems.value for shared workflow actions
  • Consistent overlayIcon configuration across close tab variants
  • Correct index-based disabled states for edge cases

Comment on lines +23 to +29
type Position = 'top' | 'bottom' | 'left' | 'right'
export interface OverlayIconProps {
mainIcon: string
subIcon: string
positionX?: Position
positionY?: Position
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

Refine Position type for better type safety.

The Position type allows 'top' | 'bottom' | 'left' | 'right' for both positionX and positionY, but semantically positionX should only accept horizontal values and positionY should only accept vertical values. This could lead to invalid usage like positionX: 'top'.

♻️ Suggested improvement
-type Position = 'top' | 'bottom' | 'left' | 'right'
+type PositionX = 'left' | 'right'
+type PositionY = 'top' | 'bottom'

 export interface OverlayIconProps {
   mainIcon: string
   subIcon: string
-  positionX?: Position
-  positionY?: Position
+  positionX?: PositionX
+  positionY?: PositionY
   offsetX?: number
   offsetY?: number
   subIconScale?: number
 }
📝 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
type Position = 'top' | 'bottom' | 'left' | 'right'
export interface OverlayIconProps {
mainIcon: string
subIcon: string
positionX?: Position
positionY?: Position
type PositionX = 'left' | 'right'
type PositionY = 'top' | 'bottom'
export interface OverlayIconProps {
mainIcon: string
subIcon: string
positionX?: PositionX
positionY?: PositionY
🤖 Prompt for AI Agents
In @src/components/common/OverlayIcon.vue around lines 23 - 29, The Position
union is too broad; create two specific types (e.g., HorizontalPosition = 'left'
| 'right' and VerticalPosition = 'top' | 'bottom') and update the
OverlayIconProps to use positionX?: HorizontalPosition and positionY?:
VerticalPosition instead of Position; also update any occurrences that reference
Position (props definitions, default values, prop validators, or usages in
methods/templates) to use the new types so horizontal and vertical props cannot
be assigned invalid values.

@github-actions
Copy link

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

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

🤖 Fix all issues with AI agents
In @src/components/topbar/WorkflowTabs.vue:
- Around line 226-265: The overlayIcon object is duplicated across the three
menu items in the context menu (the items that call closeWorkflows and use
options.value slices); extract the shared properties into a single constant
(e.g., closeIconBase) defined alongside the contextMenuItems computed and then
use object spread to add the differing subIcon values (e.g., { ...closeIconBase,
subIcon: 'pi pi-arrow-left' }) when building each item's overlayIcon; keep the
constant typed appropriately (OverlayIconProps or as const) and ensure existing
disabled/command values (the closeWorkflows calls) remain unchanged.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a28b60c and 1ce5fe7.

📒 Files selected for processing (1)
  • src/components/topbar/WorkflowTabs.vue
🧰 Additional context used
📓 Path-based instructions (10)
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

src/**/*.vue: Use Vue 3 Single File Components (SFCs) with Composition API only
Use <script setup lang="ts"> for component logic in Vue SFCs
Avoid <style> blocks in Vue components - use Tailwind 4 styling instead
Use vue-i18n for all string literals in Vue components - place translation entries in src/locales/en/main.json
Use Tailwind utility classes instead of dark: variant - use semantic values from style.css theme (e.g., bg-node-component-surface)
Use cn() utility from @/utils/tailwindUtil for merging Tailwind class names instead of :class="[]" or hardcoding
Never use !important or ! Tailwind prefix - fix interfering classes instead
Use Tailwind fraction utilities instead of arbitrary percentage values (e.g., w-4/5 instead of w-[80%])
Use TypeScript Vue 3.5 style default prop declaration with reactive props destructuring - avoid withDefaults or runtime props
Prefer defineModel over separately defining a prop and emit for v-model bindings
Define slots via template usage, not via defineSlots
Use same-name shorthand for slot prop bindings (e.g., :isExpanded instead of :is-expanded="isExpanded")
Do not import Vue macros unnecessarily
Avoid new usage of PrimeVue components
Use Tailwind's plurals system via i18n instead of hardcoding ...

Files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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

src/**/*.{ts,tsx,vue}: Use separate import type statements instead of inline type in mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, run pnpm format before committing
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them

Files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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

Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
src/**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,vue}: Use ref for reactive state, computed() for derived values, and watch/watchEffect for side effects in Composition API
Avoid using ref with watch if a computed would suffice - minimize refs and derived state
Use provide/inject for dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals

Files:

  • src/components/topbar/WorkflowTabs.vue
🧠 Learnings (20)
📚 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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Leverage VueUse functions for performance-enhancing composables

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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 useIntersectionObserver for visibility detection instead of custom scroll handlers

Applied to files:

  • src/components/topbar/WorkflowTabs.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/topbar/WorkflowTabs.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/WorkflowTabs.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/topbar/WorkflowTabs.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/WorkflowTabs.vue
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Use VueUse function for useI18n in composition API for string literals

Applied to files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
📚 Learning: 2026-01-08T02:26:18.357Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7893
File: src/components/button/IconGroup.vue:5-6
Timestamp: 2026-01-08T02:26:18.357Z
Learning: In components that use the cn utility from '@/utils/tailwindUtil' with tailwind-merge, rely on the behavior that conflicting Tailwind classes are resolved by keeping the last one. For example, cn('base-classes bg-default', propClass) will have any conflicting background class from propClass override bg-default. This additive pattern is intentional and aligns with the shadcn-ui convention; ensure you document or review expectations accordingly in Vue components.

Applied to files:

  • src/components/topbar/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.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/WorkflowTabs.vue
🔇 Additional comments (3)
src/components/topbar/WorkflowTabs.vue (3)

83-88: LGTM - Clean slot implementation for custom menu icons.

The conditional rendering logic correctly prioritizes overlayIcon for composite icons while falling back to the standard item.icon class-based approach. This integrates well with PrimeVue's ContextMenu slot API.


93-120: LGTM - Clean imports and composition API usage.

The imports are well-organized with proper type imports separated. The component correctly uses Vue 3 Composition API patterns with <script setup lang="ts"> and leverages VueUse composables as recommended.


201-212: No changes needed; composable properly handles nullable reactive workflow.

The useWorkflowActionsMenu composable already:

  • Accepts Ref<ComfyWorkflow | null> | ComputedRef<ComfyWorkflow | null> (line 21)
  • Falls back to activeWorkflow via targetWorkflow computed, ensuring workflow is always available for menu generation
  • Safely guards all operations that require workflow with optional chaining (?.) and explicit null checks (if (workflow))

The menu item generation handles null workflow gracefully and poses no issues.

Comment on lines 226 to 265
{
label: t('tabMenu.closeTabsToLeft'),
overlayIcon: {
mainIcon: 'pi pi-times',
subIcon: 'pi pi-arrow-left',
positionX: 'right',
positionY: 'bottom',
subIconScale: 0.5
} as OverlayIconProps,
command: () => closeWorkflows(options.value.slice(0, index)),
disabled: index <= 0
},
{
label: t('tabMenu.closeTabsToRight'),
overlayIcon: {
mainIcon: 'pi pi-times',
subIcon: 'pi pi-arrow-right',
positionX: 'right',
positionY: 'bottom',
subIconScale: 0.5
} as OverlayIconProps,
command: () => closeWorkflows(options.value.slice(index + 1)),
disabled: index === options.value.length - 1
},
{
label: t('tabMenu.closeOtherTabs'),
overlayIcon: {
mainIcon: 'pi pi-times',
subIcon: 'pi pi-arrows-h',
positionX: 'right',
positionY: 'bottom',
subIconScale: 0.5
} as OverlayIconProps,
command: () =>
closeWorkflows([
...options.value.slice(index + 1),
...options.value.slice(0, index)
]),
disabled: options.value.length <= 1
},
{
label: workflowBookmarkStore.isBookmarked(tab.workflow.path)
? t('tabMenu.removeFromBookmarks')
: t('tabMenu.addToBookmarks'),
command: () => workflowBookmarkStore.toggleBookmarked(tab.workflow.path),
disabled: tab.workflow.isTemporary
}
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 extracting repeated overlayIcon configuration.

The three close actions share identical positionX, positionY, and subIconScale values. While the current approach is clear and readable, you could reduce duplication with a helper:

♻️ Optional: Extract common overlayIcon config
// Helper at top of contextMenuItems computed or as a constant
const closeIconBase = {
  mainIcon: 'pi pi-times',
  positionX: 'right',
  positionY: 'bottom',
  subIconScale: 0.5
} as const

// Usage in menu items:
overlayIcon: { ...closeIconBase, subIcon: 'pi pi-arrow-left' } as OverlayIconProps,
🤖 Prompt for AI Agents
In @src/components/topbar/WorkflowTabs.vue around lines 226 - 265, The
overlayIcon object is duplicated across the three menu items in the context menu
(the items that call closeWorkflows and use options.value slices); extract the
shared properties into a single constant (e.g., closeIconBase) defined alongside
the contextMenuItems computed and then use object spread to add the differing
subIcon values (e.g., { ...closeIconBase, subIcon: 'pi pi-arrow-left' }) when
building each item's overlayIcon; keep the constant typed appropriately
(OverlayIconProps or as const) and ensure existing disabled/command values (the
closeWorkflows calls) remain unchanged.

Copy link
Contributor

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

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

LGTM

@christian-byrne christian-byrne merged commit dfb78b2 into main Jan 12, 2026
3 checks passed
@christian-byrne christian-byrne deleted the pysssss/tab-menu-breadcrumb branch January 12, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants