fix: add windowsHide to browse detached server spawn on Windows#1863
fix: add windowsHide to browse detached server spawn on Windows#1863mvanhorn 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 |
|
Flagging an overlap so this and your #1864 don't collide in the queue: both target the same defect class — Windows console flashes from They also fix disjoint spawn sites, so neither is complete on its own:
So by each PR's own premise, #1863 alone still flashes the transient Suggest consolidating into a single PR covering every spawn site (outer launcher + inner detached spawn + taskkill + git probes + icacls), with one |
|
Closing this in favor of #1864, which now carries both halves of the fix: the spawnSync conversion for the outer cold-start flash and (as of 77ebc14) the windowsHide flags on the inner detached server spawn, the osascript raise helper, and the POSIX server spawn that this PR added. The test invariant from this branch (every detached spawn site carries windowsHide) moved over as well, so nothing here is lost. |
Summary
Adds
windowsHide: trueto the detached server-launcher spawns inbrowse/src/cli.tsso starting the gstack browse server on Windows no longer flashes a black console window.Why this matters
Issue #1835 reports that on Windows, starting the browse server flashes two black console windows: the detached
bun.exeserver process and Playwright'schrome-headless-shell.exe. The detached launcher spawn near line 326 ofbrowse/src/cli.tssets{detached:true,stdio:['ignore','ignore','ignore'],...}but omitswindowsHide:true, andchild_process.spawn({detached:true})allocates a new console window on Windows unlesswindowsHide:true(Win32CREATE_NO_WINDOW) is set; the headless-shell window is a secondary effect of the parent having a visible console. This addswindowsHide:trueto the inlined launcher options object and to the siblingchild_process.spawndetach call.windowsHideis a no-op on POSIX, so it is safe unconditionally.Testing
browse/test/cli-windows-hide.test.tsis a static-grep regression test in the repo's tripwire style: it asserts the launcher options string carries bothdetached:trueandwindowsHide:true, that the second detachedchild_process.spawnsite also includeswindowsHide, and fails if any futuredetached:truespawn site inbrowse/src/cli.tsdrops it. Full suite runs in CI.Fixes #1835