Skip to content

Bump @wp-playground/* and @php-wasm/* to 3.1.22 - #3320

Merged
youknowriad merged 1 commit into
trunkfrom
claude/amazing-yalow-e4aa00
May 3, 2026
Merged

Bump @wp-playground/* and @php-wasm/* to 3.1.22#3320
youknowriad merged 1 commit into
trunkfrom
claude/amazing-yalow-e4aa00

Conversation

@youknowriad

@youknowriad youknowriad commented May 3, 2026

Copy link
Copy Markdown
Contributor

I noticed a bug where sometimes block validation fails in studio code (pretty consistently the first time it's called during a site building session), this was tracked as a playground issue and this upgrade should fix it.

How AI was used in this PR

Generated by Claude. The agent updated the version pins, regenerated the lockfile, ran typecheck/tests, and addressed a single type fallout introduced by the upstream type change. Reviewer: please double-check the wp: false normalisation is the behaviour we actually want for the form.

Proposed Changes

  • Bump every @wp-playground/* and @php-wasm/* pin from 3.1.213.1.22 (exact, per AGENTS.md) across apps/cli, apps/studio, apps/ui, tools/common, and tools/benchmark-site-editor.
  • Regenerate package-lock.json. Verified no nested duplicate copies of @wp-playground/* or @php-wasm/* under node_modules/*/node_modules/.
  • Fix one type fallout: 3.1.22 widens BlueprintV1Declaration.preferredVersions.wp to string | 'latest' | false. The false value selects a PHP-only Playground (no WordPress) — a state the add-site form has no UI for. Normalise wp: falseundefined in apply-blueprint-form-values.ts, mirroring the existing handling of php: 'latest'.

Testing Instructions

  • npm install to refresh the lockfile.
  • npm run typecheck — should pass.
  • npm test — should pass (1499 tests).
  • Manual smoke: import a blueprint with preferredVersions.wp set, verify the add-site form still pre-fills WP version. Importing a blueprint with preferredVersions.wp: false should fall back to the form's default WP behaviour without crashing.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
Includes a small adjustment in apply-blueprint-form-values.ts: the upstream
type for `preferredVersions.wp` now allows `false` (PHP-only Playground
mode). The add-site form has no representation for that, so we normalise
`wp: false` to `undefined`, mirroring the existing handling of
`php: 'latest'`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@youknowriad

Copy link
Copy Markdown
Contributor Author

I confirm this fixes the issues for me.

@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 03c31dd vs trunk

app-size

Metric trunk 03c31dd Diff Change
App Size (Mac) 1511.28 MB 1557.90 MB +46.62 MB 🔴 3.1%

site-editor

Metric trunk 03c31dd Diff Change
load 1514 ms 1535 ms +21 ms ⚪ 0.0%

site-startup

Metric trunk 03c31dd Diff Change
siteCreation 8097 ms 8082 ms 15 ms ⚪ 0.0%
siteStartup 4948 ms 4951 ms +3 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@youknowriad
youknowriad merged commit ff16ed4 into trunk May 3, 2026
12 checks passed
@youknowriad
youknowriad deleted the claude/amazing-yalow-e4aa00 branch May 3, 2026 08:52
youknowriad added a commit that referenced this pull request May 4, 2026
Brings in 53 commits since the last merge. Conflict resolution + ports:

- `apps/cli/ai/agent.ts`: kept the dual-runtime dispatch from this branch;
  absorbed trunk's drop of `maxTurns` (no longer destructured, no longer
  threaded to runtimes). Body contention with #3272's inline `query()`
  changes (mcpServers, remoteSession, STUDIO_REMOTE_SESSION env detection)
  was resolved by deferring those to the Anthropic runtime layer where the
  `query()` call now lives.
- `apps/cli/ai/runtimes/anthropic/index.ts`: ported #3272's improvements —
  `STUDIO_REMOTE_SESSION` env → `remoteSession` flag → systemPromptOptions
  (the Telegram bridge sets this when it spawns `studio code --json`).
  Dropped maxTurns from query() options to match trunk.
- `apps/cli/ai/runtimes/types.ts`, `apps/cli/ai/runtimes/openai/index.ts`,
  tests: dropped maxTurns from `AgentRuntimeConfig` and all callers.
- `apps/cli/ai/tools.ts` deleted on our side, modified on trunk: deleted
  in resolution. Trunk's #3272 additions were ported into our split-tools
  layout:
    - `apps/cli/ai/tools/screenshot-helpers.ts` (new): shared
      `captureScreenshotPng` + viewport constants.
    - `apps/cli/ai/tools/share-screenshot.ts` (new): the `share_screenshot`
      tool that emits a `media.share` event for the remote-session bridge.
    - `apps/cli/ai/tools/take-screenshot.ts`: refactored onto the shared
      helper; updated description to point at share_screenshot.
    - `apps/cli/ai/tools/index.ts`: registry includes shareScreenshotTool;
      `resolveStudioToolDefinitions` now uses an exclusion-set model so
      both preview-steering and (when not enabled) share_screenshot get
      filtered consistently. `createRemoteSiteTools` includes
      shareScreenshotTool when `isRemoteSessionEnabled()`.
- `apps/cli/ai/tools/utils.ts`: ported #3286's progress-update coalescing
  — `update: true` now overwrites the last progress message in
  `captureCommandOutput` instead of appending.
- `apps/cli/ai/tools/wp-cli.ts`: ported #3264's smarter `--post_content=`
  quote handling (flags after a quoted post_content are now parsed
  correctly) and the typographic-dash rejection that catches
  `‐porcelain` / `–color` etc. before they hit WP-CLI as silent garbage.
- `apps/ui/src/components/session-view/composer/index.tsx`: trunk
  converted Composer to `forwardRef` with a `ComposerHandle.appendDraft`
  imperative method (used by trunk's annotate-toolbar hand-off). Merged
  the forwardRef structure with our composer-owned cross-family swap
  state, dialog, and hooks. Kept trunk's Escape-to-interrupt keydown
  handler and the textareaRef.
- `apps/ui/src/components/session-view/index.tsx`: absorbed trunk's
  annotation handler (`handleAnnotationsDone`), the Annotation type
  import, and the SitePreview `onAnnotationsDone` prop. Dropped the
  unused-by-the-merged-body `useConnector` import.

Verified: typecheck has only the pre-existing #3320 (`@wp-playground` bump)
error in `apply-blueprint-form-values.ts` that's also present on plain
trunk; 1532 tests pass; lint clean; CLI builds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
youknowriad added a commit that referenced this pull request May 4, 2026
Brings in 53 commits since the last merge. Conflict resolution + ports:

- `apps/cli/ai/agent.ts`: kept the dual-runtime dispatch from this branch;
  absorbed trunk's drop of `maxTurns` (no longer destructured, no longer
  threaded to runtimes). Body contention with #3272's inline `query()`
  changes (mcpServers, remoteSession, STUDIO_REMOTE_SESSION env detection)
  was resolved by deferring those to the Anthropic runtime layer where the
  `query()` call now lives.
- `apps/cli/ai/runtimes/anthropic/index.ts`: ported #3272's improvements —
  `STUDIO_REMOTE_SESSION` env → `remoteSession` flag → systemPromptOptions
  (the Telegram bridge sets this when it spawns `studio code --json`).
  Dropped maxTurns from query() options to match trunk.
- `apps/cli/ai/runtimes/types.ts`, `apps/cli/ai/runtimes/openai/index.ts`,
  tests: dropped maxTurns from `AgentRuntimeConfig` and all callers.
- `apps/cli/ai/tools.ts` deleted on our side, modified on trunk: deleted
  in resolution. Trunk's #3272 additions ported into our split-tools
  layout:
    - `apps/cli/ai/tools/screenshot-helpers.ts` (new): shared
      `captureScreenshotPng` + viewport constants.
    - `apps/cli/ai/tools/share-screenshot.ts` (new): the `share_screenshot`
      tool that emits a `media.share` event for the remote-session bridge.
    - `apps/cli/ai/tools/take-screenshot.ts`: refactored onto the shared
      helper; updated description to point at share_screenshot.
    - `apps/cli/ai/tools/index.ts`: registry includes shareScreenshotTool;
      `resolveStudioToolDefinitions` now uses an exclusion-set model so
      both preview-steering and (when not enabled) share_screenshot get
      filtered consistently. `createRemoteSiteTools` includes
      shareScreenshotTool when `isRemoteSessionEnabled()`.
- `apps/cli/ai/tools/utils.ts`: ported #3286's progress-update coalescing
  — `update: true` now overwrites the last progress message in
  `captureCommandOutput` instead of appending.
- `apps/cli/ai/tools/wp-cli.ts`: ported #3264's smarter `--post_content=`
  quote handling (flags after a quoted post_content are now parsed
  correctly) and the typographic-dash rejection that catches
  `‐porcelain` / `–color` etc. before they hit WP-CLI as silent garbage.
- `apps/ui/src/components/session-view/composer/index.tsx`: trunk
  converted Composer to `forwardRef` with a `ComposerHandle.appendDraft`
  imperative method (used by trunk's annotate-toolbar hand-off). Merged
  the forwardRef structure with our composer-owned cross-family swap
  state, dialog, and hooks. Kept trunk's Escape-to-interrupt keydown
  handler and the textareaRef.
- `apps/ui/src/components/session-view/index.tsx`: absorbed trunk's
  annotation handler (`handleAnnotationsDone`), the Annotation type
  import, and the SitePreview `onAnnotationsDone` prop. Dropped the
  unused-by-the-merged-body `useConnector` import.

Verified: typecheck has only the pre-existing #3320 (`@wp-playground` bump)
error in `apply-blueprint-form-values.ts` that's also present on plain
trunk; 1532 tests pass; lint clean; CLI builds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants