Skip to content

BRAPI-1010: Add experimental headful browser rendering support to wrangler / vite plugin#13011

Merged
petebacondarwin merged 2 commits intomainfrom
rfigueira/headful
Mar 31, 2026
Merged

BRAPI-1010: Add experimental headful browser rendering support to wrangler / vite plugin#13011
petebacondarwin merged 2 commits intomainfrom
rfigueira/headful

Conversation

@ruifigueira
Copy link
Copy Markdown
Contributor

@ruifigueira ruifigueira commented Mar 22, 2026

Fixes BRAPI-1010

Add support for running Chrome in headful (visible) mode when using the Browser Rendering API locally. This is useful for debugging browser automation scripts during development.
Enable via environment variable:

X_BROWSER_HEADFUL=true wrangler dev
X_BROWSER_HEADFUL=true vite dev

Note: When using @cloudflare/playwright, two Chrome windows may appear. This is expected behavior due to how Playwright handles browser contexts via CDP.


A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 22, 2026

🦋 Changeset detected

Latest commit: 32aecd5

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 22, 2026

✅ All changesets look good

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 22, 2026

The review has been posted successfully on PR #13011. Here's a summary of what I found:

Two actionable issues identified:

  1. Missing --headful --remote validation (higher severity) — The --headful flag only affects local Chrome launching in Miniflare. If combined with --remote, it is silently ignored. I suggested adding a validation guard in validateArgs matching the existing --live-reload pattern, with a concrete code suggestion posted as an inline comment on dev.ts.

  2. No tests added — The PR checks "Tests included/updated" but no test files were modified. The headful schema validation and the conditional Chrome args logic in launchBrowser should have test coverage.

The rest of the implementation (data flow through 9 files, changeset format, types, schema) looks correct and well-structured.

github run

@ruifigueira ruifigueira force-pushed the rfigueira/headful branch 3 times, most recently from 82b08a0 to be2a86a Compare March 27, 2026 14:02
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13011

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13011

miniflare

npm i https://pkg.pr.new/miniflare@13011

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13011

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13011

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13011

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13011

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13011

wrangler

npm i https://pkg.pr.new/wrangler@13011

commit: 32aecd5

@ruifigueira ruifigueira force-pushed the rfigueira/headful branch 3 times, most recently from 5640d08 to 7aa6669 Compare March 30, 2026 21:36
@ruifigueira ruifigueira marked this pull request as ready for review March 31, 2026 09:43
@ruifigueira ruifigueira requested a review from a team as a code owner March 31, 2026 09:43
@ruifigueira ruifigueira requested a review from emily-shen March 31, 2026 09:43
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 31, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@ruifigueira ruifigueira changed the title Add --headful flag to wrangler dev for browser rendering BRAPI-1010: Add experimental headful browser rendering support to wrangler / vite plugin Mar 31, 2026
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 31, 2026
@petebacondarwin petebacondarwin merged commit b9b7e9d into main Mar 31, 2026
58 of 59 checks passed
@petebacondarwin petebacondarwin deleted the rfigueira/headful branch March 31, 2026 14:56
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants