Disable admin view transitions in Chromium - #3886
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Disables browser-native View Transitions on wp-admin pages when Playground runs in Chromium-based browsers to avoid crashes during admin navigation.
Changes:
- Adds a runtime MU-plugin generated by the worker to define a flag for disabling admin View Transitions in Chromium-based browsers.
- Updates the Playground MU-plugin to (a) skip Playground fallback View Transitions and (b) dequeue/deregister Core’s
wp-view-transitions-adminstylesheet for admin requests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/playground/remote/src/lib/playground-worker-endpoint.ts | Generates a runtime MU-plugin and adds Chromium-based browser detection to define PLAYGROUND_DISABLE_ADMIN_VIEW_TRANSITIONS. |
| packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php | Uses the runtime flag to opt out of Playground View Transitions in wp-admin and removes Core’s admin view transitions style. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I am trying a CI crash repro using a non-headless approach and during that i'll disable the other CI jobs, thus marking this as draft during those commits are in. |
|
Ok ready for review again, I preserved the files during the repro and reported my findings at the Chromium bug report: https://issues.chromium.org/issues/530704642#comment2 |
|
Looks good. I proposed adjusting some names and comments since the word |
What?
This PR aims to solve #3845 by disabling browser-native View Transitions for wp-admin pages when Playground is running in a Chromium-based browser.
Why?
Chrome/Edge/Opera can crash when navigating to wp-admin pages such as Appearance -> Themes while admin View Transitions are enabled. Firefox does not appear to hit the same crash, so this keeps the opt-out scoped to Chromium-based browsers by default.
How?
PLAYGROUND_DISABLE_ADMIN_VIEW_TRANSITIONSin a runtime MU plugin when the remote context is Chromium based.wp-view-transitions-adminstyle for wp-admin requests.?with-admin-transitions, which forwards throughremote.htmlto the worker and keeps admin View Transitions enabled.Testing
php -l packages/playground/remote/src/lib/playground-mu-plugin/0-playground.phpnpx nx test playground-client --testFile=blueprints-v1-handler.spec.tsnpx nx typecheck playground-clientnpx nx typecheck playground-remotenpx nx lint playground-remotegit diff --check trunkthemes.phploaded without a page crash and no View Transition styles were present.?with-admin-transitions&storage=temp&url=/wp-admin/, confirmedwp-view-transitions-admin-inline-csswas present, clicked Appearance -> Themes, and reproduced the page crash.Debugging Details
Props @adamziel for this dump analysis (
Google Chrome 149.0.7827.201 (Official Build) (arm64) Revision 6a7b3dbec3b2ca25877c2553b5473b2f277ef644-refs/branch-heads/7827_196@{#6}):