Skip to content

Disable admin view transitions in Chromium - #3886

Merged
akirk merged 15 commits into
trunkfrom
fix/chromium-admin-view-transitions-crash
Jul 3, 2026
Merged

Disable admin view transitions in Chromium#3886
akirk merged 15 commits into
trunkfrom
fix/chromium-admin-view-transitions-crash

Conversation

@akirk

@akirk akirk commented Jul 3, 2026

Copy link
Copy Markdown
Member

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?

  • Detect Chromium-based browsers inside the remote boot path while generating Playground runtime options.
  • Define PLAYGROUND_DISABLE_ADMIN_VIEW_TRANSITIONS in a runtime MU plugin when the remote context is Chromium based.
  • In the Playground MU plugin, skip Playground fallback View Transitions and dequeue/deregister Core's wp-view-transitions-admin style for wp-admin requests.
  • Allow repros with ?with-admin-transitions, which forwards through remote.html to the worker and keeps admin View Transitions enabled.

Testing

  • php -l packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php
  • npx nx test playground-client --testFile=blueprints-v1-handler.spec.ts
  • npx nx typecheck playground-client
  • npx nx typecheck playground-remote
  • npx nx lint playground-remote
  • git diff --check trunk
  • Manual headed Chrome 149 check: loaded Playground wp-admin, clicked Appearance -> Themes, confirmed themes.php loaded without a page crash and no View Transition styles were present.
  • Manual headed Chrome 149 repro override check: loaded ?with-admin-transitions&storage=temp&url=/wp-admin/, confirmed wp-view-transitions-admin-inline-css was 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}):

CleanShot 2026-07-03 at 12 41 46@2x
@akirk
akirk marked this pull request as ready for review July 3, 2026 10:45
@akirk
akirk requested review from a team, brandonpayton and Copilot July 3, 2026 10:45

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.

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-admin stylesheet 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.

Comment thread packages/playground/remote/src/lib/playground-worker-endpoint.ts Outdated
Comment thread packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php Outdated
@akirk
akirk marked this pull request as draft July 3, 2026 11:09
@akirk

akirk commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

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.

@akirk
akirk marked this pull request as ready for review July 3, 2026 11:49
@akirk

akirk commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

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

Comment thread packages/playground/remote/src/lib/playground-worker-endpoint.ts Outdated
Comment thread packages/playground/remote/src/lib/playground-worker-endpoint.ts Outdated
Comment thread packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php Outdated
@adamziel

adamziel commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Looks good. I proposed adjusting some names and comments since the word should in names such as playground_should_disable_view_transitions doesn't communicate what's the intention.

Comment thread packages/playground/client/src/index.ts Outdated
@akirk
akirk merged commit 05387ff into trunk Jul 3, 2026
52 of 53 checks passed
@akirk
akirk deleted the fix/chromium-admin-view-transitions-crash branch July 3, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment