From 2106c3e284c248420d0a1ecef96537bbbeae23ec Mon Sep 17 00:00:00 2001 From: Julius Olsson Date: Thu, 9 Jul 2026 18:48:03 +0200 Subject: [PATCH] fix: overlay no longer transforms the app into an accessory process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true }) flips the whole app's macOS activation policy to UIElementApplication: the Dock icon disappeared (electron#26350), the menu bar went with it, and the main window stopped moving/focusing like a normal window (electron#37487). Pass skipTransformProcessType (electron#27200) and drop visibleOnFullScreen — the overlay keeps floating over normal windows on all Spaces, just not above fullscreen Spaces, and the app stays a normal windowed app. Co-Authored-By: Claude Fable 5 --- src/main/window/overlayWindow.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/window/overlayWindow.ts b/src/main/window/overlayWindow.ts index d80087c1e..fd0db9eae 100644 --- a/src/main/window/overlayWindow.ts +++ b/src/main/window/overlayWindow.ts @@ -203,11 +203,26 @@ function createOverlayWindow(): void { }, }) - // 'floating' + visibleOnFullScreen keeps the overlay above normal app - // windows AND visible over a fullscreen Chrome Space on macOS — the - // "am I done yet?" glance from another app is the core use case. + // 'floating' keeps the overlay above normal app windows; all-workspaces + // makes it follow the user across desktops/Spaces. + // + // skipTransformProcessType is LOAD-BEARING, and visibleOnFullScreen is + // deliberately ABSENT. The first shipped version passed + // `{ visibleOnFullScreen: true }`, and on macOS that makes Electron + // transform the ENTIRE APP's activation policy between + // ForegroundApplication and UIElementApplication (accessory/LSUIElement). + // Observed result: the Dock icon vanished (and app.dock.show() can't + // reliably restore it — electron#26350), the menu bar disappeared, and + // the MAIN window stopped behaving like a normal window (couldn't be + // moved/focused properly; see also electron#37487 for overlay windows + // corrupting app state via this transform). A status pip must never + // change what kind of app Agent Code is, so we skip the transform + // entirely (electron#27200). The trade: the overlay won't float above + // fullscreen (green-button) Spaces — acceptable; it still floats over + // normal windows on every desktop. Do NOT reintroduce + // visibleOnFullScreen without solving the process-transform side effect. overlayWindow.setAlwaysOnTop(true, 'floating') - overlayWindow.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true }) + overlayWindow.setVisibleOnAllWorkspaces(true, { skipTransformProcessType: true }) overlayWindow.on('moved', () => { if (!overlayWindow || overlayWindow.isDestroyed()) return