From c8ba5f7300a74a472cb7114c9ccd5298e1d5b3cd Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Mon, 16 Feb 2026 17:32:33 -0800 Subject: [PATCH] fix: add pulsing active-jobs indicator on queue button (#8915) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add a small pulsing blue indicator dot to the top-right of the `N active` queue button when there are active jobs. ## Changes - **What**: Reused `StatusBadge` (`variant="dot"`) in `TopMenuSection` as a top-right indicator on the queue toggle button, shown only when `activeJobsCount > 0` and animated with `animate-pulse`. - **What**: Added tests to verify the indicator appears for nonzero active jobs and is hidden when there are no active jobs. ## Review Focus - Dot positioning on the queue button (`-top-0.5 -right-0.5`) across top menu layouts. - Indicator visibility behavior tied to `activeJobsCount > 0`. ## Screenshots (if applicable) https://github.com/user-attachments/assets/9bdb7675-3e58-485b-abdd-446a76b2dafc won't be shown on 0 active, I was just testing locally ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8915-fix-add-pulsing-active-jobs-indicator-on-queue-button-3096d73d36508181abf5c27662e0d9ae) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown --- src/components/TopMenuSection.test.ts | 11 +++++++++++ src/components/TopMenuSection.vue | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/TopMenuSection.test.ts b/src/components/TopMenuSection.test.ts index c9693caedf..2ef1ffef55 100644 --- a/src/components/TopMenuSection.test.ts +++ b/src/components/TopMenuSection.test.ts @@ -215,6 +215,17 @@ describe('TopMenuSection', () => { const queueButton = wrapper.find('[data-testid="queue-overlay-toggle"]') expect(queueButton.text()).toContain('3 active') + expect(wrapper.find('[data-testid="active-jobs-indicator"]').exists()).toBe( + true + ) + }) + + it('hides the active jobs indicator when no jobs are active', () => { + const wrapper = createWrapper() + + expect(wrapper.find('[data-testid="active-jobs-indicator"]').exists()).toBe( + false + ) }) it('hides queue progress overlay when QPO V2 is enabled', async () => { diff --git a/src/components/TopMenuSection.vue b/src/components/TopMenuSection.vue index 5dc780b62f..69f79baad0 100644 --- a/src/components/TopMenuSection.vue +++ b/src/components/TopMenuSection.vue @@ -60,7 +60,7 @@ ? isQueueOverlayExpanded : undefined " - class="px-3" + class="relative px-3" data-testid="queue-overlay-toggle" @click="toggleQueueOverlay" @contextmenu.stop.prevent="showQueueContextMenu" @@ -68,6 +68,12 @@ {{ activeJobsLabel }} + {{ isQueuePanelV2Enabled @@ -139,6 +145,7 @@ import { useI18n } from 'vue-i18n' import ComfyActionbar from '@/components/actionbar/ComfyActionbar.vue' import SubgraphBreadcrumb from '@/components/breadcrumb/SubgraphBreadcrumb.vue' +import StatusBadge from '@/components/common/StatusBadge.vue' import QueueInlineProgressSummary from '@/components/queue/QueueInlineProgressSummary.vue' import QueueNotificationBannerHost from '@/components/queue/QueueNotificationBannerHost.vue' import QueueProgressOverlay from '@/components/queue/QueueProgressOverlay.vue'