mirror of https://github.com/garrytan/gstack.git
The browse daemon is launched detached (cli.ts startServer), which on Windows
gives it NO console. Console children it then spawns -- chrome-headless-shell.exe
via Playwright, `bun` skill helpers, the taskkill cleanup -- find no console to
inherit, so Windows allocates a fresh VISIBLE console window for each. Users see
stray chrome-headless-shell / bun terminal windows during browse use; some linger
for the browser's lifetime. Neither the user's default-terminal choice nor a flag
on the daemon itself fixes it: a detached process has no console regardless.
Verified on Windows 11: a child of a detached/console-less parent is visible
without windowsHide and hidden with it (windowsHide => CREATE_NO_WINDOW, which
suppresses the window even when the parent has no console).
Fix: the daemon defaults windowsHide:true for every child_process spawn
(win-console-hide.ts, imported first in server.ts so it patches the
child_process singleton before Playwright's first launch()). playwright-core
reads spawn via a live `__toESM(require("child_process")).spawn` getter at call
time, so patching the singleton covers its browser launch even though spawn
options can't be passed through chromium.launch(). gstack's own Bun.spawn skill
helpers and the detached launcher / attack-telemetry spawns set windowsHide
directly.
End-to-end: `browse goto` now starts the daemon and 4 chrome-headless-shell
processes with zero visible windows.
Adds a static-grep tripwire so the flag and import order can't regress.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||