Skip to content

Conversation

@DrJKL
Copy link
Contributor

@DrJKL DrJKL commented Nov 27, 2025

Summary

Add Rename and Delete options for Personal Models.

Also updates and standardizes some styles for Cards and adds a simple Confirmation dialog.

┆Issue is synchronized with this Notion page by Unito

@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Warning

Rate limit exceeded

@DrJKL has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c9b5bb5 and 71d49dc.

📒 Files selected for processing (2)
  • src/locales/en/main.json (2 hunks)
  • src/platform/assets/components/AssetCard.vue (2 hunks)

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 confirm dialog components and a showConfirmDialog API; refactors AssetCard for editable names, rename/delete flows, and a select emit; adds assetService.updateAsset; tightens dialog typings to ComponentAttrs generics; adjusts EditableText key handling; small button, i18n, feature-flag, styling, and util updates.

Changes

Cohort / File(s) Change Summary
Confirm dialog components & API
src/components/dialog/confirm/ConfirmHeader.vue, src/components/dialog/confirm/ConfirmBody.vue, src/components/dialog/confirm/ConfirmFooter.vue, src/components/dialog/confirm/confirmDialog.ts
Added new confirm dialog SFCs (header/body/footer) and exported showConfirmDialog(options) plus ConfirmDialogOptions to compose and show confirm dialogs with typed props.
Asset UI & interactions
src/platform/assets/components/AssetCard.vue, src/platform/assets/components/AssetGrid.vue, src/platform/assets/components/AssetBadgeGroup.vue, src/platform/assets/components/AssetBrowserModal.vue
Reworked AssetCard.vue (plain root, editable name via EditableText, loading/error overlays, rename/delete flows using showConfirmDialog, emits select); AssetGrid.vue now uses Tailwind class binding and adds loading?: boolean; AssetBadgeGroup.vue flipped badge alignment; AssetBrowserModal.vue changed search placeholder key.
Asset service
src/platform/assets/services/assetService.ts
Added and exported updateAsset(id: string, newData: Partial<AssetMetadata>): Promise<AssetItem> performing PUT /assets/{id} with response validation.
Dialog store & helpers
src/stores/dialogStore.ts, src/services/dialogService.ts, src/components/dialog/GlobalDialog.vue
Converted dialog types and APIs to generics (H,B,F) and switched prop typings to ComponentAttrs<...>; dialog objects now propagate headerProps; updated dialog helper signatures.
Button / icon tweaks
src/components/button/IconGroup.vue, src/components/button/MoreButton.vue, src/types/buttonTypes.ts
IconGroup.vue uses inline :class="cn(...)"; MoreButton.vue toggles popover via popover?.toggle, sets/exposes isOpen and emits menuOpened/menuClosed; button class strings moved to token-based colors.
Common editable component
src/components/common/EditableText.vue
Changed key handling: Enter now handled in capture phase with stopPropagation; Escape uses stopPropagation; inputAttrs prop type narrowed to Record<string, string>.
Localization
src/locales/en/main.json
Removed g.beta and assetBrowser.searchAssetsPlaceholder; added g.searchPlaceholder; added g.deletion and media.deletion blocks.
Styling & utilities
src/platform/assets/components/UploadModelDialog.vue, src/utils/gridUtil.ts
UploadModelDialog.vue simplified border-top utility (border-t); gridUtil.createGridStyle marked deprecated with a TODO recommending Tailwind.
Feature flags & i18n option
src/composables/useFeatureFlags.ts, src/i18n.ts
Added server feature flag ASSET_UPDATE_OPTIONS_ENABLED and assetUpdateOptionsEnabled getter; enabled escapeParameter: true in i18n config.
Small API/typing updates
src/components/button/MoreButton.vue, src/stores/dialogStore.ts, src/services/dialogService.ts
MoreButton.vue now defineExposees isOpen; dialog-related typings switched from InstanceType/props to ComponentAttrs<...> generics across store/service helpers.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant AssetCard
    participant DialogStore
    participant ConfirmDialog
    participant AssetService
    participant Backend

    User->>AssetCard: Click "Delete"
    AssetCard->>DialogStore: showConfirmDialog(options)
    DialogStore->>ConfirmDialog: render(header, body, footer)
    ConfirmDialog->>User: display confirm UI

    alt User confirms
        User->>ConfirmDialog: Click Confirm
        ConfirmDialog->>AssetCard: emit confirm
        AssetCard->>AssetService: update/delete asset
        AssetService->>Backend: HTTP PUT/DELETE
        Backend-->>AssetService: response
        AssetService-->>AssetCard: result
        AssetCard->>DialogStore: close dialog / update UI
    else User cancels
        User->>ConfirmDialog: Click Cancel
        ConfirmDialog->>DialogStore: close dialog
    end
Loading

Possibly related PRs

  • BYOM: Model Import Wizard #6949 — Overlaps edits to src/platform/assets/components/UploadModelDialog.vue (border-top class change) and related localization key adjustments; likely related.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch drjkl/byom-2

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

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/01/2025, 10:26:34 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/01/2025, 10:41:46 PM UTC

📈 Summary

  • Total Tests: 498
  • Passed: 488 ✅
  • Failed: 0
  • Flaky: 1 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 479 / ❌ 0 / ⚠️ 1 / ⏭️ 9
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

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

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Bundle Size Report

Summary

  • Raw size: 17 MB baseline 17 MB — 🔴 +9.29 kB
  • Gzip: 3.37 MB baseline 3.37 MB — 🔴 +2.08 kB
  • Brotli: 2.58 MB baseline 2.58 MB — 🔴 +1.61 kB
  • Bundles: 97 current • 97 baseline • 43 added / 43 removed

Category Glance
Graph Workspace 🔴 +8.29 kB (956 kB) · App Entry Points 🔴 +1 kB (3.18 MB) · Panels & Settings 🔴 +2 B (298 kB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.84 MB) · UI Components ⚪ 0 B (139 kB) · + 3 more

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-D00uNx10.js (new) 2.95 MB 🔴 +2.95 MB 🔴 +616 kB 🔴 +468 kB
assets/index-BtsW-8oW.js (removed) 2.95 MB 🟢 -2.95 MB 🟢 -616 kB 🟢 -467 kB
assets/index-BAJGvbGh.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +40 kB
assets/index-CshFLZct.js (removed) 227 kB 🟢 -227 kB 🟢 -48.6 kB 🟢 -40 kB
assets/index-BqlTr7sU.js (removed) 345 B 🟢 -345 B 🟢 -242 B 🟢 -201 B
assets/index-CVulCCLS.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +233 B

Status: 3 added / 3 removed

Graph Workspace — 956 kB (baseline 948 kB) • 🔴 +8.29 kB

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-Dqlwd207.js (new) 956 kB 🔴 +956 kB 🔴 +185 kB 🔴 +141 kB
assets/GraphView-zB6jO2I_.js (removed) 948 kB 🟢 -948 kB 🟢 -183 kB 🟢 -140 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-ClAbTy7P.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.89 kB
assets/UserSelectView-DVhsTT-o.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB

Status: 1 added / 1 removed

Panels & Settings — 298 kB (baseline 298 kB) • 🔴 +2 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-BpCjai78.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/CreditsPanel-D6vLKQjq.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.49 kB
assets/KeybindingPanel-BeL-n90M.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/KeybindingPanel-DKI4TwVT.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.41 kB 🔴 +3.01 kB
assets/ExtensionPanel-C6ppvF3f.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.25 kB
assets/ExtensionPanel-Bka3lTgU.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.25 kB
assets/AboutPanel-BGbInLWG.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-Dt9a007E.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-CAHoJ_Bp.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/ServerConfigPanel-CGL54KFC.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/UserPanel-CsX1S0Np.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.71 kB 🔴 +1.51 kB
assets/UserPanel-wCcSsAK-.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.71 kB 🟢 -1.5 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-BzXhu9yU.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.32 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-QuVbKuRJ.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.31 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CXJo7urx.js (new) 47 kB 🔴 +47 kB 🔴 +10.1 kB 🔴 +8.79 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-skY5VgfU.js (removed) 47 kB 🟢 -47 kB 🟢 -10.1 kB 🟢 -8.79 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-BVh-x2RO.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.98 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-ip5zHf9J.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.97 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-C6H8lTKh.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.97 kB 🔴 +2.59 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DYZmdfih.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.97 kB 🟢 -2.6 kB
assets/ComfyQueueButton-9wP-29a9.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.47 kB 🔴 +2.21 kB
assets/ComfyQueueButton-DCA4_Nk5.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/WidgetButton-B-LyNlD7.js (new) 2.04 kB 🔴 +2.04 kB 🔴 +926 B 🔴 +823 B
assets/WidgetButton-BT4Lql5K.js (removed) 2.04 kB 🟢 -2.04 kB 🟢 -928 B 🟢 -812 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-C5LozO_F.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +686 B 🔴 +600 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CsUBtx3o.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -686 B 🟢 -594 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CMTbhD2h.js (removed) 897 B 🟢 -897 B 🟢 -502 B 🟢 -429 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DJtpUT7n.js (new) 897 B 🔴 +897 B 🔴 +502 B 🔴 +467 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Cj7vQINR.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 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-Dgfxrdn4.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-zNAMo95j.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.84 kB 🟢 -1.58 kB
assets/audioService-Cj3h2lj-.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -959 B 🟢 -821 B
assets/audioService-ncVxPVPM.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +958 B 🔴 +827 B
assets/serverConfigStore-BQ9GXEkd.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-C345nU72.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +650 B 🔴 +546 B
assets/audioUtils-CyaiMFtM.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -649 B 🟢 -550 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-primevue-BTkNfp3w.js (removed) 1.96 MB 🟢 -1.96 MB 🟢 -336 kB 🟢 -202 kB
assets/vendor-primevue-DqE43B_H.js (new) 1.96 MB 🔴 +1.96 MB 🔴 +336 kB 🔴 +202 kB
assets/vendor-chart-B_stLV7c.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BawBdcAH.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-CogkskC9.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DCnqNLx6.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

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

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-B5xdYJzx.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-DSK7KrQ_.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.63 kB
assets/AudioPreviewPlayer-D92xf-Yu.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.04 kB
assets/AudioPreviewPlayer-DWTUFOeV.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.03 kB
assets/WidgetGalleria-D-HgLJjf.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetGalleria-DSzOoh32.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetColorPicker-3fjZeStJ.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-DtLcRKwq.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-C0PN9Ely.js (new) 3.1 kB 🔴 +3.1 kB 🔴 +1.29 kB 🔴 +1.13 kB
assets/WidgetMarkdown-D-EAoZlD.js (removed) 3.1 kB 🟢 -3.1 kB 🟢 -1.29 kB 🟢 -1.13 kB
assets/WidgetAudioUI-BPpcMzJC.js (removed) 2.82 kB 🟢 -2.82 kB 🟢 -1.12 kB 🟢 -1.01 kB
assets/WidgetAudioUI-DGHYWweR.js (new) 2.82 kB 🔴 +2.82 kB 🔴 +1.12 kB 🔴 +1.02 kB
assets/WidgetChart-DE8yMz8M.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +930 B 🔴 +817 B
assets/WidgetChart-DID0Bx3W.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -932 B 🟢 -815 B
assets/WidgetTextarea-Bo8_Jh9n.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +1.01 kB 🔴 +899 B
assets/WidgetTextarea-xNrBIDvi.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -1.01 kB 🟢 -890 B
assets/WidgetImageCompare-Cddu857y.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -747 B 🟢 -664 B
assets/WidgetImageCompare-DXoIcmUZ.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +747 B 🔴 +658 B
assets/WidgetInputText-BUTLoWmS.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -914 B 🟢 -846 B
assets/WidgetInputText-CI1gGoTl.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +916 B 🔴 +844 B
assets/WidgetToggleSwitch-3K8macTa.js (removed) 1.58 kB 🟢 -1.58 kB 🟢 -759 B 🟢 -670 B
assets/WidgetToggleSwitch-CPRhYPcc.js (new) 1.58 kB 🔴 +1.58 kB 🔴 +759 B 🔴 +664 B
assets/MediaImageBottom-DS99boe5.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +737 B 🔴 +646 B
assets/MediaImageBottom-DTO40VST.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -742 B 🟢 -645 B
assets/MediaAudioBottom-B2Zke_TX.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -738 B 🟢 -651 B
assets/MediaAudioBottom-DbpqZEih.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +738 B 🔴 +654 B
assets/MediaVideoBottom-BktoSHEv.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +736 B 🔴 +652 B
assets/MediaVideoBottom-Eb_nFbbH.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -737 B 🟢 -646 B
assets/Media3DBottom-Bm9W4TJx.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +730 B 🔴 +651 B
assets/Media3DBottom-D_8UNiN_.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -731 B 🟢 -645 B
assets/Media3DTop-CKB67lI0.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +762 B 🔴 +650 B
assets/Media3DTop-CUiLBoG6.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -762 B 🟢 -649 B
assets/WidgetSelect-DvO5KWIb.js (new) 655 B 🔴 +655 B 🔴 +341 B 🔴 +287 B
assets/WidgetSelect-eSWNZjaP.js (removed) 655 B 🟢 -655 B 🟢 -340 B 🟢 -287 B
assets/WidgetInputNumber--whR_Alu.js (new) 595 B 🔴 +595 B 🔴 +328 B 🔴 +275 B
assets/WidgetInputNumber-DrxZq1Wr.js (removed) 595 B 🟢 -595 B 🟢 -328 B 🟢 -273 B
assets/Load3D-BxNvPRnE.js (new) 424 B 🔴 +424 B 🔴 +265 B 🔴 +226 B
assets/Load3D-CS1ihmYQ.js (removed) 424 B 🟢 -424 B 🟢 -268 B 🟢 -223 B
assets/WidgetLegacy-CC_kuTWJ.js (removed) 364 B 🟢 -364 B 🟢 -235 B 🟢 -201 B
assets/WidgetLegacy-Gy4UAehV.js (new) 364 B 🔴 +364 B 🔴 +235 B 🔴 +227 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-5lOBdqcC.js 84.5 kB 84.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BOCuaVpE.js 73.4 kB 73.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ClrEFGUz.js 72.4 kB 72.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CyNU0iQX.js 99.3 kB 99.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D7gwLxft.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DC8o4BCt.js 86.8 kB 86.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DKiesCV4.js 94.3 kB 94.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Hq2q-OtB.js 83.6 kB 83.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-USAlAlnj.js 82 kB 82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-CSwk_z5a.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-DBacjcjH.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-Ct23Baus.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-_Px5dSNW.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-7z21KPoS.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BWKZzBPK.js 346 kB 346 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CGbgH4Yl.js 320 kB 320 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CjjjdWkV.js 313 kB 313 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CVrNtxvj.js 288 kB 288 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DLRSA0IK.js 309 kB 309 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DQV2gnwA.js 372 kB 372 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-ofqLG5vz.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 20 added / 20 removed

@DrJKL DrJKL changed the title WIP/Feat: Rename and Delete for custom Models Feat: Rename and Delete for imported Models ☁️ Nov 27, 2025
@DrJKL DrJKL marked this pull request as ready for review November 30, 2025 00:08
@DrJKL DrJKL requested review from a team, KarryCharon, Yorha4D and shinshin86 as code owners November 30, 2025 00:08
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 30, 2025
@DrJKL DrJKL added preview claude-review Add to trigger a PR code review from Claude Code labels Nov 30, 2025
DrJKL and others added 2 commits December 1, 2025 11:50
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@DrJKL
Copy link
Contributor Author

DrJKL commented Dec 1, 2025

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@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

♻️ Duplicate comments (3)
src/components/button/MoreButton.vue (1)

3-3: Click handler does not invoke toggle method

The expression @click="popover?.toggle" evaluates the property but doesn't call the method, so the popover won't open/close on click.

Apply this fix:

-    <IconButton :size="size" :type="type" @click="popover?.toggle">
+    <IconButton :size="size" :type="type" @click="(e) => popover?.toggle(e)">

Alternatively, define a toggle function in the script and use @click="toggle".

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

141-143: Deletion flow still lacks list update and user-facing error feedback

The delete confirm dialog improves things, but two issues from earlier reviews remain:

  1. After a successful assetService.deleteAsset(asset.id), the asset is not removed from the UI (TODO comment is still there), so the card appears as if it still exists.
  2. On failure, the error is only logged to the console; the user gets no feedback and the dialog closes anyway.

A common pattern here would be:

  • Emit an event (e.g. deleted) with the asset id so the parent/grid can remove it.
  • Surface an error via your standard toast/notification with an i18n message (e.g. assetBrowser.deletion.error), and keep the list unchanged.

Sketch of the wiring:

-defineEmits<{
-  select: [asset: AssetDisplayItem]
-}>()
+const emit = defineEmits<{
+  select: [asset: AssetDisplayItem]
+  deleted: [assetId: string]
+}>()
@@
       onConfirm: async () => {
         try {
           await assetService.deleteAsset(asset.id)
-          // TODO: Remove this from the list on success.
+          emit('deleted', asset.id)
         } catch (err: unknown) {
-          console.error(err)
+          console.error(err)
+          // TODO: show user-facing error (toast/dialog) using your
+          // existing notification helper, e.g. t('assetBrowser.deletion.error')
         }
         closeDialog(confirmDialog)
       }

This keeps backend, store, and UI in sync and aligns with the “proper error handling / user feedback” guideline.

Also applies to: 168-195


81-87: Add error handling and basic guards to assetRename

assetRename directly calls assetService.updateAsset and updates newNameRef without any error handling or basic guards, so:

  • A failed API call can leave the UI showing the new name even though it wasn’t persisted.
  • Users never see that the rename failed.

Consider:

  • Short-circuiting when the new name is empty or unchanged.
  • Wrapping the update in try/catch and only updating newNameRef on success.
  • Surfacing errors via your standard toast/notification with an i18n message.

For example:

 async function assetRename(newName?: string) {
   isEditing.value = false
-  if (newName) {
-    await assetService.updateAsset(asset.id, {
-      name: newName
-    })
-    newNameRef.value = newName
-  }
+  const trimmed = newName?.trim()
+  if (!trimmed || trimmed === asset.name) return
+
+  try {
+    await assetService.updateAsset(asset.id, { name: trimmed })
+    newNameRef.value = trimmed
+  } catch (err: unknown) {
+    console.error(err)
+    // TODO: show user-facing error (toast/dialog), e.g. t('assetBrowser.rename.error')
+  }
 }

This keeps the visual state aligned with the backend and improves UX on failure.

Also applies to: 156-158, 204-212

🧹 Nitpick comments (5)
src/types/buttonTypes.ts (1)

42-61: Bordered button variants use consistent base tokens; consider deduplicating border classes

The updated base and border maps for primary/secondary/transparent look coherent and keep behavior simple. If you want to cut repetition, you could factor out the shared border border-solid and keep only the color per type:

 export const getBorderButtonTypeClasses = (type: ButtonType = 'primary') => {
   const baseByType = {
-    primary: 'bg-base-background text-base-foreground',
-    secondary: 'bg-secondary-background text-base-foreground',
+    primary: 'bg-base-background text-base-foreground',
+    secondary: 'bg-secondary-background text-base-foreground',
     transparent: cn(
       'bg-transparent text-base-foreground hover:bg-secondary-background-hover'
     ),
     accent:
       'bg-primary-background hover:bg-primary-background-hover text-white font-bold'
   } as const
 
-  const borderByType = {
-    primary: 'border border-solid border-base-background',
-    secondary: 'border border-solid border-base-foreground',
-    transparent: 'border border-solid border-base-foreground',
-    accent: 'border border-solid border-primary-background'
-  } as const
-
-  return `${baseByType[type]} ${borderByType[type]}`
+  const borderColorByType = {
+    primary: 'border-base-background',
+    secondary: 'border-base-foreground',
+    transparent: 'border-base-foreground',
+    accent: 'border-primary-background'
+  } as const
+
+  return cn(
+    baseByType[type],
+    'border border-solid',
+    borderColorByType[type]
+  )
 }

Purely optional, but keeps the mapping DRY and leans on cn consistently.

src/components/button/MoreButton.vue (1)

28-39: Consider extracting inline handlers to named functions

The inline arrow functions work correctly but are verbose. For improved readability, consider extracting them:

+function onShow() {
+  isOpen.value = true
+  emit('menuOpened')
+}
+
+function onHide() {
+  isOpen.value = false
+  emit('menuClosed')
+}

Then use @show="onShow" and @hide="onHide".

src/stores/dialogStore.ts (1)

37-56: Tighten createDialog / showDialog generics to preserve component-specific props

The move to ComponentAttrs and generic DialogInstance / ShowDialogOptions looks good, but the generics aren’t fully carried through:

  • createDialog infers dialog as a plain object, not DialogInstance<H, B, F>, so consumers don’t benefit from the stronger typing of headerProps / contentProps / footerProps.
  • showExtensionDialog uses ShowDialogOptions & { key: string } without generics, so extension dialogs effectively lose their specific header/body/footer prop typing.

You can tighten this by explicitly annotating the dialog literal and making showExtensionDialog generic as well, e.g.:

-  function createDialog<
-    H extends Component = Component,
-    B extends Component = Component,
-    F extends Component = Component
-  >(options: ShowDialogOptions<H, B, F> & { key: string }) {
+  function createDialog<
+    H extends Component = Component,
+    B extends Component = Component,
+    F extends Component = Component
+  >(options: ShowDialogOptions<H, B, F> & { key: string }) {
@@
-    const dialog = {
+    const dialog: DialogInstance<H, B, F> = {
       key: options.key,
       // ...
     }

and optionally:

-  function showExtensionDialog(options: ShowDialogOptions & { key: string }) {
+  function showExtensionDialog<
+    H extends Component = Component,
+    B extends Component = Component,
+    F extends Component = Component
+  >(options: ShowDialogOptions<H, B, F> & { key: string }) {

This keeps the runtime behavior the same but gives much better type feedback for composed dialogs like your new confirm dialog.

Also applies to: 58-78, 137-143, 212-216

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

33-68: Remove dead IconButton usage to avoid unused import / noise

IconButton is imported and rendered with v-if="false", so it will never be shown but still forces the component and styles into the bundle.

If this is just a placeholder, it’s cleaner to drop it until the action is implemented:

-        <IconButton v-if="false" size="sm">
-          <i class="icon-[lucide--file-text]" />
-        </IconButton>

You can reintroduce it when the extra action is ready.


156-158: Clarify or remove the newNameRef “TEMPORARY” comment

newNameRef is now updated from the rename API call, but the comment still says “TEMPORARY: Replace with actual response from API”, which is no longer accurate and can confuse future readers.

Either update the comment to describe the current behavior, or remove it entirely if the current approach is acceptable.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 22b3cf0 and a5bd37e.

📒 Files selected for processing (19)
  • src/components/button/IconGroup.vue (1 hunks)
  • src/components/button/MoreButton.vue (3 hunks)
  • src/components/common/EditableText.vue (2 hunks)
  • src/components/dialog/GlobalDialog.vue (1 hunks)
  • src/components/dialog/confirm/ConfirmBody.vue (1 hunks)
  • src/components/dialog/confirm/ConfirmFooter.vue (1 hunks)
  • src/components/dialog/confirm/ConfirmHeader.vue (1 hunks)
  • src/components/dialog/confirm/confirmDialog.ts (1 hunks)
  • src/locales/en/main.json (2 hunks)
  • src/platform/assets/components/AssetBadgeGroup.vue (1 hunks)
  • src/platform/assets/components/AssetBrowserModal.vue (1 hunks)
  • src/platform/assets/components/AssetCard.vue (2 hunks)
  • src/platform/assets/components/AssetGrid.vue (2 hunks)
  • src/platform/assets/components/UploadModelDialog.vue (1 hunks)
  • src/platform/assets/services/assetService.ts (2 hunks)
  • src/services/dialogService.ts (8 hunks)
  • src/stores/dialogStore.ts (5 hunks)
  • src/types/buttonTypes.ts (3 hunks)
  • src/utils/gridUtil.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
  • src/platform/assets/components/AssetBrowserModal.vue
  • src/platform/assets/components/AssetBadgeGroup.vue
  • src/components/dialog/confirm/ConfirmFooter.vue
  • src/platform/assets/components/AssetGrid.vue
  • src/utils/gridUtil.ts
  • src/services/dialogService.ts
  • src/components/common/EditableText.vue
  • src/components/dialog/confirm/ConfirmHeader.vue
  • src/components/dialog/confirm/confirmDialog.ts
  • src/locales/en/main.json
  • src/components/button/IconGroup.vue
🧰 Additional context used
📓 Path-based instructions (22)
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/platform/assets/components/UploadModelDialog.vue
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

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

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.vue
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

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

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.vue
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/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/platform/assets/components/UploadModelDialog.vue
src/**/*.{vue,ts}

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

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

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/platform/assets/components/UploadModelDialog.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.vue
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

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

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.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/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/platform/assets/components/UploadModelDialog.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/dialog/GlobalDialog.vue
  • src/platform/assets/services/assetService.ts
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
  • src/platform/assets/components/UploadModelDialog.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/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
  • src/platform/assets/components/UploadModelDialog.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/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/components/dialog/confirm/ConfirmBody.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/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/components/dialog/confirm/ConfirmBody.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/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/components/dialog/confirm/ConfirmBody.vue
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/platform/assets/services/assetService.ts
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.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/assets/services/assetService.ts
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/stores/dialogStore.ts
  • src/types/buttonTypes.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/platform/assets/services/assetService.ts
src/**/stores/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/stores/**/*.{ts,tsx}: Maintain clear public interfaces and restrict extension access in stores
Use TypeScript for type safety in state management stores

Files:

  • src/stores/dialogStore.ts
**/stores/*Store.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name Pinia stores with the *Store.ts suffix

Files:

  • src/stores/dialogStore.ts
🧠 Learnings (21)
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Implement proper props and emits definitions in Vue components

Applied to files:

  • src/components/dialog/GlobalDialog.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 : Define proper props and emits definitions in Vue components

Applied to files:

  • src/components/dialog/GlobalDialog.vue
  • src/components/dialog/confirm/ConfirmBody.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement proper props and emits definitions

Applied to files:

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

Applied to files:

  • src/components/dialog/GlobalDialog.vue
  • src/components/button/MoreButton.vue
  • src/platform/assets/components/UploadModelDialog.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 : Use vue 3.5 style of default prop declaration

Applied to files:

  • src/components/dialog/GlobalDialog.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 : Destructure props using Vue 3.5 style in Vue components

Applied to files:

  • src/components/dialog/GlobalDialog.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use defineExpose only for imperative operations (such as form.validate(), modal.open())

Applied to files:

  • src/components/button/MoreButton.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/button/MoreButton.vue
  • src/platform/assets/components/UploadModelDialog.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: User-friendly and actionable error messages in error handling

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T19:48:23.088Z
Learning: Applies to **/*.vue : Name Vue components in PascalCase (e.g., `MenuHamburger.vue`)

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • src/platform/assets/components/AssetCard.vue
  • src/components/dialog/confirm/ConfirmBody.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Utilize ref and reactive for reactive state in Vue 3

Applied to files:

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

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • src/components/dialog/confirm/ConfirmBody.vue
📚 Learning: 2025-11-24T19:47:14.779Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:14.779Z
Learning: Applies to **/*.{ts,tsx} : Never use `as any` type assertions - fix the underlying type issue

Applied to files:

  • src/components/dialog/confirm/ConfirmBody.vue
📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T19:48:23.088Z
Learning: Applies to **/*.{ts,tsx,vue} : Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Applied to files:

  • src/components/dialog/confirm/ConfirmBody.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} : Implement proper error handling

Applied to files:

  • src/components/dialog/confirm/ConfirmBody.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • src/components/dialog/confirm/ConfirmBody.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively

Applied to files:

  • src/platform/assets/components/UploadModelDialog.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Applied to files:

  • src/platform/assets/components/UploadModelDialog.vue
🧬 Code graph analysis (1)
src/platform/assets/services/assetService.ts (2)
src/platform/assets/schemas/assetSchema.ts (1)
  • AssetMetadata (74-74)
src/scripts/api.ts (1)
  • api (1289-1289)
⏰ 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). (8)
  • GitHub Check: playwright-tests-chromium-sharded (2, 8)
  • GitHub Check: playwright-tests-chromium-sharded (6, 8)
  • GitHub Check: playwright-tests-chromium-sharded (8, 8)
  • GitHub Check: playwright-tests-chromium-sharded (4, 8)
  • GitHub Check: playwright-tests-chromium-sharded (5, 8)
  • GitHub Check: playwright-tests-chromium-sharded (3, 8)
  • GitHub Check: playwright-tests-chromium-sharded (7, 8)
  • GitHub Check: playwright-tests-chromium-sharded (1, 8)
🔇 Additional comments (6)
src/types/buttonTypes.ts (1)

26-40: Primary button token mapping change looks consistent

Switching the solid primary variant to bg-base-foreground text-base-background keeps the API intact while moving to semantic tokens; no TS or runtime risks here.

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

3-3: LGTM!

The border utility change from border-t-[1px] to border-t is a valid simplification. Tailwind's border-t defaults to 1px width, making this functionally equivalent but more idiomatic.

src/components/dialog/GlobalDialog.vue (1)

14-19: LGTM!

The addition of v-bind="item.headerProps" correctly enables prop propagation to dynamic header components. This is essential for the new confirm dialog pattern where ConfirmHeader receives configurable props.

src/components/button/MoreButton.vue (1)

72-82: LGTM!

The state management and defineExpose pattern are correct. Exposing isOpen alongside hide follows guidelines for imperative operations and allows parent components to check menu state when needed.

src/platform/assets/services/assetService.ts (1)

392-392: LGTM!

The updateAsset function is correctly exposed in the service's public API.

src/components/dialog/confirm/ConfirmBody.vue (1)

1-19: LGTM!

The component correctly unwraps MaybeRefOrGetter<string> using toValue in a computed property. This addresses the previous review concern and ensures refs/getters are properly resolved before rendering.

@DrJKL DrJKL marked this pull request as ready for review December 1, 2025 21:26
Copy link

@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

♻️ Duplicate comments (3)
src/platform/assets/components/AssetCard.vue (3)

2-17: Interactive card focus behavior and ARIA wiring look good

Tying tabindex and the Enter key handler to interactive and wiring aria-labelledby/aria-describedby to stable IDs is a solid fix for earlier keyboard/semantics issues. Optional: if you want closer button semantics for screen readers, you could add role="button" and a Space key handler when interactive is true, as long as that doesn’t reintroduce nested-button problems.


19-32: Preview/loading state and action menu integration are in good shape

Using useImage to drive the loading/error overlay and falling back to a gradient block is a clean pattern, and adding :alt="asset.name" on the preview image fixes the earlier accessibility gap while keeping the card clickable via @click.self and the root key handler. The More menu wiring for rename/delete with i18n labels also looks correct.

Also applies to: 35-70


151-153: Prevent duplicate deletes and surface rename errors to the user

Two behavioral issues worth tightening up:

  1. optionsDisabled is never toggled during delete.
    That means the confirm button can be clicked multiple times while the DELETE request is in flight. Since you already pass optionsDisabled into the footer, you can disable it during the async call:
      onConfirm: async () => {
-        try {
+        try {
+          optionsDisabled.value = true
           promptText.value = t('assetBrowser.deletion.inProgress', {
             asset: asset.name
           })
           await assetService.deleteAsset(asset.id)
@@
-        } catch (err: unknown) {
+        } catch (err: unknown) {
           console.error(err)
           promptText.value = t('assetBrowser.deletion.failed', {
             asset: asset.name
           })
@@
-        } finally {
-          closeDialog(confirmDialog)
-        }
+        } finally {
+          optionsDisabled.value = false
+          closeDialog(confirmDialog)
+        }
  1. Rename failures are silent from the user’s perspective.
    assetRename logs the error and reverts newNameRef, but the user doesn’t get any feedback that their rename failed. Based on learnings, it would be better to surface a toast or dialog (using an i18n key like assetBrowser.rename.failed) or emit an error event so the parent can notify the user. That keeps error handling user-friendly instead of just writing to the console.

Also applies to: 171-217, 224-240

🧹 Nitpick comments (2)
src/platform/assets/services/assetService.ts (1)

4-7: updateAsset flow is solid; consider improving invalid-response error formatting

The new updateAsset method is well-typed and consistent with the rest of this service: correct endpoint, JSON body, Partial<AssetMetadata>, and Zod validation via assetItemSchema.safeParse all make sense.

One small improvement: when validation fails you currently interpolate the raw ZodError object, which will stringify poorly. You already use fromZodError and EXPERIMENTAL_WARNING elsewhere; mirroring that here would keep errors readable and consistent:

   const newAsset = assetItemSchema.safeParse(await res.json())
   if (newAsset.success) {
     return newAsset.data
   }

-  throw new Error(
-    `Unable to update asset ${id}: Invalid response - ${newAsset.error}`
-  )
+  const parsedError = fromZodError(newAsset.error)
+  throw new Error(
+    `${EXPERIMENTAL_WARNING}Unable to update asset ${id}: Invalid asset response against zod schema:\n${parsedError}`
+  )

Because this relies on Zod schema behavior, please confirm in your environment that assetItemSchema matches the actual PUT /assets/{id} response shape and that fromZodError formatting remains acceptable for production logs.

Also applies to: 287-322, 403-403

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

72-116: Unify displayed name to avoid divergence between UI, tooltips, and dialogs

Right now the visible name comes from newNameRef ?? asset.name, but other parts of the card still read from asset.name (e.g., tooltip value, alt text, deletion copy in confirmDeletion). If the parent doesn’t immediately refresh asset, these can drift.

Consider introducing a single computed displayName:

const displayName = computed(() => newNameRef.value ?? asset.name)

and then using displayName everywhere the user sees the name (EditableText model-value, tooltips, alt text, deletion prompt bindings, etc.). That keeps the UI consistent regardless of how quickly the parent updates its asset list.

Also applies to: 158-161, 224-240

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5bd37e and 23d01f0.

📒 Files selected for processing (5)
  • src/components/dialog/confirm/ConfirmFooter.vue (1 hunks)
  • src/i18n.ts (1 hunks)
  • src/locales/en/main.json (2 hunks)
  • src/platform/assets/components/AssetCard.vue (2 hunks)
  • src/platform/assets/services/assetService.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/dialog/confirm/ConfirmFooter.vue
🧰 Additional context used
📓 Path-based instructions (17)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.vue
src/**/*.{vue,ts}

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

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.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/platform/assets/services/assetService.ts
  • src/i18n.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.vue
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/platform/assets/services/assetService.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/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/assets/services/assetService.ts
  • src/i18n.ts
  • src/platform/assets/components/AssetCard.vue
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/platform/assets/components/AssetCard.vue
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/AssetCard.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/platform/assets/components/AssetCard.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/AssetCard.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/AssetCard.vue
🧠 Learnings (6)
📚 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: User-friendly and actionable error messages in error handling

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T19:48:23.088Z
Learning: Applies to **/*.vue : Name Vue components in PascalCase (e.g., `MenuHamburger.vue`)

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Utilize ref and reactive for reactive state in Vue 3

Applied to files:

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

Applied to files:

  • src/platform/assets/components/AssetCard.vue
🧬 Code graph analysis (1)
src/platform/assets/services/assetService.ts (2)
src/platform/assets/schemas/assetSchema.ts (3)
  • AssetMetadata (74-74)
  • AssetItem (72-72)
  • assetItemSchema (68-68)
src/scripts/api.ts (1)
  • api (1289-1289)
⏰ 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). (2)
  • GitHub Check: setup
  • GitHub Check: test
🔇 Additional comments (2)
src/i18n.ts (1)

166-166: escapeParameter enablement looks correct and security-friendly

Setting escapeParameter: true here is aligned with vue-i18n’s API and adds a useful safeguard for interpolated parameters in HTML contexts. No issues from a config or typing perspective.

If you upgrade vue-i18n later, please double‑check the docs for escapeParameter on your exact version to ensure the option name and semantics are still the same.

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

127-127: Shared g.searchPlaceholder key is a good consolidation

Defining a generic "g.searchPlaceholder": "Search..." is a nice way to reuse a consistent placeholder across components and keeps things i18n‑friendly.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
src/platform/assets/components/AssetCard.vue (2)

44-46: Remove dead code.

This IconButton is disabled with v-if="false" and appears to be leftover from development.

-      <IconButton v-if="false" size="sm">
-        <i class="icon-[lucide--file-text]" />
-      </IconButton>

191-191: Consider removing unused optionsDisabled ref.

The optionsDisabled ref is declared and passed to footerProps but is never set to true in the code. If it's intended for future use to disable buttons during the async operation, consider implementing it now for better UX.

   const optionsDisabled = ref(false)
   const confirmDialog = showConfirmDialog({
     // ...
     footerProps: {
       // ...
       optionsDisabled,
       onConfirm: async () => {
+        optionsDisabled.value = true
         try {
           // ... deletion logic
         } finally {
+          optionsDisabled.value = false
           closeDialog(confirmDialog)
         }
       }
     }
   })
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23d01f0 and 38cc93b.

📒 Files selected for processing (3)
  • src/composables/useFeatureFlags.ts (2 hunks)
  • src/locales/en/main.json (2 hunks)
  • src/platform/assets/components/AssetCard.vue (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/locales/en/main.json
🧰 Additional context used
📓 Path-based instructions (18)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/composables/useFeatureFlags.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

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

Files:

  • src/composables/useFeatureFlags.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
src/**/*.{vue,ts}

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

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
src/**/*.ts

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

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

Files:

  • src/composables/useFeatureFlags.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/composables/useFeatureFlags.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/composables/useFeatureFlags.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

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

Files:

  • src/composables/useFeatureFlags.ts
  • src/platform/assets/components/AssetCard.vue
**/composables/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables in the format useXyz.ts

Files:

  • src/composables/useFeatureFlags.ts
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/platform/assets/components/AssetCard.vue
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/AssetCard.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/platform/assets/components/AssetCard.vue
🧠 Learnings (9)
📚 Learning: 2025-11-24T19:47:14.779Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:14.779Z
Learning: Applies to **/*.{ts,tsx,vue} : Check server capabilities using `api.serverSupportsFeature('feature_name')` before using enhanced features

Applied to files:

  • src/composables/useFeatureFlags.ts
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively

Applied to files:

  • src/platform/assets/components/AssetCard.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 : Define proper props and emits definitions in Vue components

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: User-friendly and actionable error messages in error handling

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T19:48:23.088Z
Learning: Applies to **/*.vue : Name Vue components in PascalCase (e.g., `MenuHamburger.vue`)

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Utilize ref and reactive for reactive state in Vue 3

Applied to files:

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

Applied to files:

  • src/platform/assets/components/AssetCard.vue
🧬 Code graph analysis (1)
src/composables/useFeatureFlags.ts (1)
src/scripts/api.ts (1)
  • api (1289-1289)
⏰ 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: test
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (5)
src/composables/useFeatureFlags.ts (1)

12-13: LGTM! Feature flag implementation follows the established pattern.

The MODEL_EDIT_ENABLED flag is correctly implemented with a default value of false, consistent with other feature flags like MODEL_UPLOAD_BUTTON_ENABLED.

Also applies to: 36-38

src/platform/assets/components/AssetCard.vue (4)

2-17: Accessibility improvements look good.

The conditional tabindex (line 8) and gated keyboard handler (line 16) properly restrict focus and activation to interactive cards, addressing previous accessibility concerns. The ARIA attributes enhance screen reader support.


19-32: Image accessibility properly implemented.

The alt attribute is correctly bound to asset.name (line 28), and the loading/error placeholder includes appropriate role and click handling. This addresses the previous accessibility review comment.


73-117: Metadata display and editable name implementation looks solid.

The EditableText component integration with optimistic updates (newNameRef ?? asset.name on line 85) provides good UX. The fallback pattern ensures the UI shows the correct name even if the server update fails.


122-172: Script setup follows Vue 3 Composition API best practices.

Proper use of composables, type-safe props/emits definitions, and useTemplateRef for accessing child component instances. The reactive state management is clean and follows guidelines.

Copy link

@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

🧹 Nitpick comments (4)
src/platform/assets/components/AssetCard.vue (4)

2-17: Interactive card focus and click behavior

Tying tabindex and @keydown.enter to interactive is a good fix for the previous keyboard dead‑end. Note that pointer activation is now only wired to the preview area (@click.self on the placeholder and <img>), so clicking on the text/meta region of an interactive card does nothing. If the intended UX is “click anywhere on the card to select”, consider also wiring @click on the root container (gated by interactive) so keyboard and mouse behavior stay aligned.

Also applies to: 19-32


35-47: Remove dead IconButton stub in the action group

<IconButton v-if="false" ...> is unreachable and can be safely removed to keep the action surface lean and maintainable.


73-91: Rename flow wiring is solid; consider tightening validation and cancel handling

The EditableText → assetRename pipeline with optimistic newNameRef and server reconciliation looks good. Two small refinements you might consider:

  • Avoid treating an empty string as “no rename”: if (newName) will skip a legitimate (though probably invalid) empty name; using something like if (!newName?.trim()) { isEditing.value = false; return } makes the intent explicit.
  • For cancel, @cancel="assetRename()" currently calls an async function that does nothing beyond isEditing.value = false. A tiny dedicated handler (e.g. @cancel="isEditing = false") would read clearer and avoid the extra async surface.

These are minor clarity/UX tweaks; the current behavior is functionally correct.

Also applies to: 230-246


59-68: Improve delete dialog button state during async operation

The delete flow is nicely localized and gives the user clear in‑progress/complete/failed messages, plus hides the card via deletedLocal on success. You already pass an optionsDisabled ref into footerProps, but it’s never updated, so the confirm/cancel controls stay active while the async delete is running.

Consider setting optionsDisabled.value = true at the start of onConfirm and resetting it in finally (just before closeDialog(confirmDialog)), so the dialog buttons are disabled while the deletion is in progress and can’t be double‑triggered.

Also applies to: 176-223

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38cc93b and 4417b0d.

📒 Files selected for processing (3)
  • src/composables/useFeatureFlags.ts (2 hunks)
  • src/locales/en/main.json (2 hunks)
  • src/platform/assets/components/AssetCard.vue (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/composables/useFeatureFlags.ts
🧰 Additional context used
📓 Path-based instructions (12)
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/platform/assets/components/AssetCard.vue
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

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

Files:

  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

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

Files:

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

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

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

Files:

  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • src/platform/assets/components/AssetCard.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/platform/assets/components/AssetCard.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

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

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

Files:

  • src/platform/assets/components/AssetCard.vue
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

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

Files:

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

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/assets/components/AssetCard.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/AssetCard.vue
🧠 Learnings (15)
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively

Applied to files:

  • src/platform/assets/components/AssetCard.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 : Define proper props and emits definitions in Vue components

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Implement proper props and emits definitions in Vue components

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement proper props and emits definitions

Applied to files:

  • src/platform/assets/components/AssetCard.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/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: User-friendly and actionable error messages in error handling

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:48:23.088Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T19:48:23.088Z
Learning: Applies to **/*.vue : Name Vue components in PascalCase (e.g., `MenuHamburger.vue`)

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Utilize ref and reactive for reactive state in Vue 3

Applied to files:

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

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{components,composables}/**/*.{ts,tsx,vue} : Use vue-i18n for ALL user-facing strings by adding them to `src/locales/en/main.json`

Applied to files:

  • src/platform/assets/components/AssetCard.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} : Implement proper error handling

Applied to files:

  • src/platform/assets/components/AssetCard.vue
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.{ts,tsx,js,vue} : Implement proper error handling in components and services

Applied to files:

  • src/platform/assets/components/AssetCard.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). (2)
  • GitHub Check: test
  • GitHub Check: setup
🔇 Additional comments (1)
src/locales/en/main.json (1)

2155-2161: Grammar issue resolved from previous review.

The "failed" message at line 2160 now correctly reads "could not be deleted" (previously flagged as "could not deleted"). The deletion block is well-structured with consistent {assetName} placeholders across all messages.

To ensure complete correctness, verify that the consuming code (asset service/components) correctly substitutes the {assetName} placeholder in these localization keys.

@DrJKL DrJKL added preview and removed preview labels Dec 1, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Note

Docstrings generation - SUCCESS
Generated docstrings for this pull request at #7082

coderabbitai bot added a commit that referenced this pull request Dec 1, 2025
Docstrings generation was requested by @guill.

* #6969 (comment)

The following files were modified:

* `src/components/dialog/confirm/confirmDialog.ts`
* `src/composables/useFeatureFlags.ts`
* `src/platform/assets/services/assetService.ts`
* `src/services/dialogService.ts`
* `src/stores/dialogStore.ts`
@DrJKL DrJKL requested review from guill and removed request for viva-jinyi December 1, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants