Skip to content

BRAPI-1018: Add missing browser rendering endpoints (devtools, history, limits)#13025

Merged
ruifigueira merged 1 commit intomainfrom
rfigueira/devtools
Mar 31, 2026
Merged

BRAPI-1018: Add missing browser rendering endpoints (devtools, history, limits)#13025
ruifigueira merged 1 commit intomainfrom
rfigueira/devtools

Conversation

@ruifigueira
Copy link
Copy Markdown
Contributor

@ruifigueira ruifigueira commented Mar 23, 2026

Fixes BRAPI-1018

Adds missing devtools endpoints to browser rendering local binding.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal only for now

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


Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 23, 2026

🦋 Changeset detected

Latest commit: a214522

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 23, 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 23, 2026

I'm Bonk, and I've done a quick review of your PR.

This PR adds local simulation for browser rendering devtools endpoints in miniflare, implementing ~15 new route handlers that proxy Chrome's DevTools JSON and WebSocket endpoints.

Issue found: The new proxyPageWebSocket function at packages/miniflare/src/workers/browser-rendering/binding.worker.ts:226-227 directly forwards WebSocket close codes without guarding against reserved codes 1005 and 1006. These codes are valid in CloseEvent but throw InvalidAccessError when passed to WebSocket.close(). The existing BrowserSession.fetch already handles this correctly with a forwardClose helper (line 92-99). I posted a suggestion comment with the fix.

github run

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 23, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: a214522

@ruifigueira ruifigueira force-pushed the rfigueira/devtools branch 6 times, most recently from 0b2a3ea to e03a96d Compare March 27, 2026 11:59
@ruifigueira ruifigueira changed the title [miniflare] Add local simulation for browser rendering devtools endpo… BRAPI-1018: Add missing browser rendering endpoints (devtools, history, limits) Mar 27, 2026
@ruifigueira ruifigueira force-pushed the rfigueira/devtools branch 9 times, most recently from eb622b4 to 80362a9 Compare March 28, 2026 00:22
@ruifigueira ruifigueira marked this pull request as ready for review March 28, 2026 18:46
@ruifigueira ruifigueira requested a review from a team as a code owner March 28, 2026 18:46
@ruifigueira ruifigueira requested a review from vicb March 28, 2026 18:46
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 28, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread packages/miniflare/src/workers/browser-rendering/binding.worker.ts
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

I haven't pulled this down and run it locally but the tests look pretty comprehensive and the code makes sense to me.

Comment thread packages/miniflare/src/workers/browser-rendering/binding.worker.ts
Comment thread packages/miniflare/src/workers/browser-rendering/binding.worker.ts
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 30, 2026
@ruifigueira ruifigueira merged commit 9eff028 into main Mar 31, 2026
68 of 72 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 31, 2026
@ruifigueira ruifigueira deleted the rfigueira/devtools branch March 31, 2026 09:40
This was referenced 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.

5 participants