Skip to content

Conversation

@benceruleanlu
Copy link
Member

@benceruleanlu benceruleanlu commented Dec 22, 2025

Adds a button to toggle the view mode of the media assets panel

image

Part of the QPO v2 iteration, figma design can be found here. This will be implemented in a series of stacked PRs that can be reviewed and merged individually.

main <-- #7729, #7731, #7737, #7743, #7745

┆Issue is synchronized with this Notion page by Unito

Copilot AI review requested due to automatic review settings December 22, 2025 19:37
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a feature flag setting Comfy.Queue.QPOV2 and a list/grid view-mode toggle for media assets. The toggle component and bindings are wired into the asset filter bar and sidebar; a core command to toggle the feature flag is also added, plus schema and localization updates.

Changes

Cohort / File(s) Summary
View Mode Toggle Component
src/platform/assets/components/MediaAssetViewModeToggle.vue
New component: compact icon-only toggle providing 'list' and 'grid' values via defineModel('viewMode') with i18n ARIA labels and active styling.
Media Asset Filter Integration
src/platform/assets/components/MediaAssetFilterBar.vue
Imports and conditionally renders the toggle when isQueuePanelV2Enabled is true; adds local viewMode model and ties to feature flag (uses useSettingStore / computed).
Asset Sidebar Binding
src/components/sidebar/tabs/AssetsSidebarTab.vue
Adds v-model:view-mode="viewMode" to MediaAssetFilterBar and introduces reactive viewMode state (type 'list'
Feature Flag Command
src/composables/useCoreCommands.ts
Adds isQueuePanelV2Enabled() and toggleQueuePanelV2() helpers and a new public command Comfy.ToggleQPOV2 to flip the Comfy.Queue.QPOV2 setting.
Settings Configuration
src/platform/settings/constants/coreSettings.ts
Adds new experimental hidden boolean setting Comfy.Queue.QPOV2 (default false) with tooltip describing the new Assets Panel design.
Settings Schema
src/schemas/apiSchema.ts
Adds Comfy.Queue.QPOV2 as a boolean property to zSettings schema.
Localization Strings
src/locales/en/main.json,
src/locales/en/commands.json
Adds queueProgressOverlay.viewList and viewGrid keys and command label Comfy_ToggleQPOV2 ("Toggle Queue Panel V2").

Sequence Diagram

sequenceDiagram
    participant User
    participant CoreCommands as Core Commands
    participant SettingStore
    participant MediaAssetFilterBar
    participant ViewToggle as View Mode Toggle
    participant Sidebar as AssetsSidebarTab

    User->>CoreCommands: Execute Comfy.ToggleQPOV2
    CoreCommands->>SettingStore: toggleQueuePanelV2() (flip Comfy.Queue.QPOV2)
    SettingStore->>MediaAssetFilterBar: setting change notification
    MediaAssetFilterBar->>MediaAssetFilterBar: recompute isQueuePanelV2Enabled

    alt Queue Panel V2 Enabled
        MediaAssetFilterBar->>ViewToggle: render toggle (v-model:view-mode)
        ViewToggle->>User: show list/grid buttons
        User->>ViewToggle: click button (select mode)
        ViewToggle->>MediaAssetFilterBar: emit view-mode update
        MediaAssetFilterBar->>Sidebar: propagate bound viewMode
    else Queue Panel V2 Disabled
        MediaAssetFilterBar->>User: toggle not rendered
    end
Loading

Possibly related PRs

  • ComfyUI_frontend#7215: Modifies AssetsSidebarTab.vue and MediaAssetFilterBar.vue; likely overlaps with this PR's view-mode binding and filter-bar changes.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b25ad35 and 3d0c0d1.

📒 Files selected for processing (8)
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/composables/useCoreCommands.ts
  • src/locales/en/commands.json
  • src/locales/en/main.json
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
🧰 Additional context used
📓 Path-based instructions (16)
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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • 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

Files:

  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/locales/en/main.json
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/locales/en/commands.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • 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

Files:

  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
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
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/composables/useCoreCommands.ts
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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.vue
🧠 Learnings (22)
📚 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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • 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/schemas/apiSchema.ts
  • src/platform/settings/constants/coreSettings.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.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 : Prefer `useModel` over separately defining prop and emit for two-way binding

Applied to files:

  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
📚 Learning: 2025-12-09T04:35:43.971Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.

Applied to files:

  • src/locales/en/main.json
  • src/locales/en/commands.json
📚 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/platform/assets/components/MediaAssetViewModeToggle.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/platform/assets/components/MediaAssetViewModeToggle.vue
📚 Learning: 2025-12-04T21:47:07.812Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/LiteGraphCanvasSplitterOverlay.vue:43-43
Timestamp: 2025-12-04T21:47:07.812Z
Learning: In Vue SFCs with a build step (pre-compilation), kebab-case attribute names in templates are automatically converted to camelCase, so `:sidebar-panel-visible` as a shorthand binding correctly resolves to a variable named `sidebarPanelVisible`. The `.camel` modifier is only needed when using in-DOM templates without a build step.

Applied to files:

  • src/components/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.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). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (8)
src/schemas/apiSchema.ts (1)

494-494: LGTM! Feature flag schema addition is correct.

The new Comfy.Queue.QPOV2 boolean setting follows the existing naming convention and is properly integrated into the zSettings schema.

src/locales/en/main.json (1)

721-722: LGTM! Localization keys properly added.

The new viewList and viewGrid localization keys are correctly placed under queueProgressOverlay and follow the existing naming conventions. The values are clear and concise.

src/locales/en/commands.json (1)

263-265: LGTM! Command localization properly added.

The new Comfy_ToggleQPOV2 command entry follows the existing naming pattern and provides a clear, descriptive label for the Queue Panel V2 toggle feature.

src/platform/assets/components/MediaAssetFilterBar.vue (1)

34-37: LGTM! Feature flag integration and view mode binding are correctly implemented.

The MediaAssetViewModeToggle is properly:

  • Conditionally rendered based on the Comfy.Queue.QPOV2 feature flag
  • Bound to the viewMode model using Vue's v-model two-way binding
  • Integrated with the settings store through a computed property

The implementation follows Vue 3.5 composition API patterns and is consistent with the project's feature flag conventions.

Note: The actual usage of viewMode to control the display layout needs to be implemented in the parent component (AssetsSidebarTab.vue) for the toggle to have a visible effect.

Also applies to: 67-67, 69-72

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

1143-1150: Well-structured feature flag setting.

The setting definition follows best practices with appropriate type (hidden for a feature flag), a descriptive tooltip, safe default value, and correct experimental status.

src/composables/useCoreCommands.ts (1)

85-91: Clean implementation of feature flag helpers.

The isQueuePanelV2Enabled() and toggleQueuePanelV2() functions are well-implemented:

  • Proper use of function declarations (per coding guidelines)
  • Correct async/await pattern for the toggle function
  • Direct Pinia store access without unnecessary .value (per learnings)
  • Clear, descriptive function names
src/platform/assets/components/MediaAssetViewModeToggle.vue (2)

6-43: Excellent accessibility and component implementation.

The toggle buttons are well-implemented with:

  • Proper use of the common Button component (per learnings)
  • Icon-only buttons with clear aria-label attributes (correct pattern per learnings)
  • aria-pressed attributes reflecting the active state (excellent for screen readers)
  • Semantic icon choices (table-of-contents for list, layout-grid for grid)
  • Semantic theme color values without dark: variants (per guidelines)
  • Proper use of cn() utility for class merging (per guidelines)

45-54: Clean Vue 3.5+ Composition API implementation.

The script section follows all guidelines correctly:

  • Uses <script setup lang="ts"> syntax (per guidelines)
  • Proper use of defineModel with TypeScript union type 'list' | 'grid'
  • required: true ensures the model binding is always provided
  • Correctly imports and uses vue-i18n for localization
  • Well-organized imports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/31/2025, 11:06:53 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 12/31/2025, 11:11:58 PM UTC

📈 Summary

  • Total Tests: 512
  • Passed: 502 ✅
  • Failed: 1 ❌
  • Flaky: 1 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • 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

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

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — 🔴 +4.03 kB
  • Gzip: 3.54 MB baseline 3.54 MB — 🔴 +705 B
  • Brotli: 2.7 MB baseline 2.7 MB — 🔴 +467 B
  • Bundles: 98 current • 98 baseline • 43 added / 43 removed

Category Glance
App Entry Points 🔴 +3.29 kB (3.21 MB) · Graph Workspace 🔴 +740 B (1 MB) · Vendor & Third-Party ⚪ 0 B (9.12 MB) · Other ⚪ 0 B (3.47 MB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (199 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.21 MB (baseline 3.21 MB) • 🔴 +3.29 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-UyRyaBe0.js (new) 3.01 MB 🔴 +3.01 MB 🔴 +634 kB 🔴 +481 kB
assets/index-DmYEru38.js (removed) 3.01 MB 🟢 -3.01 MB 🟢 -633 kB 🟢 -481 kB
assets/index-CEvVoFE2.js (removed) 193 kB 🟢 -193 kB 🟢 -42.1 kB 🟢 -35.1 kB
assets/index-DuKGKhhW.js (new) 193 kB 🔴 +193 kB 🔴 +42.1 kB 🔴 +35.1 kB
assets/index-B8NXkrGI.js (removed) 345 B 🟢 -345 B 🟢 -247 B 🟢 -210 B
assets/index-C6T5C3zt.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +202 B

Status: 3 added / 3 removed

Graph Workspace — 1 MB (baseline 1000 kB) • 🔴 +740 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DslkKKZH.js (new) 1 MB 🔴 +1 MB 🔴 +195 kB 🔴 +148 kB
assets/GraphView-TMUbuY7q.js (removed) 1000 kB 🟢 -1000 kB 🟢 -194 kB 🟢 -148 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-BimFxzzb.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.15 kB 🟢 -1.9 kB
assets/UserSelectView-CTbuqWss.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.15 kB 🔴 +1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-BdRTcenY.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.26 kB 🟢 -4.6 kB
assets/LegacyCreditsPanel-C3J4wNLa.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.26 kB 🔴 +4.61 kB
assets/KeybindingPanel-9FELFRQw.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.12 kB
assets/KeybindingPanel-DbjLd-BP.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.12 kB
assets/ExtensionPanel-C6sdjqUX.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.3 kB
assets/ExtensionPanel-CXnHkw_C.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/AboutPanel-CgxhMmYO.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-CMxFZbdl.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-C2Y3IAxy.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.04 kB 🟢 -1.81 kB
assets/ServerConfigPanel-C6zvZAd6.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.04 kB 🔴 +1.81 kB
assets/UserPanel-DJHn1FVA.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.57 kB
assets/UserPanel-xDNU-iQ-.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.56 kB
assets/settings-AN2JfZVQ.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 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-CBhDL9UM.js (removed) 60.1 kB 🟢 -60.1 kB 🟢 -12.4 kB 🟢 -10.8 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DT0HSMnS.js (new) 60.1 kB 🔴 +60.1 kB 🔴 +12.4 kB 🔴 +10.8 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-aFainjZb.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.9 kB 🟢 -7.61 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-DIF9qfXm.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.9 kB 🔴 +7.6 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CDUwiTEl.js (removed) 49 kB 🟢 -49 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-DrZtywoY.js (new) 49 kB 🔴 +49 kB 🔴 +10.5 kB 🔴 +9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BpXqaBIY.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.73 kB 🔴 +3.29 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Cr5vX4iT.js (removed) 14.3 kB 🟢 -14.3 kB 🟢 -3.73 kB 🟢 -3.29 kB
assets/ComfyQueueButton-C0YbZGJ-.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.58 kB 🟢 -2.29 kB
assets/ComfyQueueButton-C1a256FJ.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.3 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-B8t692bz.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.46 kB 🔴 +1.32 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-CDshRkik.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetButton-0GMkU6O9.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +998 B 🔴 +897 B
assets/WidgetButton-DAPD9quO.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -999 B 🟢 -873 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Bv9054Si.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +890 B 🔴 +770 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-s6Jb8BeG.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -891 B 🟢 -771 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DOEixFRq.js (removed) 897 B 🟢 -897 B 🟢 -501 B 🟢 -463 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DYaTR0ts.js (new) 897 B 🔴 +897 B 🔴 +501 B 🔴 +444 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DV-9JnFV.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 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-B-rq9xVP.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-CTIna9o6.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/audioService-BjTNKPY9.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +960 B 🔴 +825 B
assets/audioService-Dyz3rTxh.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -822 B
assets/serverConfigStore-CulKZi3K.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-B0wFmugV.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -549 B
assets/audioUtils-D5EL9Gsy.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +650 B 🔴 +546 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-KBsqeQPQ.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-CzYzbUcM.js 3.89 MB 3.89 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-Ch6rhmJJ.js 1.95 MB 1.95 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-DYL0ZbEr.js 2.02 MB 2.02 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-XfQ74oRB.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DLbRHZS7.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
Other — 3.47 MB (baseline 3.47 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-DT07yS1p.js (new) 28.5 kB 🔴 +28.5 kB 🔴 +6.3 kB 🔴 +5.46 kB
assets/SubscriptionRequiredDialogContent-UykzgcJO.js (removed) 28.5 kB 🟢 -28.5 kB 🟢 -6.3 kB 🟢 -5.47 kB
assets/WidgetRecordAudio-CoAnSL7o.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.64 kB
assets/WidgetRecordAudio-euDTsF9Y.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/AudioPreviewPlayer-BAy5Uzyu.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/AudioPreviewPlayer-BfBEVyQM.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -3.01 kB
assets/ValueControlPopover-C7ofvIfl.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.51 kB
assets/ValueControlPopover-DKda_0p7.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.52 kB
assets/WidgetGalleria-BNDiqzda.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetGalleria-C0KK9izq.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetColorPicker-BL2jw_3h.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-DUzAfm8S.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-BMsJ4RsE.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.08 kB
assets/WidgetTextarea-DCNBVwvV.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.08 kB
assets/WidgetMarkdown-BtQ3geUT.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetMarkdown-CiRqdks1.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-DS1Wk9sT.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetAudioUI-EvIhObyz.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetInputText-BHNJKP0-.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +924 B 🔴 +856 B
assets/WidgetInputText-CyGtfa8W.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -922 B 🟢 -849 B
assets/WidgetToggleSwitch-be75XDcv.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -836 B 🟢 -733 B
assets/WidgetToggleSwitch-CerKcQAy.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +837 B 🔴 +728 B
assets/MediaImageBottom-Di2PVFGg.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -737 B 🟢 -641 B
assets/MediaImageBottom-DTsQ3rDW.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +733 B 🔴 +642 B
assets/MediaAudioBottom-BNejrRrM.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -732 B 🟢 -649 B
assets/MediaAudioBottom-DNM8Y1vV.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +733 B 🔴 +649 B
assets/Media3DBottom-D63jyjyY.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +648 B
assets/Media3DBottom-oNeu4Qs2.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -731 B 🟢 -642 B
assets/MediaVideoBottom-DhAV0lIl.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +643 B
assets/MediaVideoBottom-qd6pi41S.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -732 B 🟢 -647 B
assets/Media3DTop-WYjVpt6l.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +769 B 🔴 +652 B
assets/Media3DTop-Z97TtsIB.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -767 B 🟢 -650 B
assets/WidgetSelect-B9QwbwB2.js (removed) 733 B 🟢 -733 B 🟢 -363 B 🟢 -330 B
assets/WidgetSelect-Ch48T43U.js (new) 733 B 🔴 +733 B 🔴 +361 B 🔴 +326 B
assets/WidgetInputNumber-BObY90gM.js (removed) 673 B 🟢 -673 B 🟢 -348 B 🟢 -291 B
assets/WidgetInputNumber-C_5Et8CB.js (new) 673 B 🔴 +673 B 🔴 +347 B 🔴 +290 B
assets/Load3D-B2A4mV4K.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -222 B
assets/Load3D-cd42x8B-.js (new) 424 B 🔴 +424 B 🔴 +268 B 🔴 +222 B
assets/WidgetLegacy-D0n3GZxf.js (removed) 364 B 🟢 -364 B 🟢 -238 B 🟢 -195 B
assets/WidgetLegacy-i2QPk8-l.js (new) 364 B 🔴 +364 B 🔴 +238 B 🔴 +195 B
assets/commands-bTEY9Mp6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BRKE6VDs.js 91 kB 91 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-DnMHwvAw.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BenufCTB.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-uhl1tYxE.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DIAYlJwM.js 246 kB 246 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-CXIOBBuD.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DOO74J4Y.js 3.18 kB 3.18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 20 added / 20 removed

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a view mode toggle button to the media assets panel, allowing users to switch between list and grid views. The feature is part of the QPO v2 iteration and is currently behind a feature flag.

  • Introduces a new MediaAssetViewModeToggle component with accessible button controls
  • Integrates the toggle into the MediaAssetFilterBar component
  • Adds internationalization support for view mode labels

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/platform/assets/components/MediaAssetViewModeToggle.vue New component implementing a two-button toggle for switching between list and grid view modes with proper accessibility attributes
src/platform/assets/components/MediaAssetFilterBar.vue Adds the view mode toggle component conditionally when QPOv2 feature flag is enabled, with v-model binding for viewMode state
src/locales/en/main.json Adds English translations for "List view" and "Grid view" labels under the queueProgressOverlay section
src/config/uiFeatureFlags.ts Creates new feature flag file exporting isQPOV2Enabled constant (currently set to false)
src/components/sidebar/tabs/AssetsSidebarTab.vue Initializes viewMode state and passes it to MediaAssetFilterBar component via v-model

const folderPromptId = ref<string | null>(null)
const folderExecutionTime = ref<number | undefined>(undefined)
const isInFolderView = computed(() => folderPromptId.value !== null)
const viewMode = ref<'list' | 'grid'>('grid')
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

The viewMode state variable is defined but not actually used to control the view display. The VirtualGrid at line 75 always displays in grid mode with a fixed grid layout. Consider either:

  1. Using the viewMode value to conditionally switch between a grid layout and a list layout in the VirtualGrid's grid-style prop
  2. Replacing VirtualGrid with different components based on the viewMode value

This means the toggle button will change the state but won't affect what users see.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47884c6 and f22c6b0.

📒 Files selected for processing (5)
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/config/uiFeatureFlags.ts
  • src/locales/en/main.json
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
🧰 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/config/uiFeatureFlags.ts
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/config/uiFeatureFlags.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

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

Files:

  • src/config/uiFeatureFlags.ts
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/config/uiFeatureFlags.ts
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/config/uiFeatureFlags.ts
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/config/uiFeatureFlags.ts
  • src/locales/en/main.json
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.vue
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/config/uiFeatureFlags.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

Files:

  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.vue
🧠 Learnings (20)
📚 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/config/uiFeatureFlags.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/config/uiFeatureFlags.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/config/uiFeatureFlags.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/config/uiFeatureFlags.ts
  • src/components/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.vue
📚 Learning: 2025-12-09T04:35:43.971Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.

Applied to files:

  • src/locales/en/main.json
📚 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/locales/en/main.json
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
📚 Learning: 2025-12-04T21:47:07.812Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7137
File: src/components/LiteGraphCanvasSplitterOverlay.vue:43-43
Timestamp: 2025-12-04T21:47:07.812Z
Learning: In Vue SFCs with a build step (pre-compilation), kebab-case attribute names in templates are automatically converted to camelCase, so `:sidebar-panel-visible` as a shorthand binding correctly resolves to a variable named `sidebarPanelVisible`. The `.camel` modifier is only needed when using in-DOM templates without a build step.

Applied to files:

  • src/components/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.vue
  • src/platform/assets/components/MediaAssetViewModeToggle.vue
  • src/platform/assets/components/MediaAssetFilterBar.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/sidebar/tabs/AssetsSidebarTab.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/platform/assets/components/MediaAssetViewModeToggle.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/platform/assets/components/MediaAssetViewModeToggle.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/platform/assets/components/MediaAssetViewModeToggle.vue
📚 Learning: 2025-12-21T06:04:12.548Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.548Z
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/platform/assets/components/MediaAssetFilterBar.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). (7)
  • GitHub Check: deploy-and-comment
  • GitHub Check: Agent
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (9)
src/components/sidebar/tabs/AssetsSidebarTab.vue (2)

50-50: LGTM: View mode binding added correctly.

The two-way binding follows Vue 3 conventions and is consistent with other model bindings in this component.


202-202: Verify: View mode state not yet connected to display logic.

The viewMode state is declared but doesn't currently affect the grid rendering (lines 75-82 still use a fixed gridTemplateColumns layout). Based on the PR description stating it "adds a button to toggle the view mode," this appears intentional as an incremental step.

Confirm this is expected behavior and that display logic will follow in a subsequent PR.

src/config/uiFeatureFlags.ts (1)

1-1: LGTM: Feature flag correctly implemented.

The flag defaults to false, ensuring the new toggle remains hidden until explicitly enabled. This is a safe approach for incremental feature rollout.

src/locales/en/main.json (1)

718-719: LGTM: Localization entries added correctly.

The new viewList and viewGrid keys are properly placed under the queueProgressOverlay namespace and provide clear, user-friendly labels for the view mode options.

src/platform/assets/components/MediaAssetFilterBar.vue (3)

34-37: LGTM: View mode toggle integrated with feature flag.

The component is correctly gated behind isQPOV2Enabled and uses proper v-model binding for two-way data flow.


43-43: LGTM: Clean imports.

Feature flag and component imports are properly organized.

Also applies to: 51-51


65-65: LGTM: Model definition is properly typed.

The viewMode model correctly restricts values to 'list' | 'grid' and is marked as required for parent-child synchronization.

src/platform/assets/components/MediaAssetViewModeToggle.vue (2)

6-23: LGTM: Toggle buttons implemented correctly.

Both buttons follow best practices:

  • Use the repo's Button component for consistency
  • Include aria-label for accessibility (icon-only buttons)
  • Use aria-pressed to indicate toggle state
  • Apply proper active/inactive styling with semantic design tokens
  • Icons are from Lucide, consistent with repo standards

Also applies to: 24-41


45-54: LGTM: Component logic is clean and well-typed.

The script setup follows Vue 3.5 Composition API conventions with proper TypeScript typing for the viewMode model.

Comment on lines +2 to +5
<div
class="inline-flex items-center gap-1 rounded-lg bg-secondary-background p-1"
role="group"
>
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 the toggle group.

The role="group" wrapper should include an aria-label to describe the purpose of this group of controls for screen reader users.

🔎 Suggested fix
  <div
    class="inline-flex items-center gap-1 rounded-lg bg-secondary-background p-1"
    role="group"
+   :aria-label="t('sideToolbar.queueProgressOverlay.viewMode')"
  >

Note: You'll need to add the corresponding key to src/locales/en/main.json:

"viewMode": "View mode"

Based on learnings, in this repository, buttons with visible labels don't need aria-label, but this group wrapper needs a label to convey the purpose of the grouped controls to assistive technology users.

📝 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
<div
class="inline-flex items-center gap-1 rounded-lg bg-secondary-background p-1"
role="group"
>
<div
class="inline-flex items-center gap-1 rounded-lg bg-secondary-background p-1"
role="group"
:aria-label="t('sideToolbar.queueProgressOverlay.viewMode')"
>
🤖 Prompt for AI Agents
In src/platform/assets/components/MediaAssetViewModeToggle.vue around lines 2-5,
the wrapper div with role="group" lacks an accessible label; add an aria-label
that uses the existing i18n key for the view mode (e.g., $t('main.viewMode'))
and update src/locales/en/main.json to include "viewMode": "View mode" so screen
readers can describe the purpose of the control group.

AustinMroz
AustinMroz previously approved these changes Dec 29, 2025
@christian-byrne
Copy link
Contributor

We should also followup on this comment.

@benceruleanlu
Copy link
Member Author

We should also followup on this comment.

K I think that can be in one of the stacked PRs.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 31, 2025
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: 3

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ddd49ee and b25ad35.

📒 Files selected for processing (5)
  • src/composables/useCoreCommands.ts
  • src/locales/en/commands.json
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
🧰 Additional context used
📓 Path-based instructions (13)
src/**/*.{vue,ts}

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

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

Files:

  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
src/**/*.ts

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

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

Files:

  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • 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

Files:

  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
**/*.{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/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
**/*.{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/platform/settings/constants/coreSettings.ts
  • src/locales/en/commands.json
  • src/schemas/apiSchema.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • 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

Files:

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

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
**/*.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/platform/assets/components/MediaAssetFilterBar.vue
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
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/composables/useCoreCommands.ts
🧠 Learnings (16)
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.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/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • 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/platform/settings/constants/coreSettings.ts
  • src/schemas/apiSchema.ts
  • src/platform/assets/components/MediaAssetFilterBar.vue
  • src/composables/useCoreCommands.ts
📚 Learning: 2025-12-09T04:35:43.971Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/locales/en/main.json:774-780
Timestamp: 2025-12-09T04:35:43.971Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, locale files other than `src/locales/en/main.json` are generated automatically on every release. Developers only need to add English (en) key/values in `src/locales/en/main.json` when making PRs; manual updates to other locale files (fr, ja, ko, ru, zh, zh-TW, es, ar, tr, etc.) are not required and should not be suggested in reviews.

Applied to files:

  • src/locales/en/commands.json
📚 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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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/platform/assets/components/MediaAssetFilterBar.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: setup
  • GitHub Check: collect
  • GitHub Check: lint-and-format
  • GitHub Check: test
🔇 Additional comments (4)
src/schemas/apiSchema.ts (1)

494-494: LGTM!

The schema addition correctly mirrors the setting definition in coreSettings.ts with z.boolean().

src/locales/en/commands.json (1)

263-265: LGTM!

The localization entry follows the established pattern and correctly maps to the command ID Comfy.ToggleQPOV2.

src/platform/assets/components/MediaAssetFilterBar.vue (1)

34-37: LGTM!

The conditional rendering of the view mode toggle is correctly gated by the feature flag.

src/composables/useCoreCommands.ts (1)

85-91: LGTM!

The helper functions correctly implement the feature flag toggle pattern using function declarations as per repository conventions.

Comment on lines +1186 to +1191
{
id: 'Comfy.ToggleQPOV2',
icon: 'pi pi-list',
label: 'Toggle Queue Panel V2',
function: toggleQueuePanelV2
},
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 adding versionAdded for consistency.

Other commands in this file include a versionAdded property to track when they were introduced. This helps with documentation and debugging.

🔎 Suggested change
     {
       id: 'Comfy.ToggleQPOV2',
       icon: 'pi pi-list',
       label: 'Toggle Queue Panel V2',
-      function: toggleQueuePanelV2
+      function: toggleQueuePanelV2,
+      versionAdded: '1.XX.X'
     },
📝 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
{
id: 'Comfy.ToggleQPOV2',
icon: 'pi pi-list',
label: 'Toggle Queue Panel V2',
function: toggleQueuePanelV2
},
{
id: 'Comfy.ToggleQPOV2',
icon: 'pi pi-list',
label: 'Toggle Queue Panel V2',
function: toggleQueuePanelV2,
versionAdded: '1.XX.X'
},
🤖 Prompt for AI Agents
In src/composables/useCoreCommands.ts around lines 1186 to 1191, the command
object for 'Comfy.ToggleQPOV2' is missing the versionAdded property used
elsewhere; add a versionAdded (e.g., versionAdded: 'vX.Y.Z' or the appropriate
version string) to that object to maintain consistency with other command
entries and ensure documentation/debugging tooling can pick it up.

Comment on lines +67 to +72
const viewMode = defineModel<'list' | 'grid'>('viewMode', { required: true })
const settingStore = useSettingStore()
const isQueuePanelV2Enabled = computed(() =>
settingStore.get('Comfy.Queue.QPOV2')
)
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 making viewMode optional when QPOV2 is disabled.

The viewMode model is marked as required: true, but the toggle is only rendered when isQueuePanelV2Enabled is true. This means parent components must always provide a viewMode value even when the feature is disabled.

This works correctly but consider if making it optional would reduce unnecessary bindings in parent components when the feature is off.

-const viewMode = defineModel<'list' | 'grid'>('viewMode', { required: true })
+const viewMode = defineModel<'list' | 'grid'>('viewMode', { default: 'grid' })

Alternatively, the current design is acceptable if you want to ensure consistent state management regardless of feature flag status.

🤖 Prompt for AI Agents
In src/platform/assets/components/MediaAssetFilterBar.vue around lines 67–72,
the viewMode model is always defined with required: true even though the UI
toggle is only shown when isQueuePanelV2Enabled is true; change the
implementation so viewMode is optional when the feature flag is off — either
move/evaluate the feature flag before calling defineModel and pass required:
isQueuePanelV2Enabled (so the prop is only required when the flag is true), or
keep required: false and add null/undefined handling where viewMode is used;
update related consumers/prop checks accordingly.

Comment on lines +1143 to +1149
{
id: 'Comfy.Queue.QPOV2',
name: 'Queue Panel V2',
type: 'hidden',
tooltip: 'Enable the new Assets Panel design with list/grid view toggle',
defaultValue: false,
experimental: true
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 adding versionAdded for consistency.

Other recently added settings in this file include a versionAdded property (e.g., Comfy.VersionCompatibility.DisableWarnings at line 1141 has versionAdded: '1.34.1'). Adding this property helps track when features were introduced.

🔎 Suggested change
   {
     id: 'Comfy.Queue.QPOV2',
     name: 'Queue Panel V2',
     type: 'hidden',
     tooltip: 'Enable the new Assets Panel design with list/grid view toggle',
     defaultValue: false,
-    experimental: true
+    experimental: true,
+    versionAdded: '1.XX.X'
   }
📝 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
{
id: 'Comfy.Queue.QPOV2',
name: 'Queue Panel V2',
type: 'hidden',
tooltip: 'Enable the new Assets Panel design with list/grid view toggle',
defaultValue: false,
experimental: true
{
id: 'Comfy.Queue.QPOV2',
name: 'Queue Panel V2',
type: 'hidden',
tooltip: 'Enable the new Assets Panel design with list/grid view toggle',
defaultValue: false,
experimental: true,
versionAdded: '1.XX.X'
}
🤖 Prompt for AI Agents
In src/platform/settings/constants/coreSettings.ts around lines 1143 to 1149,
the new Comfy.Queue.QPOV2 setting is missing a versionAdded property for
consistency with other recently added settings; add a versionAdded field (e.g.,
versionAdded: '1.34.1') to the setting object, placing it alongside
experimental/defaultValue entries to indicate when this feature was introduced.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you have to override a lot of the button styles here.
It's also another single use component, which we're trying to move away from.
I think @csongorczezar was also trying to bring this in, but it seems like it'd be the right option here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is correct, this is the PR addressing what @DrJKL was referring to: #7767

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think these are blocking issues so I will merge.

Copy link
Member Author

Choose a reason for hiding this comment

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

@coderabbitai can you add an issue to refactor this for later?

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Create a GitHub issue to track refactoring of MediaAssetViewModeToggle component

gh issue create \
  --title "Refactor MediaAssetViewModeToggle to use toggle-group component" \
  --body "## Context

The \`MediaAssetViewModeToggle\` component in \`src/platform/assets/components/MediaAssetViewModeToggle.vue\` was added in PR #7729. During review, it was noted that:

- The component overrides many button styles
- It's a single-use component, which we're trying to move away from

## Proposed Solution

Refactor this component to use the toggle-group component being introduced in PR #7767, which is based on [shadcn-vue's toggle-group](https://www.shadcn-vue.com/docs/components/toggle-group#single).

## References

- Original PR: #7729
- Comment thread: https://github.com/Comfy-Org/ComfyUI_frontend/pull/7729#discussion_r2663151326
- Toggle-group PR: #7767
- Requested by: @benceruleanlu" \
  --assignee benceruleanlu

Length of output: 57


@benceruleanlu, I've created issue #7863 to track the refactoring of MediaAssetViewModeToggle to use the toggle-group component from PR #7767. The issue has been assigned to you and includes references to this PR and the relevant discussion.


🧠 Learnings used
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

Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:50:03.127Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, when avoiding PrimeVue components, prefer using the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) rather than plain HTML buttons. These components wrap PrimeVue with custom design system styling.

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:16.031Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, avoid creating single-use variants for the Button component (and other UI components). Variants should be reusable across multiple use cases. It's acceptable to use a mix of variant props and manual Tailwind classes temporarily when a specific styling need exists in only one place, with consolidation deferred to a later phase when patterns emerge.

Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:19.792Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, inline Tailwind CSS class strings, even when long, are acceptable and preferred over extracting them to computed properties when the classes are static. This is a common Tailwind pattern and doesn't need to be flagged as a readability issue.

@benceruleanlu benceruleanlu merged commit 3728908 into main Jan 6, 2026
27 of 28 checks passed
@benceruleanlu benceruleanlu deleted the queue-view-toggle branch January 6, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants