Skip to content

Conversation

@viva-jinyi
Copy link
Member

@viva-jinyi viva-jinyi commented Jan 21, 2026

Summary

  • Fix: Initializing jobs now properly disappear from UI when cancelled or cleared
  • Add clearInitializationByPromptIds batch function for optimized Set operations
  • Handle Cloud vs local environment correctly (use api.deleteItem for Cloud, api.interrupt for local)

Problem

When clicking 'Clear queue' button or X button on initializing jobs, the jobs remained visible in both AssetsSidebarListView and JobQueue components until page refresh.

Root Cause

  1. initializingPromptIds in executionStore was not being cleared when jobs were cancelled/deleted
  2. Cloud environment requires api.deleteItem() instead of api.interrupt() for cancellation

Changes

  • src/stores/executionStore.ts: Export clearInitializationByPromptId and add batch clearInitializationByPromptIds function
  • src/composables/queue/useJobMenu.ts: Add Cloud branch handling and initialization cleanup
  • src/components/queue/QueueProgressOverlay.vue: Fix onCancelItem(), cancelQueuedWorkflows(), interruptAll()
  • src/components/sidebar/tabs/AssetsSidebarTab.vue: Add initialization cleanup to handleClearQueue()
screen-capture.webm

🤖 Generated with Claude Code

┆Issue is synchronized with this Notion page by Unito

@viva-jinyi viva-jinyi requested a review from a team as a code owner January 21, 2026 04:16
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 21, 2026
@github-actions
Copy link

github-actions bot commented Jan 21, 2026

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 505 passed, 0 failed, 1 flaky, 8 skipped (Total: 514)

❌ Failed Tests

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

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

🎨 Storybook Build Status

loading Build is starting...

⏰ Started at: 01/21/2026, 05:01:31 AM UTC

🚀 Building Storybook

  • 📦 Installing dependencies...
  • 🔧 Building Storybook components...
  • 🌐 Preparing deployment to Cloudflare Pages...

⏱️ Please wait while the Storybook build is in progress...

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Queue cancellation and clear-queue flows now also remove associated initialization tracking in the ExecutionStore. For cloud deployments item deletion (api.deleteItem) is used for running/initializing jobs; for local deployments api.interrupt remains. Batch and single-item clear operations call ExecutionStore to remove prompt IDs from initializing state and then update queue state.

Changes

Cohort / File(s) Summary
Queue UI & menus
src/components/queue/QueueProgressOverlay.vue, src/composables/queue/useJobMenu.ts, src/composables/queue/useJobMenu.test.ts
Cancellation logic updated: cloud deployments call api.deleteItem('queue', promptId) for running/initializing items (local still uses api.interrupt). After cancel/delete/interrupt, code invokes executionStore.clearInitializationByPromptId(promptId) and updates queueStore. Tests add a mocked useExecutionStore.
Sidebar clear-queue
src/components/sidebar/tabs/AssetsSidebarTab.vue
handleClearQueue now captures pending prompt IDs from queueStore.pendingTasks and calls executionStore.clearInitializationByPromptIds(pendingPromptIds) after dispatching clear action. useExecutionStore is imported and used.
Execution state store
src/stores/executionStore.ts
Added clearInitializationByPromptIds(promptIds: string[]) to remove multiple prompt IDs from the initializing set; existing clearInitializationByPromptId retained.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as Queue UI / Sidebar
    participant QueueStore
    participant ExecutionStore
    participant API

    User->>UI: click cancel item / clear queue
    UI->>QueueStore: read pendingTasks / target id(s)
    UI->>API: if cloud -> deleteItem('queue', id) else -> interrupt(id)
    API-->>UI: success
    UI->>ExecutionStore: clearInitializationByPromptId(s) (single or batch)
    ExecutionStore-->>UI: cleared
    UI->>QueueStore: update() / dispatch clear pending tasks
    QueueStore-->>UI: updated state
    UI-->>User: UI reflects cancelled/cleared queue
Loading

Possibly related PRs

Suggested reviewers

  • shinshin86
  • KarryCharon
  • Yorha4D
  • benceruleanlu
✨ Finishing touches
  • 📝 Generate docstrings

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

❤️ Share

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

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

Bundle Size Report

Summary

  • Raw size: 21.4 MB baseline 21.4 MB — 🔴 +1.45 kB
  • Gzip: 4.44 MB baseline 4.44 MB — 🔴 +268 B
  • Brotli: 3.29 MB baseline 3.29 MB — 🔴 +305 B
  • Bundles: 155 current • 155 baseline • 65 added / 65 removed

Category Glance
Data & Services 🔴 +926 B (3.04 MB) · Graph Workspace 🔴 +521 B (1.02 MB) · Vendor & Third-Party ⚪ 0 B (10.4 MB) · Other ⚪ 0 B (6.28 MB) · Panels & Settings ⚪ 0 B (430 kB) · Views & Navigation ⚪ 0 B (80.7 kB) · + 5 more

Per-category breakdown
App Entry Points — 22.4 kB (baseline 22.4 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-Di5dzg_F.js (removed) 22.4 kB 🟢 -22.4 kB 🟢 -6.73 kB 🟢 -5.92 kB
assets/index-DUDLcqwl.js (new) 22.4 kB 🔴 +22.4 kB 🔴 +6.74 kB 🔴 +5.92 kB

Status: 1 added / 1 removed

Graph Workspace — 1.02 MB (baseline 1.02 MB) • 🔴 +521 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DlH-ltIi.js (new) 1.02 MB 🔴 +1.02 MB 🔴 +201 kB 🔴 +153 kB
assets/GraphView-CCqcaB7u.js (removed) 1.02 MB 🟢 -1.02 MB 🟢 -201 kB 🟢 -153 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CloudSurveyView-CNqdMT7b.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +3.61 kB 🔴 +3.06 kB
assets/CloudSurveyView-Cq0xoDwI.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -3.61 kB 🟢 -3.05 kB
assets/CloudLoginView-DI1vM328.js (new) 11.8 kB 🔴 +11.8 kB 🔴 +3.09 kB 🔴 +2.72 kB
assets/CloudLoginView-DYK_2ag-.js (removed) 11.8 kB 🟢 -11.8 kB 🟢 -3.09 kB 🟢 -2.72 kB
assets/UserCheckView-D_MnTddt.js (removed) 10.5 kB 🟢 -10.5 kB 🟢 -2.44 kB 🟢 -2.13 kB
assets/UserCheckView-DGRdajC_.js (new) 10.5 kB 🔴 +10.5 kB 🔴 +2.44 kB 🔴 +2.13 kB
assets/CloudLayoutView-BEjzsgLS.js (new) 8.54 kB 🔴 +8.54 kB 🔴 +2.25 kB 🔴 +1.96 kB
assets/CloudLayoutView-BsORdSao.js (removed) 8.54 kB 🟢 -8.54 kB 🟢 -2.25 kB 🟢 -1.96 kB
assets/CloudSignupView-BqQfHUq_.js (new) 8.18 kB 🔴 +8.18 kB 🔴 +2.33 kB 🔴 +2.03 kB
assets/CloudSignupView-C_zilkio.js (removed) 8.18 kB 🟢 -8.18 kB 🟢 -2.33 kB 🟢 -2.02 kB
assets/CloudForgotPasswordView-CIeYAYR2.js (new) 6.26 kB 🔴 +6.26 kB 🔴 +1.93 kB 🔴 +1.69 kB
assets/CloudForgotPasswordView-D9dWSvdA.js (removed) 6.26 kB 🟢 -6.26 kB 🟢 -1.92 kB 🟢 -1.69 kB
assets/UserSelectView-BqHz6ycT.js (removed) 5.28 kB 🟢 -5.28 kB 🟢 -1.76 kB 🟢 -1.57 kB
assets/UserSelectView-OE96S7LB.js (new) 5.28 kB 🔴 +5.28 kB 🔴 +1.76 kB 🔴 +1.58 kB
assets/CloudSubscriptionRedirectView-C0LQNq7n.js (new) 5.27 kB 🔴 +5.27 kB 🔴 +1.73 kB 🔴 +1.54 kB
assets/CloudSubscriptionRedirectView-cMY8Btcw.js (removed) 5.27 kB 🟢 -5.27 kB 🟢 -1.73 kB 🟢 -1.54 kB
assets/CloudAuthTimeoutView-D7qJN7uz.js (new) 5.24 kB 🔴 +5.24 kB 🔴 +1.71 kB 🔴 +1.48 kB
assets/CloudAuthTimeoutView-DFaNjJba.js (removed) 5.24 kB 🟢 -5.24 kB 🟢 -1.71 kB 🟢 -1.49 kB
assets/CloudSorryContactSupportView-41RMhsFA.js 1.97 kB 1.97 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/layout-DT-CUejm.js 500 B 500 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-Bw-qSzps.js (removed) 23.8 kB 🟢 -23.8 kB 🟢 -5.95 kB 🟢 -5.23 kB
assets/LegacyCreditsPanel-DsTiVp5i.js (new) 23.8 kB 🔴 +23.8 kB 🔴 +5.95 kB 🔴 +5.23 kB
assets/SubscriptionPanel--6j6_Pjf.js (removed) 20.6 kB 🟢 -20.6 kB 🟢 -5 kB 🟢 -4.38 kB
assets/SubscriptionPanel-DxN0JrrQ.js (new) 20.6 kB 🔴 +20.6 kB 🔴 +5 kB 🔴 +4.39 kB
assets/KeybindingPanel-BMOVe0lp.js (removed) 14.2 kB 🟢 -14.2 kB 🟢 -3.73 kB 🟢 -3.31 kB
assets/KeybindingPanel-O6evdk1Z.js (new) 14.2 kB 🔴 +14.2 kB 🔴 +3.74 kB 🔴 +3.31 kB
assets/AboutPanel-DlQqio6I.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.68 kB 🔴 +2.43 kB
assets/AboutPanel-rcpeC7oa.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.68 kB 🟢 -2.42 kB
assets/ExtensionPanel-Cs9Dgray.js (new) 10.2 kB 🔴 +10.2 kB 🔴 +2.71 kB 🔴 +2.4 kB
assets/ExtensionPanel-ObJdRD7w.js (removed) 10.2 kB 🟢 -10.2 kB 🟢 -2.71 kB 🟢 -2.4 kB
assets/ServerConfigPanel-C2-14-nH.js (new) 7.23 kB 🔴 +7.23 kB 🔴 +2.16 kB 🔴 +1.93 kB
assets/ServerConfigPanel-mYsM6lO1.js (removed) 7.23 kB 🟢 -7.23 kB 🟢 -2.16 kB 🟢 -1.94 kB
assets/UserPanel-ACeWaslA.js (removed) 6.58 kB 🟢 -6.58 kB 🟢 -1.91 kB 🟢 -1.67 kB
assets/UserPanel-B7gVlqh6.js (new) 6.58 kB 🔴 +6.58 kB 🔴 +1.91 kB 🔴 +1.67 kB
assets/cloudRemoteConfig-BKN9anlv.js (new) 1.82 kB 🔴 +1.82 kB 🔴 +768 B 🔴 +653 B
assets/cloudRemoteConfig-BuIktDu3.js (removed) 1.82 kB 🟢 -1.82 kB 🟢 -766 B 🟢 -666 B
assets/remoteConfig-BEkdBLxH.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/remoteConfig-D_gf6SLU.js 188 B 188 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-6DVADt2n.js 34.3 kB 34.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-B0j03ezr.js 38.3 kB 38.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BHe-AJJN.js 29.6 kB 29.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BT2lfy0S.js 29.5 kB 29.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Cp0lF2Mp.js 31.2 kB 31.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CwdesOpm.js 32.1 kB 32.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D3SeHgho.js 28.6 kB 28.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D42m_JEJ.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-FF_vLB0C.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-reUMVWRn.js 30.4 kB 30.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-s7kHNBdQ.js 28.9 kB 28.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 removed

User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/auth-cTW80De3.js (new) 3.54 kB 🔴 +3.54 kB 🔴 +1.23 kB 🔴 +1.06 kB
assets/auth-DbIN00zM.js (removed) 3.54 kB 🟢 -3.54 kB 🟢 -1.23 kB 🟢 -1.06 kB
assets/firebaseAuthStore-CAkdhzMa.js (new) 217 B 🔴 +217 B 🔴 +138 B 🔴 +119 B
assets/firebaseAuthStore-DP3qhP2e.js (removed) 217 B 🟢 -217 B 🟢 -138 B 🟢 -121 B
assets/auth-ctPGpK5O.js (removed) 178 B 🟢 -178 B 🟢 -142 B 🟢 -133 B
assets/auth-DDJ-Uvwc.js (new) 178 B 🔴 +178 B 🔴 +142 B 🔴 +139 B

Status: 3 added / 3 removed

Editors & Dialogs — 2.8 kB (baseline 2.8 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useSubscriptionDialog-CldI6Tfo.js (removed) 2.62 kB 🟢 -2.62 kB 🟢 -1.24 kB 🟢 -1.1 kB
assets/useSubscriptionDialog-DR6fBBh9.js (new) 2.62 kB 🔴 +2.62 kB 🔴 +1.24 kB 🔴 +1.09 kB
assets/useSubscriptionDialog-BjZ1aIiD.js (removed) 179 B 🟢 -179 B 🟢 -110 B 🟢 -102 B
assets/useSubscriptionDialog-DspkRizu.js (new) 179 B 🔴 +179 B 🔴 +110 B 🔴 +102 B

Status: 2 added / 2 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscribeButton-DuYvzRDz.js (new) 12.5 kB 🔴 +12.5 kB 🔴 +3.01 kB 🔴 +2.71 kB
assets/SubscribeButton-t3aBd5pf.js (removed) 12.5 kB 🟢 -12.5 kB 🟢 -3.01 kB 🟢 -2.69 kB
assets/ComfyQueueButton-C-izz64R.js (removed) 9.52 kB 🟢 -9.52 kB 🟢 -2.69 kB 🟢 -2.41 kB
assets/ComfyQueueButton-DG3AlY4c.js (new) 9.52 kB 🔴 +9.52 kB 🔴 +2.69 kB 🔴 +2.42 kB
assets/CloudBadge-C34UbB_u.js (new) 1.85 kB 🔴 +1.85 kB 🔴 +729 B 🔴 +646 B
assets/CloudBadge-Di16CwjI.js (removed) 1.85 kB 🟢 -1.85 kB 🟢 -727 B 🟢 -648 B
assets/cloudFeedbackTopbarButton-BgpfYPD0.js (removed) 866 B 🟢 -866 B 🟢 -525 B 🟢 -470 B
assets/cloudFeedbackTopbarButton-CWlj4LY-.js (new) 866 B 🔴 +866 B 🔴 +526 B 🔴 +447 B
assets/ComfyQueueButton-B1OkCOCE.js (removed) 181 B 🟢 -181 B 🟢 -118 B 🟢 -123 B
assets/ComfyQueueButton-Cc9ZhL6j.js (new) 181 B 🔴 +181 B 🔴 +118 B 🔴 +115 B
assets/Button-CKxdX0Yq.js 3.75 kB 3.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar-Bj7TTp1S.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-DZ-mX5uq.js 2.41 kB 2.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

Data & Services — 3.04 MB (baseline 3.04 MB) • 🔴 +926 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/dialogService-CVAJnu9J.js (new) 1.87 MB 🔴 +1.87 MB 🔴 +397 kB 🔴 +304 kB
assets/dialogService-BmZNH-2t.js (removed) 1.87 MB 🟢 -1.87 MB 🟢 -397 kB 🟢 -304 kB
assets/api-BurC0EGl.js (removed) 1.15 MB 🟢 -1.15 MB 🟢 -240 kB 🟢 -186 kB
assets/api-Sh3AilGt.js (new) 1.15 MB 🔴 +1.15 MB 🔴 +240 kB 🔴 +186 kB
assets/releaseStore-C7T1M2nQ.js (new) 8.91 kB 🔴 +8.91 kB 🔴 +2.41 kB 🔴 +2.13 kB
assets/releaseStore-CoTdWCpL.js (removed) 8.91 kB 🟢 -8.91 kB 🟢 -2.41 kB 🟢 -2.13 kB
assets/keybindingService-DqExbyGu.js (removed) 6.78 kB 🟢 -6.78 kB 🟢 -1.74 kB 🟢 -1.51 kB
assets/keybindingService-yjU56zyi.js (new) 6.78 kB 🔴 +6.78 kB 🔴 +1.75 kB 🔴 +1.52 kB
assets/userStore-CLTIQfBk.js (removed) 2.16 kB 🟢 -2.16 kB 🟢 -812 B 🟢 -727 B
assets/userStore-CphrybVf.js (new) 2.16 kB 🔴 +2.16 kB 🔴 +812 B 🔴 +727 B
assets/audioService-BokT7m9w.js (removed) 2.03 kB 🟢 -2.03 kB 🟢 -929 B 🟢 -822 B
assets/audioService-CdAp3Auv.js (new) 2.03 kB 🔴 +2.03 kB 🔴 +925 B 🔴 +821 B
assets/releaseStore-DOtm2oFw.js (new) 140 B 🔴 +140 B 🔴 +106 B 🔴 +106 B
assets/releaseStore-EjSs46di.js (removed) 140 B 🟢 -140 B 🟢 -106 B 🟢 -107 B
assets/serverConfigStore-sopnD88s.js 2.64 kB 2.64 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 7 added / 7 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useErrorHandling-BjfTmDfb.js (removed) 5.08 kB 🟢 -5.08 kB 🟢 -1.5 kB 🟢 -1.31 kB
assets/useErrorHandling-CmoXd-9-.js (new) 5.08 kB 🔴 +5.08 kB 🔴 +1.5 kB 🔴 +1.31 kB
assets/subscriptionCheckoutUtil-CcEi_l6D.js (removed) 1.98 kB 🟢 -1.98 kB 🟢 -861 B 🟢 -753 B
assets/subscriptionCheckoutUtil-CPmXX6k1.js (new) 1.98 kB 🔴 +1.98 kB 🔴 +862 B 🔴 +751 B
assets/audioUtils-Cymu288q.js (new) 1.24 kB 🔴 +1.24 kB 🔴 +619 B 🔴 +529 B
assets/audioUtils-xvielTqY.js (removed) 1.24 kB 🟢 -1.24 kB 🟢 -619 B 🟢 -528 B
assets/useCurrentUser-Bz-FoAwr.js (new) 145 B 🔴 +145 B 🔴 +114 B 🔴 +104 B
assets/useCurrentUser-McOSuQr7.js (removed) 145 B 🟢 -145 B 🟢 -114 B 🟢 -99 B
assets/_plugin-vue_export-helper-xVPqUhAl.js 467 B 467 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/colorUtil-BTZOs5h9.js 7.2 kB 7.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/markdownRendererUtil-B9qvfWYq.js 1.78 kB 1.78 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-BUCOyXf2.js 421 B 421 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/tailwindUtil-DTv34axN.js 487 B 487 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 4 added / 4 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-Dr8GmMlH.js 408 kB 408 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-CpOC_out.js 3.92 MB 3.92 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-DvjPM_Lx.js 3.04 MB 3.04 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-reka-ui-BRjoKiJi.js 172 kB 172 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-Dqb1VEds.js 1.83 MB 1.83 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-BxNhpyUI.js 650 kB 650 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-7XRCqLaG.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-CArXWFIl.js 398 kB 398 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 6.28 MB (baseline 6.28 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-C25yP45N.js (new) 177 kB 🔴 +177 kB 🔴 +42.8 kB 🔴 +35.7 kB
assets/core-CAfp1kiM.js (removed) 177 kB 🟢 -177 kB 🟢 -42.8 kB 🟢 -35.8 kB
assets/Load3D-BlSQ_3VU.js (removed) 55.7 kB 🟢 -55.7 kB 🟢 -9.18 kB 🟢 -7.93 kB
assets/Load3D-D060m-Lc.js (new) 55.7 kB 🔴 +55.7 kB 🔴 +9.18 kB 🔴 +7.92 kB
assets/WidgetSelect-BmTVa3nG.js (removed) 50.5 kB 🟢 -50.5 kB 🟢 -11.1 kB 🟢 -9.67 kB
assets/WidgetSelect-h2xgEAkv.js (new) 50.5 kB 🔴 +50.5 kB 🔴 +11.1 kB 🔴 +9.68 kB
assets/SubscriptionRequiredDialogContent-B-u1Icy5.js (removed) 28.7 kB 🟢 -28.7 kB 🟢 -6.78 kB 🟢 -5.91 kB
assets/SubscriptionRequiredDialogContent-C0-he_Ae.js (new) 28.7 kB 🔴 +28.7 kB 🔴 +6.78 kB 🔴 +5.9 kB
assets/WidgetRecordAudio-C1Ma1LQe.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.96 kB 🟢 -4.42 kB
assets/WidgetRecordAudio-C2elJ8zz.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.96 kB 🔴 +4.43 kB
assets/WidgetInputNumber-B0HoFT7e.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.49 kB 🟢 -4 kB
assets/WidgetInputNumber-t-6IfVTB.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.49 kB 🔴 +4.01 kB
assets/WidgetImageCrop-B-9uuvD8.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -4.13 kB 🟢 -3.62 kB
assets/WidgetImageCrop-Bjp79DMi.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +4.14 kB 🔴 +3.63 kB
assets/PanelTemplate-BnkQHcKb.js (new) 16.2 kB 🔴 +16.2 kB 🔴 +5.45 kB 🔴 +4.79 kB
assets/PanelTemplate-I3HkngXS.js (removed) 16.2 kB 🟢 -16.2 kB 🟢 -5.45 kB 🟢 -4.8 kB
assets/AudioPreviewPlayer-B2I-LyJ8.js (removed) 12.7 kB 🟢 -12.7 kB 🟢 -3.47 kB 🟢 -3.11 kB
assets/AudioPreviewPlayer-C5rHd8_P.js (new) 12.7 kB 🔴 +12.7 kB 🔴 +3.47 kB 🔴 +3.12 kB
assets/WidgetWithControl-C4ofBRSl.js (new) 8.02 kB 🔴 +8.02 kB 🔴 +2.65 kB 🔴 +2.39 kB
assets/WidgetWithControl-DeizYLxo.js (removed) 8.02 kB 🟢 -8.02 kB 🟢 -2.65 kB 🟢 -2.38 kB
assets/ValueControlPopover-BNbn17Iz.js (removed) 4.86 kB 🟢 -4.86 kB 🟢 -1.55 kB 🟢 -1.37 kB
assets/ValueControlPopover-DkG-6JLR.js (new) 4.86 kB 🔴 +4.86 kB 🔴 +1.55 kB 🔴 +1.37 kB
assets/WidgetAudioUI-B2C0Vzbt.js (removed) 3.22 kB 🟢 -3.22 kB 🟢 -1.19 kB 🟢 -1.08 kB
assets/WidgetAudioUI-BHdjB3wL.js (new) 3.22 kB 🔴 +3.22 kB 🔴 +1.19 kB 🔴 +1.07 kB
assets/GlobalToast-BNJ30wAj.js (removed) 3.05 kB 🟢 -3.05 kB 🟢 -1.09 kB 🟢 -939 B
assets/GlobalToast-dDSNsk4k.js (new) 3.05 kB 🔴 +3.05 kB 🔴 +1.09 kB 🔴 +938 B
assets/SubscribeToRun-hzI-ICid.js (removed) 2.96 kB 🟢 -2.96 kB 🟢 -1.15 kB 🟢 -1.01 kB
assets/SubscribeToRun-LGv_ZF6S.js (new) 2.96 kB 🔴 +2.96 kB 🔴 +1.15 kB 🔴 +1.04 kB
assets/cloudSessionCookie-CLicMsMt.js (new) 2.9 kB 🔴 +2.9 kB 🔴 +915 B 🔴 +795 B
assets/cloudSessionCookie-DsJZC_HC.js (removed) 2.9 kB 🟢 -2.9 kB 🟢 -917 B 🟢 -798 B
assets/BaseViewTemplate-BLGKwXa8.js (removed) 2.42 kB 🟢 -2.42 kB 🟢 -1.04 kB 🟢 -926 B
assets/BaseViewTemplate-C9DQtIhY.js (new) 2.42 kB 🔴 +2.42 kB 🔴 +1.04 kB 🔴 +925 B
assets/CloudRunButtonWrapper-DM-caYTV.js (new) 1.79 kB 🔴 +1.79 kB 🔴 +644 B 🔴 +596 B
assets/CloudRunButtonWrapper-DNivRSBr.js (removed) 1.79 kB 🟢 -1.79 kB 🟢 -641 B 🟢 -561 B
assets/cloudBadges-Cko79qEJ.js (new) 1.08 kB 🔴 +1.08 kB 🔴 +537 B 🔴 +479 B
assets/cloudBadges-DJ3kVzYE.js (removed) 1.08 kB 🟢 -1.08 kB 🟢 -537 B 🟢 -484 B
assets/graphHasMissingNodes-DnhSu6Cw.js (removed) 1.06 kB 🟢 -1.06 kB 🟢 -458 B 🟢 -422 B
assets/graphHasMissingNodes-t5GjkVzo.js (new) 1.06 kB 🔴 +1.06 kB 🔴 +460 B 🔴 +423 B
assets/cloudSubscription-bffn48qz.js (new) 976 B 🔴 +976 B 🔴 +457 B 🔴 +397 B
assets/cloudSubscription-Df4Xpu2x.js (removed) 976 B 🟢 -976 B 🟢 -461 B 🟢 -396 B
assets/AudioPreviewPlayer-DF_IwdX2.js (new) 191 B 🔴 +191 B 🔴 +120 B 🔴 +123 B
assets/AudioPreviewPlayer-yksWGnIS.js (removed) 191 B 🟢 -191 B 🟢 -120 B 🟢 -122 B
assets/WidgetInputNumber-C9yVdnVO.js (new) 186 B 🔴 +186 B 🔴 +119 B 🔴 +112 B
assets/WidgetInputNumber-CLu0ly2F.js (removed) 186 B 🟢 -186 B 🟢 -119 B 🟢 -111 B
assets/WidgetLegacy-g9ZQ5O8x.js (new) 164 B 🔴 +164 B 🔴 +125 B 🔴 +107 B
assets/WidgetLegacy-UnU84Z9F.js (removed) 164 B 🟢 -164 B 🟢 -125 B 🟢 -104 B
assets/WidgetSelect-Dlq4pLXA.js (removed) 161 B 🟢 -161 B 🟢 -113 B 🟢 -117 B
assets/WidgetSelect-UUqFEtnM.js (new) 161 B 🔴 +161 B 🔴 +113 B 🔴 +106 B
assets/Load3D-D-sa5T-a.js (removed) 131 B 🟢 -131 B 🟢 -107 B 🟢 -108 B
assets/Load3D-dT7tDGIJ.js (new) 131 B 🔴 +131 B 🔴 +107 B 🔴 +119 B
assets/auto-Bv9cmrEd.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-6dIwsSNi.js 17.2 kB 17.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BahwM9ZP.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BoJZgy7S.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BQtdp20P.js 20.6 kB 20.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CEMgeOuO.js 18.5 kB 18.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CnxND6sZ.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-coXkrooi.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CZcHDaAg.js 18.8 kB 18.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DDPGTXy9.js 17.9 kB 17.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DsGC6118.js 17.8 kB 17.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-yZ2AjT4s.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage-DHuYMTZW.js 14.1 kB 14.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B_sPkRkB.js 121 kB 121 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BAkXMjmM.js 141 kB 141 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BENvLtOF.js 117 kB 117 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BNsn8_Lr.js 120 kB 120 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9XUWxrh.js 105 kB 105 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Ch4S7NKM.js 105 kB 105 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DqG_JuMY.js 161 kB 161 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DSqO9eB5.js 124 kB 124 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-F6Zr8qmN.js 118 kB 118 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-kF4hEjF-.js 145 kB 145 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-KWKxelma.js 134 kB 134 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-DEJN4gIz.js 2.38 kB 2.38 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-D39-6tpk.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-CVYh1Dta.js 2.34 kB 2.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-D7WAsNtO.js 2.84 kB 2.84 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/mixpanel.module-DaKz7N-R.js 143 B 143 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-42NP799-.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-5Wl7kJtq.js 361 kB 361 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bfo_nHET.js 361 kB 361 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIaHseXE.js 334 kB 334 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BqTE0tnV.js 437 kB 437 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CkFt94jg.js 365 kB 365 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-COXALCSv.js 374 kB 374 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cuv6XdUW.js 332 kB 332 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CyylrXT5.js 355 kB 355 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DN_FfVrO.js 403 kB 403 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dxwvr4db.js 403 kB 403 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/preservedQueryNamespaces-BsMrb3S_.js 3.23 kB 3.23 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/previousFullPath-DZ1Jt5wB.js 838 B 838 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/rolldown-runtime-CqTjxoQm.js 1.53 kB 1.53 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Slider-Buvb2eP-.js 4.21 kB 4.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widget-Dneex3J5.js 518 B 518 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-BRX2wHPg.js 4.71 kB 4.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-BttrDPHP.js 186 B 186 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-Cw5Ye8UP.js 2.79 kB 2.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-Dv0MELOX.js 3.71 kB 3.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-BwLByoy7.js 4.57 kB 4.57 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-BpLJ-dSO.js 3.79 kB 3.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-C57tLR52.js 2.58 kB 2.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField-BmL9OHU7.js 2.61 kB 2.61 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-B4aB3N7S.js 3.22 kB 3.22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-DfR_ZXyS.js 1.31 kB 1.31 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-CZnm93Po.js 3.52 kB 3.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-B0EfCU8u.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 25 added / 25 removed

- Add isCloud mock for Cloud environment handling
- Add ComfyWorkflow export to workflowStore mock
- Add executionStore mock for clearInitializationByPromptId

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai coderabbitai bot requested a review from Yorha4D January 21, 2026 04:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/composables/queue/useJobMenu.test.ts`:
- Around line 112-117: The tests for the cancel behavior currently mock
executionStore.clearInitializationByPromptId but never assert it was invoked;
update the cancel-related tests to assert that
executionStoreMock.clearInitializationByPromptId was called with the correct
promptId when canceling both running and initializing jobs. Locate the cancel
test cases (the tests exercising the cancel action/path) and add expectations
like
expect(executionStoreMock.clearInitializationByPromptId).toHaveBeenCalledWith(expectedPromptId)
and corresponding toHaveBeenCalled checks for each scenario to prevent
regressions; ensure you reference the same promptId used in the test setup so
the assertion verifies the intended removal behavior.
- Around line 8-10: Add tests covering the Cloud-specific cancel path by mocking
isCloud true per-test (use vi.hoisted to expose an isCloudMock with a getter
like in the suggestion), then in a new test for cancelJob (use mountJobMenu,
setCurrentItem with createJobItem state 'running' or 'initializing') set
isCloudMock.value = true, call cancelJob, and assert that deleteItemMock
(api.deleteItem) was called with the expected args and interruptMock
(api.interrupt) was not called; also add the inverse check for isCloudMock.value
= false to ensure existing behavior remains unchanged.

Comment on lines +8 to +10
vi.mock('@/platform/distribution/types', () => ({
isCloud: false
}))
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 21, 2026

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Missing test coverage for Cloud environment cancel behavior.

The mock sets isCloud: false, which tests local behavior. Per the PR objectives, Cloud environments require api.deleteItem() instead of api.interrupt() for canceling running/initializing jobs. Consider adding test cases that mock isCloud: true and verify the Cloud-specific cancel path.

Suggested approach using vi.hoisted for per-test isCloud control
const { isCloudMock } = vi.hoisted(() => ({
  isCloudMock: { value: false }
}))

vi.mock('@/platform/distribution/types', () => ({
  get isCloud() {
    return isCloudMock.value
  }
}))

// Then in test:
it('cancels running job via deleteItem in Cloud environment', async () => {
  isCloudMock.value = true
  const { cancelJob } = mountJobMenu()
  setCurrentItem(createJobItem({ state: 'running' }))

  await cancelJob()

  expect(deleteItemMock).toHaveBeenCalledWith('queue', 'job-1')
  expect(interruptMock).not.toHaveBeenCalled()
})
🤖 Prompt for AI Agents
In `@src/composables/queue/useJobMenu.test.ts` around lines 8 - 10, Add tests
covering the Cloud-specific cancel path by mocking isCloud true per-test (use
vi.hoisted to expose an isCloudMock with a getter like in the suggestion), then
in a new test for cancelJob (use mountJobMenu, setCurrentItem with createJobItem
state 'running' or 'initializing') set isCloudMock.value = true, call cancelJob,
and assert that deleteItemMock (api.deleteItem) was called with the expected
args and interruptMock (api.interrupt) was not called; also add the inverse
check for isCloudMock.value = false to ensure existing behavior remains
unchanged.

Copy link
Member

Choose a reason for hiding this comment

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

This is true

Copy link
Contributor

Choose a reason for hiding this comment

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

@benceruleanlu, thanks for confirming! Would you like me to add the test coverage for the Cloud environment cancel behavior? I can implement the suggestion using vi.hoisted() to allow per-test control of the isCloud mock value, which would verify both the Cloud path (using api.deleteItem()) and the local path (using api.interrupt()) for running and initializing jobs.

Just let me know if you'd like me to proceed with adding those tests! 🐰


🧠 Learnings used
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : For mocking in tests, leverage Vitest's utilities; keep module mocks contained without global mutable state

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : For component testing, use Vue Test Utils and make components easy to test

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Use `vi.hoisted()` if necessary to allow per-test Arrange phase manipulation of mock state

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts) : Do not mock what you don't own; be selective with external dependencies

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Aim for behavioral coverage of critical and new features

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Do not write tests that just test the mocks; ensure tests fail when code behaves unexpectedly

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:34.380Z
Learning: Applies to +(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts) : Write tests for all changes, especially bug fixes to catch regressions

Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.

Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.

Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:46.909Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: Do not stub primitive UI components or customized primitive components (e.g., Button). Instead, import and register the real components in test setup. This ensures tests accurately reflect production behavior and component API usage.

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/AGENTS.md:0-0
Timestamp: 2026-01-16T21:33:39.388Z
Learning: Applies to browser_tests/**/*.spec.ts : Use premade JSON workflows in the `assets/` directory to load desired graph state in E2E tests

Learnt from: henrikvilhelmberglund
Repo: Comfy-Org/ComfyUI_frontend PR: 7617
File: src/components/actionbar/ComfyActionbar.vue:301-308
Timestamp: 2025-12-18T16:03:09.642Z
Learning: In the ComfyUI frontend queue system (src/stores/queueStore.ts), the `useQueuePendingTaskCountStore().count` includes the currently executing task. When count = 1, there is only the active/running task with no pending tasks. When count > 1, there is an active task plus pending tasks waiting in the queue. The "Clear Pending Tasks" button should only be enabled when count > 1 to avoid clearing the currently running task, which should be handled by the "Cancel current run" button instead.

Comment on lines +112 to +117
const executionStoreMock = {
clearInitializationByPromptId: vi.fn()
}
vi.mock('@/stores/executionStore', () => ({
useExecutionStore: () => executionStoreMock
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing test assertions for clearInitializationByPromptId behavior.

The mock is added but the cancel tests (lines 255-288) don't verify that clearInitializationByPromptId is called when canceling running or initializing jobs. Since this PR fixes a bug where initializing jobs weren't removed from the UI on cancellation, tests should assert this behavior to prevent regressions.

Suggested test enhancement
  it.each([
    ['running', interruptMock, deleteItemMock],
    ['initialization', interruptMock, deleteItemMock]
  ])('cancels %s job via interrupt', async (state) => {
    const { cancelJob } = mountJobMenu()
    setCurrentItem(createJobItem({ state: state as any }))

    await cancelJob()

    expect(interruptMock).toHaveBeenCalledWith('job-1')
    expect(deleteItemMock).not.toHaveBeenCalled()
    expect(queueStoreMock.update).toHaveBeenCalled()
+   expect(executionStoreMock.clearInitializationByPromptId).toHaveBeenCalledWith('job-1')
  })

  it('cancels pending job via deleteItem', async () => {
    const { cancelJob } = mountJobMenu()
    setCurrentItem(createJobItem({ state: 'pending' }))

    await cancelJob()

    expect(deleteItemMock).toHaveBeenCalledWith('queue', 'job-1')
    expect(queueStoreMock.update).toHaveBeenCalled()
+   expect(executionStoreMock.clearInitializationByPromptId).toHaveBeenCalledWith('job-1')
  })
🤖 Prompt for AI Agents
In `@src/composables/queue/useJobMenu.test.ts` around lines 112 - 117, The tests
for the cancel behavior currently mock
executionStore.clearInitializationByPromptId but never assert it was invoked;
update the cancel-related tests to assert that
executionStoreMock.clearInitializationByPromptId was called with the correct
promptId when canceling both running and initializing jobs. Locate the cancel
test cases (the tests exercising the cancel action/path) and add expectations
like
expect(executionStoreMock.clearInitializationByPromptId).toHaveBeenCalledWith(expectedPromptId)
and corresponding toHaveBeenCalled checks for each scenario to prevent
regressions; ensure you reference the same promptId used in the test setup so
the assertion verifies the intended removal behavior.

Copy link
Member

@benceruleanlu benceruleanlu left a comment

Choose a reason for hiding this comment

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

LGTM, it really looks like we need to refactor this for readability later, out of scope for this PR though

@viva-jinyi viva-jinyi merged commit d9e5b07 into Comfy-Org:main Jan 21, 2026
27 checks passed
godwiniheuwa pushed a commit to godwiniheuwa/ComfyUI_frontend that referenced this pull request Jan 22, 2026
…om UI (Comfy-Org#8203)

## Summary

- Fix: Initializing jobs now properly disappear from UI when cancelled
or cleared
- Add `clearInitializationByPromptIds` batch function for optimized Set
operations
- Handle Cloud vs local environment correctly (use `api.deleteItem` for
Cloud, `api.interrupt` for local)

## Problem

When clicking 'Clear queue' button or X button on initializing jobs, the
jobs remained visible in both AssetsSidebarListView and JobQueue
components until page refresh.

## Root Cause

1. `initializingPromptIds` in `executionStore` was not being cleared
when jobs were cancelled/deleted
2. Cloud environment requires `api.deleteItem()` instead of
`api.interrupt()` for cancellation

## Changes

- `src/stores/executionStore.ts`: Export `clearInitializationByPromptId`
and add batch `clearInitializationByPromptIds` function
- `src/composables/queue/useJobMenu.ts`: Add Cloud branch handling and
initialization cleanup
- `src/components/queue/QueueProgressOverlay.vue`: Fix `onCancelItem()`,
`cancelQueuedWorkflows()`, `interruptAll()`
- `src/components/sidebar/tabs/AssetsSidebarTab.vue`: Add initialization
cleanup to `handleClearQueue()`


[screen-capture.webm](https://github.com/user-attachments/assets/0bf911c2-d8f4-427c-96e0-4784e8fe0f08)


🤖 Generated with [Claude Code](https://claude.com/claude-code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8203-bugfix-Clear-queue-button-now-properly-removes-initializing-jobs-from-UI-2ef6d73d36508162a55bd84ad39ab49c)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@christian-byrne christian-byrne added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch cloud/1.37 Backport PRs for cloud 1.37 labels Jan 24, 2026
@github-actions
Copy link

⚠️ Backport to cloud/1.37 failed

Reason: Merge conflicts detected during cherry-pick of d9e5b07

📄 Conflicting files
src/components/sidebar/tabs/AssetsSidebarTab.vue
src/composables/queue/useJobMenu.test.ts
🤖 Prompt for AI Agents
Backport PR #8203 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/8203) to cloud/1.37.
Cherry-pick merge commit d9e5b07c738255b2ec38155dab5aa6ac1e689786 onto new branch
backport-8203-to-cloud-1.37 from origin/cloud/1.37.
Resolve conflicts in: src/components/sidebar/tabs/AssetsSidebarTab.vue src/composables/queue/useJobMenu.test.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.37] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @viva-jinyi

1 similar comment
@github-actions
Copy link

⚠️ Backport to cloud/1.37 failed

Reason: Merge conflicts detected during cherry-pick of d9e5b07

📄 Conflicting files
src/components/sidebar/tabs/AssetsSidebarTab.vue
src/composables/queue/useJobMenu.test.ts
🤖 Prompt for AI Agents
Backport PR #8203 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/8203) to cloud/1.37.
Cherry-pick merge commit d9e5b07c738255b2ec38155dab5aa6ac1e689786 onto new branch
backport-8203-to-cloud-1.37 from origin/cloud/1.37.
Resolve conflicts in: src/components/sidebar/tabs/AssetsSidebarTab.vue src/composables/queue/useJobMenu.test.ts .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.37] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @viva-jinyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:assets-sidebar cloud/1.37 Backport PRs for cloud 1.37 needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants