From b5dda4e1c23741bcc5db4f79d326127664314d91 Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Thu, 1 Oct 2026 22:35:52 +0200 Subject: [PATCH] Add pop-out and full screen to the stream's right-click menu Co-Authored-By: Claude Opus 5.5 --- src/ui/VoiceStage.svelte | 7 ++++++- test/e2e/share.e2e.ts | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ui/VoiceStage.svelte b/src/ui/VoiceStage.svelte index 5f39ee8..893672e 100644 --- a/src/ui/VoiceStage.svelte +++ b/src/ui/VoiceStage.svelte @@ -124,7 +124,12 @@ // Right-click on the picture let showStats = $state(false); - const streamMenu = (e: MouseEvent) => menu.show(e, [{ label: 'Stats for nerds', checked: showStats, action: () => (showStats = !showStats) }]); + const streamMenu = (e: MouseEvent) => menu.show(e, [ + { label: 'Open in a separate window', action: popOut }, + { label: 'Full screen', action: fullscreen }, + { separator: true, label: '' }, + { label: 'Stats for nerds', checked: showStats, action: () => (showStats = !showStats) } + ]); let frame = $state(); function fullscreen() { diff --git a/test/e2e/share.e2e.ts b/test/e2e/share.e2e.ts index 5075d78..d4f8109 100644 --- a/test/e2e/share.e2e.ts +++ b/test/e2e/share.e2e.ts @@ -169,7 +169,9 @@ try { // The large picture can move to a window of its own const opened = bob.app.waitForEvent('window'); - await view.getByRole('button', { name: 'Open in a separate window' }).click(); + // From the right-click menu on the picture + await bob.page.locator('.spot video').click({ button: 'right' }); + await bob.page.getByRole('menuitem', { name: 'Open in a separate window' }).click(); const streamWindow = await opened; await streamWindow.waitForFunction(() => (document.querySelector('video') as HTMLVideoElement | null)?.videoWidth! > 0, null, { timeout: 15000 }); await view.getByText('Shown in a separate window.').waitFor();