From cd06e143094b0dff3f4a8b50aa080387c55abe3c Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Mon, 12 Oct 2026 12:11:03 +0700 Subject: [PATCH] =?UTF-8?q?fix(cmd):=20the=20Switch=20to=20button=20shows?= =?UTF-8?q?=20its=20=E2=8C=98=E2=86=B5=20shortcut=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 65f8fa6e dropped the hint unintentionally. --- apps/desktop/renderer/cmd/panel.html | 6 ++++++ .../tests/desktop-serial/cmd-switch-to-page.spec.ts | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/desktop/renderer/cmd/panel.html b/apps/desktop/renderer/cmd/panel.html index fa2db9a7..222dd1c3 100644 --- a/apps/desktop/renderer/cmd/panel.html +++ b/apps/desktop/renderer/cmd/panel.html @@ -577,6 +577,11 @@ #url-action:hover { background: var(--cmd-surface-selected); } #url-action:active { transform: scale(0.98); } #url-action .icon-window { display: block; } + #url-action kbd { + font-family: inherit; + font-size: 11px; + color: var(--theme-text-muted, #999); + } /* Chain steps - shows the pipe history */ #chain-steps { @@ -647,6 +652,7 @@ + ⌘↵
diff --git a/apps/desktop/tests/desktop-serial/cmd-switch-to-page.spec.ts b/apps/desktop/tests/desktop-serial/cmd-switch-to-page.spec.ts index f92fcf5b..4e752f7d 100644 --- a/apps/desktop/tests/desktop-serial/cmd-switch-to-page.spec.ts +++ b/apps/desktop/tests/desktop-serial/cmd-switch-to-page.spec.ts @@ -17,7 +17,7 @@ import { waitForExtensionsReady, waitForAppReady, waitForPanelCommandsLoaded } f * a marker, and picking that row switches to the window. * * Contract this spec pins: `button#url-action` inside `cmd/panel.html`, shown - * with `data-action="switch"` and the text "Switch to" only for an open page; + * with `data-action="switch"` and the label "Switch to" and a ⌘↵ hint only for an open page; * Visited rows are `.url-result-item[data-url=""]`, and an open page's * row holds a `.url-open-marker`. * @@ -127,7 +127,8 @@ test.describe('Cmd panel switch-to-page action @desktop', () => { const action = panel.locator('button#url-action'); await expect(action, 'the URL action button is missing').toBeVisible({ timeout: 5000 }); await expect(action).toHaveAttribute('data-action', 'switch', { timeout: 5000 }); - await expect(action).toHaveText('Switch to', { timeout: 5000 }); + await expect(action.locator('.url-action-label')).toHaveText('Switch to', { timeout: 5000 }); + await expect(action.locator('kbd')).toHaveText('⌘↵'); // Cmd+Enter. Keydown only: switching moves focus away and the panel can // close before a keyup would be delivered. @@ -245,7 +246,7 @@ test.describe('Cmd panel switch-to-page action @desktop', () => { const [lateId] = await liveWindowsAt(LATE_URL); await expect(action, 'the button did not notice the window opening').toBeVisible({ timeout: 5000 }); await expect(action).toHaveAttribute('data-action', 'switch', { timeout: 5000 }); - await expect(action).toHaveText('Switch to', { timeout: 5000 }); + await expect(action.locator('.url-action-label')).toHaveText('Switch to', { timeout: 5000 }); // And hidden again once that window closes. await bgWindow.evaluate(async (id: number) => { -- knotmirror 0.0.1