gstack/browse
Jake Wilk c33705b4f9 fix(browse): allow about:blank so a restarted daemon can initialise
`validateNavigationUrl` rejected every non-http(s)/file scheme, including
`about:blank`. But the daemon opens its own first tab on about:blank, so once it
restarted it could never come back:

    $ browse newtab about:blank
    Blocked: scheme "about:" is not allowed. Only http:, https:, and file: URLs
    are permitted.

The visible damage is in make-pdf, whose Chromium smoke test is exactly that
command. `make-pdf setup` reports:

    [2/5] Launching Chromium... FAIL
    Chromium failed to launch: browse newtab exited 1

against a completely healthy Chromium, and generate fails downstream with
`page.pdf: Protocol error (IO.read): Read failed` — talking to a daemon that
never finished starting. Both symptoms point away from the actual cause, which
is why this took a while to find.

It only reproduces once the daemon restarts. A daemon still holding its original
tab keeps working, so the bug hides until something recycles the process, and
then make-pdf is dead until the machine is rebooted or the tab is recreated by
some other means.

Scoped as narrowly as it can be: about:blank EXACTLY, matched on href, not the
`about:` scheme. about:blank has no origin, loads nothing and runs nothing;
about:config and about:net-internals are real surfaces and stay blocked, as does
about:blankfoo — this is not a prefix test.

Compared lower-cased because the URL parser normalises the protocol but not the
opaque part, so `ABOUT:BLANK` parses to href `about:BLANK`. Caught by the test
rather than by reading the spec.

Tests: 4 added — about:blank resolves, case-insensitively; about:config and
about:net-internals still rejected; about:blankfoo still rejected.

Note for reviewers on Windows: browse/test/url-validation.test.ts has 5
pre-existing failures on this platform, all in the file:// suites, which assume
POSIX paths (/tmp, /etc/passwd). Unrelated to this change and unchanged by it —
same 5 before and after.
2026-08-12 16:36:28 -04: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(browse): allow about:blank so a restarted daemon can initialise 2026-08-12 16:36:28 -04:00
test fix(browse): allow about:blank so a restarted daemon can initialise 2026-08-12 16:36:28 -04: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.62.0.0 feat: plan-mode auto-select at the review scope gate (#2533) 2026-08-12 11:12:28 -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