[Website] Separate in-place and fresh-site settings actions - #4034
Merged
Conversation
This was referenced Jul 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Aligns Playground Site Details actions with what settings can actually change in-place vs requiring a fresh Playground, while improving submission handling, error UX, and keyboard accessibility.
Changes:
- Adds atomic runtime settings updates (PHP + networking) via a single metadata write.
- Introduces serialized settings submissions with per-form error retention and pending-state behavior.
- Implements split-button action footers + keyboard-navigable action menu, with updated Vitest and Playwright coverage.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playground/website/src/lib/state/redux/site-management-api-middleware.ts | Adds updateRuntimeSettings to atomically persist PHP/network updates. |
| packages/playground/website/src/components/site-manager/site-settings-form/use-site-settings-submission.ts | Adds a hook to serialize submissions, track pending/error, and support retry. |
| packages/playground/website/src/components/site-manager/site-settings-form/use-site-settings-submission.spec.tsx | Adds Vitest coverage for serialization and retry behavior. |
| packages/playground/website/src/components/site-manager/site-settings-form/unconnected-site-settings-form.tsx | Extends footer rendering to accept a context callback and provides current values/defaults/submit handler. |
| packages/playground/website/src/components/site-manager/site-settings-form/temporary-site-settings-form.tsx | Switches temporary site footer to the shared action footer + serialized submission handling. |
| packages/playground/website/src/components/site-manager/site-settings-form/style.module.css | Adds styling for split-button UI, action menu, and inline error placement. |
| packages/playground/website/src/components/site-manager/site-settings-form/stored-site-settings-form.tsx | Routes apply vs fresh-site actions through the new footer and runtime update API. |
| packages/playground/website/src/components/site-manager/site-settings-form/site-settings-actions.ts | Adds classification helpers for when a fresh Playground is required vs in-place apply. |
| packages/playground/website/src/components/site-manager/site-settings-form/site-settings-actions.spec.ts | Adds unit tests for action classification logic and messaging. |
| packages/playground/website/src/components/site-manager/site-settings-form/site-settings-action-footer.tsx | Introduces split-button + dropdown menu actions with keyboard navigation and error display. |
| packages/playground/website/src/components/site-manager/site-settings-form/site-settings-action-footer.spec.tsx | Adds Vitest coverage for pending/disabled state and error placement. |
| packages/playground/website/src/components/site-manager/site-settings-form/autosaved-site-settings-form.tsx | Splits autosaved behavior: apply runtime changes in-place, create fresh for structural changes. |
| packages/playground/website/playwright/e2e/website-ui.spec.ts | Updates E2E flows to validate new action behaviors and keyboard navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
website-stat-database-size
branch
from
July 13, 2026 19:42
0e1d8a1 to
4a64873
Compare
adamziel
force-pushed
the
website-site-settings-actions
branch
from
July 13, 2026 20:13
2ac5593 to
5b015d2
Compare
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.
What this does
This PR adds a choice to the Site Settings form. When you change the settings, you may either:
Before this PR, you could only start a new Playground with the new settings. Sometimes that's useful, sometimes that's confusing. Ideally we'd offer a way to change any setting on the active site, but it's not really possible to seamlessly downgrade or upgrade the WordPress version on an existing site. The plugins, compatibility etc. will all likely be affected. Therefore, Playground does the next best thing and offers every viable option for every combination of choices.
Implementation
Saved and autosaved Playgrounds can apply PHP and network changes in place. WordPress version, language, and multisite changes switch the primary action to Create a fresh Playground while keeping the current site. Temporary Playgrounds get one destructive fresh-site action because they cannot be updated in place.
Runtime settings are written together, so a PHP-and-network submission triggers one metadata transition instead of two consecutive reboots. Submissions are serialized before React paints the pending state, failures stay with the form instead of overlapping its actions, and the action menu implements standard arrow/Home/End keyboard navigation.
Testing
npm exec nx -- run-many -t lint typecheck -p playground-website --parallel=2UI walkthrough
Apply runtime changes in place, then create a fresh Playground for a structural change — MP4 recording