From 2b02e9612d99d0b61bd2d082f77844f1e3ac2b80 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 21 Mar 2026 16:58:33 -0700 Subject: [PATCH] fix: remove duplicate gstack pill overlay, hide crash restore bubble The addInitScript indicator and the extension's content script were both injecting bottom-right pills, causing duplicates. Remove the pill from addInitScript (extension handles it). Replace --restore-last-session with --hide-crash-restore-bubble to suppress the "Chromium didn't shut down correctly" dialog. Co-Authored-By: Claude Opus 4.6 (1M context) --- browse/src/browser-manager.ts | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/browse/src/browser-manager.ts b/browse/src/browser-manager.ts index c250a5f7..a8659701 100644 --- a/browse/src/browser-manager.ts +++ b/browse/src/browser-manager.ts @@ -160,7 +160,7 @@ export class BrowserManager { // Find the gstack extension directory for auto-loading const extensionPath = this.findExtensionPath(); - const launchArgs = ['--restore-last-session']; + const launchArgs = ['--hide-crash-restore-bubble']; if (extensionPath) { launchArgs.push(`--disable-extensions-except=${extensionPath}`); launchArgs.push(`--load-extension=${extensionPath}`); @@ -189,13 +189,12 @@ export class BrowserManager { this.connectionMode = 'cdp'; this.intentionalDisconnect = false; - // Inject visual indicator — subtle top-edge gradient + floating pill - // so the user always knows which Chrome window gstack controls + // Inject visual indicator — subtle top-edge amber gradient + // Extension's content script handles the floating pill const indicatorScript = () => { const injectIndicator = () => { if (document.getElementById('gstack-ctrl')) return; - // Thin gradient line at the very top of the viewport const topLine = document.createElement('div'); topLine.id = 'gstack-ctrl'; topLine.style.cssText = ` @@ -207,27 +206,6 @@ export class BrowserManager { opacity: 0.8; `; - // Floating pill — bottom-right, fades to subtle - const pill = document.createElement('div'); - pill.id = 'gstack-pill'; - pill.style.cssText = ` - position: fixed; bottom: 12px; right: 12px; - z-index: 2147483647; pointer-events: none; - display: flex; align-items: center; gap: 5px; - padding: 4px 10px; - background: rgba(12, 12, 12, 0.7); - backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); - border: 1px solid rgba(245, 158, 11, 0.25); - border-radius: 9999px; - font: 500 10px -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; - color: rgba(255, 255, 255, 0.7); - letter-spacing: 0.03em; - transition: opacity 0.5s ease; - opacity: 1; - `; - pill.innerHTML = 'gstack'; - - // Keyframe for shimmer animation const style = document.createElement('style'); style.textContent = ` @keyframes gstack-shimmer { @@ -241,10 +219,6 @@ export class BrowserManager { document.documentElement.appendChild(style); document.documentElement.appendChild(topLine); - document.documentElement.appendChild(pill); - - // Fade pill to subtle after 4s - setTimeout(() => { pill.style.opacity = '0.25'; }, 4000); }; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', injectIndicator);