Summary
On Windows, when gstack browse starts the server, two black console windows appear on the taskbar and desktop:
bun.exe — the browse server process
chrome-headless-shell.exe — Playwright's Chromium headless shell
Root Cause
In browse/src/cli.ts (Windows path, ~line 326), the launcher code that spawns the bun server via child_process.spawn is missing the windowsHide: true option:
// Before (creates visible console window)
`{detached:true,stdio:['ignore','ignore','ignore'],env:...}`
// After (suppresses console window via CREATE_NO_WINDOW flag)
`{detached:true,windowsHide:true,stdio:['ignore','ignore','ignore'],env:...}`
On Windows, child_process.spawn({ detached: true }) allocates a new console window for the spawned process unless windowsHide: true is explicitly set (which maps to the Win32 CREATE_NO_WINDOW creation flag).
The chrome-headless-shell.exe window is a secondary effect — when the bun server process has a visible console, Playwright's Chromium child inherits or also gets a console window. Fixing the bun spawn should resolve both.
Fix
One-line change in browse/src/cli.ts:
- `{detached:true,stdio:['ignore','ignore','ignore'],env:Object.assign({},process.env,`
+ `{detached:true,windowsHide:true,stdio:['ignore','ignore','ignore'],env:Object.assign({},process.env,`
Environment
- OS: Windows 11 Pro 10.0.26200
- Shell: PowerShell + bash (Git for Windows)
- Bun:
~/.nvm/bin/bun.exe
- Playwright chromium:
ms-playwright\chromium-headless_shell-1308
Summary
On Windows, when gstack browse starts the server, two black console windows appear on the taskbar and desktop:
bun.exe— the browse server processchrome-headless-shell.exe— Playwright's Chromium headless shellRoot Cause
In
browse/src/cli.ts(Windows path, ~line 326), the launcher code that spawns the bun server viachild_process.spawnis missing thewindowsHide: trueoption:On Windows,
child_process.spawn({ detached: true })allocates a new console window for the spawned process unlesswindowsHide: trueis explicitly set (which maps to the Win32CREATE_NO_WINDOWcreation flag).The
chrome-headless-shell.exewindow is a secondary effect — when the bun server process has a visible console, Playwright's Chromium child inherits or also gets a console window. Fixing the bun spawn should resolve both.Fix
One-line change in
browse/src/cli.ts:Environment
~/.nvm/bin/bun.exems-playwright\chromium-headless_shell-1308