Skip to content

[Blueprints] Support v2 in the browser without ?experimental-blueprints-v2-runner=yes - #3997

Merged
adamziel merged 1 commit into
trunkfrom
blueprint-v2-web-version-routing
Jul 10, 2026
Merged

[Blueprints] Support v2 in the browser without ?experimental-blueprints-v2-runner=yes#3997
adamziel merged 1 commit into
trunkfrom
blueprint-v2-web-version-routing

Conversation

@adamziel

@adamziel adamziel commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What it does

Blueprints already have a version field. This makes it the only switch that selects the web runner.

startPlaygroundWeb() routes version: 2 declarations and bundles to the v2 handler. Website and Personal WP no longer inspect ?experimental-blueprints-v2-runner=yes, and the website smoke test boots the v2 declaration without it.

Breaking TypeScript change: experimentalBlueprintsV2Runner is gone from StartPlaygroundOptions. Callers must remove it and put version: 2 in the Blueprint. The low-level WorkerBootOptions member remains as a deprecated no-op until the old remote v2 worker is deleted.

Rationale

The experimental flag duplicated information already present in the Blueprint. Worse, it could force a v1 or empty Blueprint through the v2 handler. Two switches for one decision means they can disagree.

The existing website test also passed the flag, so it never tested normal v2 routing. It does now.

Bundles still use BlueprintReflection to read their declaration version. blueprints-runner=v1 is deliberately unchanged: the client-side v2 handler compiles and executes the plan against the normal remote API. Personal WP keeps the retired query key only to strip it from old URLs.

Testing instructions

nvm use
npm exec -- nx run-many -t typecheck -p playground-client playground-remote playground-website playground-personal-wp
npm exec -- nx run-many -t lint -p playground-client playground-remote playground-website playground-personal-wp
npm exec -- nx run playground-client:test:vite
npm exec -- nx run playground-personal-wp:test --testFile=landing-page.spec.ts
npm exec -- nx run playground-client:test:rollup-declarations
npm exec -- nx run playground-website:e2e:playwright -- --project=chromium packages/playground/website/playwright/e2e/blueprints.spec.ts --grep='Blueprint v2 declarations should route by version through the website flow'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Routes web Blueprint execution strictly based on Blueprint schema version (declaration/bundle), removing the startPlaygroundWeb() v2 opt-in and updating website/personal-wp URL handling + tests accordingly.

Changes:

  • Removed experimentalBlueprintsV2Runner from StartPlaygroundOptions and stopped reading ?experimental-blueprints-v2-runner=yes in website and personal-wp boot flows.
  • Updated v2 routing logic to rely only on Blueprint declaration/bundle version detection.
  • Updated Playwright + unit tests to validate the version-based routing and legacy URL stripping.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/playground/website/src/lib/state/redux/boot-site-client.ts Removes query-param-based v2 opt-in when booting the website client.
packages/playground/website/playwright/e2e/blueprints.spec.ts Updates website e2e to rely on version: 2 routing without an opt-in query param.
packages/playground/remote/src/lib/playground-worker-endpoint.ts Marks worker opt-in flag as deprecated/no-op in WorkerBootOptions docs.
packages/playground/personal-wp/src/lib/state/url/router.ts Keeps retired query key solely for stripping legacy URLs.
packages/playground/personal-wp/src/lib/state/url/landing-page.spec.ts Adds test coverage for stripping retired v2 opt-in from legacy URLs.
packages/playground/personal-wp/src/lib/state/redux/boot-site-client.ts Removes query-param-based v2 opt-in when booting the personal-wp client.
packages/playground/client/src/index.ts Removes opt-in option and routes v2 strictly by Blueprint schema version/bundle reflection.
packages/playground/client/src/index.spec.ts Adds unit test ensuring v2 bundles are routed through the v2 handler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adamziel adamziel changed the title [Blueprints] Route v2 web boots by schema version Jul 10, 2026
@adamziel
adamziel merged commit 75999a2 into trunk Jul 10, 2026
51 of 52 checks passed
@adamziel
adamziel deleted the blueprint-v2-web-version-routing branch July 10, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment