From 05bdcc3591aefba48c9692a5939da1eef7b3600f Mon Sep 17 00:00:00 2001 From: viny Date: Thu, 30 Jul 2026 08:14:40 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20only=20the=20active=20service=20renders?= =?UTF-8?q?=20=E2=80=94=20wrong=20page=20shown,=20and=20slowness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking WhatsApp left Claude on screen while the address bar said web.whatsapp.com, and the app felt sluggish. Same cause for both. `.pane webview` declared `visibility: visible`. CSS visibility inherits, and an explicit `visible` on a child overrides a hidden ancestor — so every webview un-hid itself inside its hidden pane. All services rendered at once, stacked absolutely, and you saw whichever painted last. Chromium also never throttled them, since none were occluded. Measured before: four panes, four webviews `visible`, all full size. After: exactly one visible, three hidden, CPU 0% across the board. Also removes the global `webview { visibility: hidden }` / `webview.active` rules. They predate the pane wrapper and key off a class nothing sets any more; with the child rule gone they were hiding the active service too. Verified through single view, split, spotlight, back to single, and clicking each service in turn. --- package-lock.json | 4 ++-- package.json | 2 +- styles.css | 14 ++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc1505f..47bcd50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "panebox", - "version": "2.2.0", + "version": "2.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "panebox", - "version": "2.2.0", + "version": "2.2.1", "license": "MIT", "dependencies": { "electron-updater": "^6.8.9" diff --git a/package.json b/package.json index ad467af..f39475e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "panebox", "productName": "Panebox", - "version": "2.2.0", + "version": "2.2.1", "description": "A small, private, open-source desktop deck for your web apps — AI tools, chat, mail and more in one window.", "main": "main.js", "license": "MIT", diff --git a/styles.css b/styles.css index cc82128..9650742 100644 --- a/styles.css +++ b/styles.css @@ -220,11 +220,9 @@ body.platform-darwin #sidebar { padding-top: 44px; } #view-wrap { flex: 1; display: flex; position: relative; overflow: hidden; } #view-container { flex: 1; position: relative; overflow: hidden; background: var(--bg); } -webview { - position: absolute; inset: 0; width: 100%; height: 100%; - border: none; visibility: hidden; -} -webview.active { visibility: visible; } +/* Visibility is owned by the pane wrapper now — see `.pane` below. The old + rules here predated panes and still keyed off `.active` on the webview + itself, which nothing sets any more. */ /* ------------------------------------------------------------ todo panel */ @@ -632,7 +630,11 @@ body.reordering webview { pointer-events: none; } paints, so the header appeared to exist and then vanish. */ position: relative; inset: auto; flex: 1; min-height: 0; width: 100%; height: auto; - border: none; visibility: visible; + border: none; + /* Deliberately no `visibility` here. It inherits, so declaring `visible` let + every webview un-hide itself inside its hidden pane: all services rendered + at once, stacked, and you saw whichever painted last rather than the one + you clicked. It also meant Chromium never throttled the background ones. */ } .pane-head { display: none; }