From d99d807c4598e17c2b9980480f569000741dbd7e Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Wed, 25 Feb 2026 20:40:11 -0800 Subject: [PATCH] fix: open job history from top menu active jobs button (#9210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Make the top menu `N active` queue button open the Job History sidebar tab when QPO V2 is enabled, so behavior matches the button label and accessibility text. ## Changes - Update `TopMenuSection.vue` so QPO V2 mode toggles `job-history` instead of `assets` - Update `aria-pressed` logic to track `job-history` - Update `TopMenuSection` unit tests to assert `job-history` ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9210-fix-open-job-history-from-top-menu-active-jobs-button-3126d73d365081758987fa3806b4b0e7) by [Unito](https://www.unito.io) --- src/components/TopMenuSection.test.ts | 8 ++++---- src/components/TopMenuSection.vue | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/TopMenuSection.test.ts b/src/components/TopMenuSection.test.ts index c7e8ac7cba..3d17188b22 100644 --- a/src/components/TopMenuSection.test.ts +++ b/src/components/TopMenuSection.test.ts @@ -262,7 +262,7 @@ describe('TopMenuSection', () => { ) }) - it('opens the assets sidebar tab when QPO V2 is enabled', async () => { + it('opens the job history sidebar tab when QPO V2 is enabled', async () => { const pinia = createTestingPinia({ createSpy: vi.fn, stubActions: false }) const settingStore = useSettingStore(pinia) vi.mocked(settingStore.get).mockImplementation((key) => @@ -273,10 +273,10 @@ describe('TopMenuSection', () => { await wrapper.find('[data-testid="queue-overlay-toggle"]').trigger('click') - expect(sidebarTabStore.activeSidebarTabId).toBe('assets') + expect(sidebarTabStore.activeSidebarTabId).toBe('job-history') }) - it('toggles the assets sidebar tab when QPO V2 is enabled', async () => { + it('toggles the job history sidebar tab when QPO V2 is enabled', async () => { const pinia = createTestingPinia({ createSpy: vi.fn, stubActions: false }) const settingStore = useSettingStore(pinia) vi.mocked(settingStore.get).mockImplementation((key) => @@ -287,7 +287,7 @@ describe('TopMenuSection', () => { const toggleButton = wrapper.find('[data-testid="queue-overlay-toggle"]') await toggleButton.trigger('click') - expect(sidebarTabStore.activeSidebarTabId).toBe('assets') + expect(sidebarTabStore.activeSidebarTabId).toBe('job-history') await toggleButton.trigger('click') expect(sidebarTabStore.activeSidebarTabId).toBe(null) diff --git a/src/components/TopMenuSection.vue b/src/components/TopMenuSection.vue index b402b93b12..a91d5e848f 100644 --- a/src/components/TopMenuSection.vue +++ b/src/components/TopMenuSection.vue @@ -62,7 +62,7 @@ size="md" :aria-pressed=" isQueuePanelV2Enabled - ? activeSidebarTabId === 'assets' + ? activeSidebarTabId === 'job-history' : isQueueProgressOverlayEnabled ? isQueueOverlayExpanded : undefined @@ -283,7 +283,7 @@ onMounted(() => { const toggleQueueOverlay = () => { if (isQueuePanelV2Enabled.value) { - sidebarTabStore.toggleSidebarTab('assets') + sidebarTabStore.toggleSidebarTab('job-history') return } commandStore.execute('Comfy.Queue.ToggleOverlay')