Bump @wp-playground/* and @php-wasm/* to 3.1.22 - #3320
Merged
Conversation
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>
Contributor
Author
|
I confirm this fixes the issues for me. |
Collaborator
📊 Performance Test ResultsComparing 03c31dd vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: falsenormalisation is the behaviour we actually want for the form.Proposed Changes
@wp-playground/*and@php-wasm/*pin from3.1.21→3.1.22(exact, per AGENTS.md) acrossapps/cli,apps/studio,apps/ui,tools/common, andtools/benchmark-site-editor.package-lock.json. Verified no nested duplicate copies of@wp-playground/*or@php-wasm/*undernode_modules/*/node_modules/.BlueprintV1Declaration.preferredVersions.wptostring | 'latest' | false. Thefalsevalue selects a PHP-only Playground (no WordPress) — a state the add-site form has no UI for. Normalisewp: false→undefinedinapply-blueprint-form-values.ts, mirroring the existing handling ofphp: 'latest'.Testing Instructions
npm installto refresh the lockfile.npm run typecheck— should pass.npm test— should pass (1499 tests).preferredVersions.wpset, verify the add-site form still pre-fills WP version. Importing a blueprint withpreferredVersions.wp: falseshould fall back to the form's default WP behaviour without crashing.Pre-merge Checklist