Skip to content

docs: document the shared redirect and profiling api - #198

Merged
kbond merged 2 commits into
zenstruck:1.xfrom
kbond:readme-audit
Aug 23, 2026
Merged

docs: document the shared redirect and profiling api#198
kbond merged 2 commits into
zenstruck:1.xfrom
kbond:readme-audit

Conversation

@kbond

@kbond kbond commented Aug 23, 2026

Copy link
Copy Markdown
Member

#195 moved the redirect and profiling methods up to Zenstruck\Browser, but the README still documented them under KernelBrowser only. This audits the whole file against what shipped.

The redirect methods and profiling each get a shared section next to Authentication and Exceptions, so KernelBrowser is left with what is genuinely its own: the content-type helpers, reboot control, the http methods, HttpOptions and the json assertions. Profiling was documented in both browser sections and is now in one place.

Three other things the audit caught:

  • "each playwrightBrowser() call gets its own browser" is no longer true. Each call gets its own isolated context while sharing one browser process, which is what makes several browsers in a test cheap.
  • The Custom Browser section listed only KERNEL_BROWSER_CLASS, though PLAYWRIGHT_BROWSER_CLASS has existed since feat: Add PlaywrightBrowser #195 and is in the configuration table.
  • BROWSER_FOLLOW_REDIRECTS was documented as applying to the KernelBrowser only, which turned out to be true for the wrong reason: HasBrowser::playwrightBrowser() never passed the option, so the variable silently did nothing there. The first commit wires it the same way catch_exceptions is wired, and the table entry now applies to both. With BROWSER_FOLLOW_REDIRECTS=0 the redirect tests fail identically for both browsers; unset, the suite is unchanged.

The first commit is a fix: and the second a docs:, so a merge commit would keep the behaviour change visible in the changelog.

@kbond
kbond merged commit 4c74478 into zenstruck:1.x Aug 23, 2026
20 checks passed
@kbond
kbond deleted the readme-audit branch August 23, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant