Repository navigation
Repair wp/5.8 branch Actions: Fix theme-activation navigation race in activate-theme.js - #545
Closed
desrosj wants to merge 1 commit into
Conversation
desrosj
changed the base branch from
wp/5.8
to
fix-actions-5.8/ignore-browserslist-old-data
September 28, 2026 14:41
desrosj
added this pull request to stack #546
September 28, 2026 14:41
desrosj
removed this pull request from stack #546
September 28, 2026 19:14
desrosj
changed the base branch from
fix-actions-5.8/ignore-browserslist-old-data
to
wp/5.8
September 28, 2026 19:15
desrosj
force-pushed
the
fix-actions-5.8/fix-activate-theme-navigation-race
branch
from
September 28, 2026 19:15
e31fcfd to
1c64e64
Compare
desrosj
changed the base branch from
wp/5.8
to
fix-actions-5.8/ignore-browserslist-old-data
September 28, 2026 19:16
desrosj
added this pull request to stack #571
September 28, 2026 19:16
desrosj
force-pushed
the
fix-actions-5.8/fix-activate-theme-navigation-race
branch
from
October 5, 2026 20:47
1c64e64 to
0a3b4aa
Compare
desrosj
removed this pull request from stack #571
October 5, 2026 20:48
desrosj
added this pull request to stack #615
October 5, 2026 20:48
desrosj
force-pushed
the
fix-actions-5.8/fix-activate-theme-navigation-race
branch
from
October 6, 2026 17:56
0a3b4aa to
fe1b024
Compare
desrosj
removed this pull request from stack #615
October 7, 2026 01:12
desrosj
added this pull request to stack #647
October 7, 2026 01:12
desrosj
removed this pull request from stack #647
October 7, 2026 18:05
desrosj
changed the base branch from
fix-actions-5.8/ignore-browserslist-old-data
to
wp/5.8
October 7, 2026 18:06
desrosj
force-pushed
the
fix-actions-5.8/fix-activate-theme-navigation-race
branch
from
October 7, 2026 18:07
fe1b024 to
d4d3407
Compare
desrosj
changed the base branch from
wp/5.8
to
fix-actions-5.8/ignore-browserslist-old-data
October 7, 2026 18:09
desrosj
added this pull request to stack #671
October 7, 2026 18:09
WordPress core's "Activate" link on wp-admin/themes.php is a plain
<a href>: clicking it causes a real, full-page, server-driven navigation
(switch_theme(), then a redirect back to themes.php). activateTheme()
clicked that link without waiting for the navigation, so the single,
bare 30s page.waitForSelector() immediately afterward had to cover the
entire click -> switch_theme() -> redirect -> admin page reload chain
by itself.
Wrap the click in Promise.all() with page.waitForNavigation( {
waitUntil: 'networkidle0' } ), so the final page.waitForSelector() only
runs once the navigation has finished, and give that wait an explicit
45s timeout instead of Puppeteer's 30s default, as headroom for the
page's own post-navigation render.
The "no activate button found" branch (the theme is already active)
returns before the click and is unchanged.
This is the same change as the equivalent fixes on wp/6.5
(WordPress#83002) and wp/6.4 (#328), where
this race failed the Puppeteer suite in CI. It has not been seen to fail
on this branch; it is included so the helper behaves the same across
branches and a future failure here does not need to be rediscovered.
desrosj
removed this pull request from stack #671
October 8, 2026 19:34
desrosj
force-pushed
the
fix-actions-5.8/fix-activate-theme-navigation-race
branch
from
October 8, 2026 19:34
d4d3407 to
7b07190
Compare
desrosj
added this pull request to stack #694
October 8, 2026 19:35
desrosj
removed this pull request from stack #694
October 9, 2026 13:13
desrosj
added this pull request to stack #702
October 9, 2026 13:14
desrosj
removed this pull request from stack #702
October 9, 2026 13:34
desrosj
added this pull request to stack #705
October 9, 2026 13:34
desrosj
removed this pull request from stack #705
October 9, 2026 14:01
desrosj
added this pull request to stack #708
October 9, 2026 14:02
desrosj
removed this pull request from stack #708
October 9, 2026 14:13
desrosj
added this pull request to stack #712
October 9, 2026 14:13
desrosj
marked this pull request as ready for review
October 9, 2026 17:43
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Owner
Author
|
Moved to WordPress#84444. |
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?
Fixes a navigation race in
activateTheme()(packages/e2e-test-utils/src/activate-theme.js), which the Puppeteer end-to-end tests use, including the shared setup that activates a theme before each test file.Promise.all()withpage.waitForNavigation( { waitUntil: 'networkidle0' } ).waitForSelector()that checks the theme is active gets an explicit 45-second timeout.Why?
"Activate" is a plain link: the click switches the theme on the server, then redirects back to
themes.php. Without waiting for that navigation, onewaitForSelector()with Puppeteer's default 30 seconds has to cover the whole switch, redirect and reload, and can time out:This failed CI repeatedly on
wp/6.5andwp/6.4(onwp/6.4, 20 of 114 failed end-to-end runs without the fix, 0 of 49 with it), which are fixed in WordPress#83002 and WordPress#83686.It hasn't failed on this branch: none of the 20 most recent failed end-to-end runs on this stack hit it. It is included so the helper is the same on every branch, and a future failure here doesn't have to be investigated again.
How?
The code is the same as on
wp/6.5andwp/6.4, includingwaitUntil: 'networkidle0'(this branch'slogin-user.jsuses a plainpage.waitForNavigation(), but matching the other branches keeps the helper identical). The early return when the theme is already active is unchanged.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code