From 54e265b1089fd9db7222f2f1536e94ae4a017e36 Mon Sep 17 00:00:00 2001 From: David Montero Date: Sun, 14 Jun 2026 07:42:44 +0200 Subject: [PATCH] fix(picow): drop the broken 'Open in tab' link from the device panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opening the gateway in a new tab backgrounds the emulation tab and pauses its rAF, freezing the chip — the page then 502s. The in-tab iframe is the only way the Pico W device page stays reachable, so the panel no longer offers an open-in-tab affordance (Reload + Close only). --- frontend/src/lib/openDeviceGateway.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/src/lib/openDeviceGateway.ts b/frontend/src/lib/openDeviceGateway.ts index ad0d9754..28af8364 100644 --- a/frontend/src/lib/openDeviceGateway.ts +++ b/frontend/src/lib/openDeviceGateway.ts @@ -51,12 +51,9 @@ export function openDeviceGateway(url: string): void { reload.textContent = 'Reload'; reload.style.cssText = 'background:none;border:none;color:#4fc3f7;cursor:pointer;font-size:12px;padding:0;'; - const openTab = document.createElement('a'); - openTab.textContent = 'Open in tab'; - openTab.href = url; - openTab.target = '_blank'; - openTab.rel = 'noreferrer'; - openTab.style.cssText = 'color:#4fc3f7;text-decoration:none;font-size:12px;'; + // No "open in a new tab" affordance: a background tab pauses the chip's + // rAF loop, freezing the emulated server (502). The in-tab iframe is the + // only way the Pico W's device page stays reachable. const close = document.createElement('button'); close.type = 'button'; @@ -98,7 +95,7 @@ export function openDeviceGateway(url: string): void { document.addEventListener('mouseup', onUp); }); - right.append(reload, openTab, close); + right.append(reload, close); bar.append(title, right); panel.append(bar, iframe); document.body.append(panel);