gstack/browse
Chris c0a9f4cb19 fix: Chrome numbered-profile cookie discovery + headed window stability on macOS 26
Bug 1 — Headed Chromium window closes immediately on macOS 26 (Sequoia):

macOS 26 tightened window activation policy. Chromium windows spawned by a
non-app process (Bun server) close immediately unless properly registered via
NSApplicationActivateIgnoringOtherApps. Two fixes:

1. Add --disable-features=MacControlledWindowBehavior to headed launch args on
   darwin. This flag suppresses the new OS-level window-hiding behavior while
   Playwright's NSApp startup sequence handles activation normally. No-op on
   macOS < 26 and non-macOS platforms.

2. Fix raiseHeadedWindowMacOS() — it tried to activate "Google Chrome for
   Testing" via osascript, but launchHeaded() patches the Info.plist to rename
   it to "GStack Browser". The activation silently failed, leaving the window
   unraised. Now tries "GStack Browser" first with fallback to the original name.

Bug 2 — cookie-import-browser fails when no Default profile exists:

Chrome on macOS 26 and some multi-profile installations never create a Default
directory. Every account lands in a numbered profile (Profile 4, Profile 12,
etc.). cookie-import-browser.ts only looked for Default/Cookies, so it threw
"Chrome is not installed" even though cookies were present.

Fix: when getBrowserMatch() can't find Default, call findFirstNumberedProfile()
which scans for Profile N directories, sorts by number (lowest first so the
primary account wins), and returns the first one with a Cookies file. The
fallback is only triggered when the caller explicitly requested "Default" — an
explicit non-default profile name still fails fast as before.

Also adds tests for: numbered-profile fallback on Linux Chromium, lowest-number
wins when multiple numbered profiles exist, listDomains falling back correctly.

Closes #2138
2026-06-30 09:59:19 +02:00
..
bin feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
scripts fix: ngrok Windows build + close CI error-swallowing gap (v0.18.0.1) (#1024) 2026-04-16 13:49:04 -07:00
src fix: Chrome numbered-profile cookie discovery + headed window stability on macOS 26 2026-06-30 09:59:19 +02:00
test fix: Chrome numbered-profile cookie discovery + headed window stability on macOS 26 2026-06-30 09:59:19 +02:00
PLAN-snapshot-dropdown-interactive.md fix: snapshot -i auto-detects dropdown/popover interactive elements (#845) 2026-04-05 22:57:45 -07:00
SKILL.md v1.58.5.0 feat: first-run activation scaffold + gstack router front door (#2078) 2026-06-25 09:42:45 -07:00
SKILL.md.tmpl v1.57.8.0 feat: browse js/eval --out render-to-file (canonical Chromium for offline rendering) (#1929) 2026-06-09 21:02:30 -07:00