Repository navigation
fix browse lifecycle on Windows - #1983
garrett-fox wants to merge 1 commit into
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Heads-up on a concrete overlap with #1998 (also targeting the #1952 Windows console-window flashes). Both PRs independently make the same two edits in
So whichever lands first, the other conflicts on those exact lines and one set of edits becomes redundant. The rest of this PR is unique and doesn't overlap #1998: the passive Suggestion to avoid duplicate merges: let one PR own the shared |
|
@garrett-fox Please rewrite this to retain passive status and stop behavior while removing duplicate console changes and the unrelated idle-timeout policy. |
|
Thanks for this, @garrett-fox. The fix is now on main: browse status/stop no longer boot a daemon (pre-server short-circuit in browse/src/cli.ts) and Windows spawns pass windowsHide (fixed in v1.67.0.0, #2604). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output. |
Summary
Fixes the Windows browse lifecycle path so status/stop do not accidentally start or leave behind a headless daemon, and hides gstack-owned helper subprocess windows on Windows.
What changed
browse statuspassive by reading the state file and querying a new authenticated/statusendpoint instead of callingensureServer()browse stopoperate on an existing state file without autostarting a daemonwindowsHide: trueto gstack-owned Windows subprocess launches, including taskkill, Node daemon launch, Bun polyfill subprocesses, and cookie-import helpersWhy
On Windows, browse commands can surface short-lived PowerShell/console windows while agents are active. Separately,
browse statuspreviously went through the normal server setup path, so checking whether a daemon existed could create one. That made stale or stray daemon investigation harder and could keep the chrome-headless-shell process cycling after a session appeared to be done.This addresses the behavior reported in #1835 and #1784.
Validation
bun test browse/test/cli-lifecycle.test.ts browse/test/cli-setsid-daemonize.test.ts browse/test/cookie-import-browser.test.tsgit diff --cached --checkI also smoke-tested the patched local install on Windows before extracting this PR:
browse statuswith no daemon stayed stopped,browse goto https://example.comlaunched successfully, andbrowse stopremoved the daemon and child headless Chromium processes.Notes
This PR only changes tracked gstack source. I intentionally did not include a direct local patch to
node_modules/playwright-core; if Playwright's internal process launcher still contributes visible windows after this, that should be handled as a separate build-time patch or upstream Playwright issue.