From dcf9dd923eb882c4e0bb1cf17f39f0724f71e4ec Mon Sep 17 00:00:00 2001 From: James Long Date: Mon, 9 Nov 2026 21:00:24 +0000 Subject: [PATCH] fix(desktop): keep auxiliary overlays out of host wiring Skip the privileged bridge and session-end wiring for child overlays before their renderer loads, in addition to the trusted-URL check on the transport port. User decisions: - Keep the top-center Disconnected pill above the live page --- packages/desktop/src/main/ipc.ts | 1 + packages/desktop/src/main/storage/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/desktop/src/main/ipc.ts b/packages/desktop/src/main/ipc.ts index a2723ca923c..11bd58bddbd 100644 --- a/packages/desktop/src/main/ipc.ts +++ b/packages/desktop/src/main/ipc.ts @@ -58,6 +58,7 @@ export const registerIpcHandlers = Effect.gen(function* () { } const wire = (win: BrowserWindow) => { + if (isAuxiliaryWindow(win) || win.getParentWindow()) return win.webContents.on("before-input-event", (_event, input) => { // Ctrl+R renames the session and Ctrl+Shift+R toggles review in the renderer, // so the default menu's Reload and Force Reload must not take them. diff --git a/packages/desktop/src/main/storage/index.ts b/packages/desktop/src/main/storage/index.ts index e1e2511fd39..04c7044aacf 100644 --- a/packages/desktop/src/main/storage/index.ts +++ b/packages/desktop/src/main/storage/index.ts @@ -36,7 +36,7 @@ export const layer = Layer.effect( ) const wire = (_event: Electron.Event | undefined, win: BrowserWindow) => { - if (!isAuxiliaryWindow(win)) win.on("session-end", storage.flush) + if (!isAuxiliaryWindow(win) && !win.getParentWindow()) win.on("session-end", storage.flush) } app.on("before-quit", storage.flush)