Skip to content

[chrome-devtools-patches] Migrate deployment from Cloudflare Pages to Workers + Assets#12928

Merged
petebacondarwin merged 3 commits intomainfrom
pbd/chrome-dev-tools-migration
Mar 17, 2026
Merged

[chrome-devtools-patches] Migrate deployment from Cloudflare Pages to Workers + Assets#12928
petebacondarwin merged 3 commits intomainfrom
pbd/chrome-dev-tools-migration

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin commented Mar 16, 2026

Migrates the chrome-devtools-patches project from Cloudflare Pages to Cloudflare Workers + Assets.

Changes

  • New wrangler.jsonc: Assets-only Worker config with preview_urls: true and workers_dev: true
  • Makefile: Production deploy uses wrangler deploy; new publish-preview target uses wrangler versions upload (uploads without activating in production)
  • package.json: New deploy:preview script for PR preview deployments
  • deploy-previews.yml: Uses deploy:preview instead of deploy for PR previews; URL extraction updated from Pages format (Take a peek over at) to Workers format (Version Preview URL:)
  • Inspector proxy origin allowlists: Added workers.dev regex patterns to both InspectorProxyWorker.ts and inspector-proxy-controller.ts, while retaining the legacy pages.dev patterns for backward compatibility
  • README.md: Updated deployment documentation

Testing

This can be tested without changing the devtools.devprod.cloudflare.dev custom domain:

1. Preview deploy (via this PR)

The preview:chrome-devtools-patches label has been added to trigger the deploy-previews workflow. Once complete, a comment will appear with the Version Preview URL. Verify:

  • Navigate to <preview-url>/js_app in a browser — the DevTools frontend should load

2. End-to-end WebSocket test

To verify the new workers.dev origin is accepted by the inspector proxy:

  1. Run wrangler dev on any Worker locally
  2. Press d to open DevTools (opens devtools.devprod.cloudflare.dev/js_app?ws=...)
  3. In the browser address bar, replace just the hostname with the preview URL (or the workers.dev URL after production deploy), keeping all query params
  4. Verify the WebSocket connection succeeds — Console, Sources, and Network tabs should all work

3. Production deploy

After merge, the changesets workflow will run wrangler deploy, making the Worker live at:

https://cloudflare-devtools.<account-subdomain>.workers.dev

Verify the same way as step 1 and 2 above using the workers.dev URL.

Post-merge steps

  • Re-point custom domain devtools.devprod.cloudflare.dev from the Pages project to the new Worker in the Cloudflare dashboard
  • Verify production deploy works via the changesets workflow

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: this is a deployment infrastructure change; the DevTools frontend build itself is unchanged. Manual testing steps are described above.
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal infrastructure change only

@petebacondarwin petebacondarwin requested a review from a team as a code owner March 16, 2026 20:07
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 16, 2026

🦋 Changeset detected

Latest commit: 32746c3

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

@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 16, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 16, 2026

✅ All changesets look good

@petebacondarwin petebacondarwin added the preview:chrome-devtools-patches Trigger a devtools preview deploy label Mar 16, 2026
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 3 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 16, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 32746c3

@petebacondarwin petebacondarwin force-pushed the pbd/chrome-dev-tools-migration branch from 1da8f54 to a624a12 Compare March 16, 2026 20:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 16, 2026

The Wrangler DevTools preview is now live. You can access it directly at: https://f9beee64-cloudflare-devtools.devprod.workers.dev/js_app

In order to test the DevTools preview in wrangler:

  1. npx wrangler dev.
  2. Hit d to open the DevTools in a fresh browser window.
  3. Paste the DevTools preview URL into the address bar (keeping all existing query parameters), e.g:
- https://devtools.devprod.cloudflare.dev/js_app?theme=systemPreferred&ws=127.0.0.1%3A9229%2Fws&domain=tester&debugger=true
+ https://f9beee64-cloudflare-devtools.devprod.workers.dev/js_app?theme=systemPreferred&ws=127.0.0.1%3A9229%2Fws&domain=tester&debugger=true

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Mar 16, 2026
macOS BSD sed does not support \S in extended regex mode (-E).
Replace with [^[:space:]] which is POSIX ERE compatible.
@petebacondarwin
Copy link
Copy Markdown
Contributor Author

Tested with the preview version and a local Wrangler dev session was able to connect ...

https://f9beee64-cloudflare-devtools.devprod.workers.dev/js_app?theme=systemPreferred&ws=127.0.0.1%3A9229%2Fws&domain=tester&debugger=true

@petebacondarwin petebacondarwin merged commit 81ee98e into main Mar 17, 2026
48 checks passed
@petebacondarwin petebacondarwin deleted the pbd/chrome-dev-tools-migration branch March 17, 2026 12:03
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 17, 2026
NuroDev pushed a commit that referenced this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:chrome-devtools-patches Trigger a devtools preview deploy

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants