Skip to content

My Jetpack: retire the wp-build flag and the legacy dashboard bundle - #52446

Merged
dhasilva merged 2 commits into
trunkfrom
update/my-jetpack-retire-wp-build-flag
Sep 17, 2026
Merged

dhasilva merged 2 commits into
trunkfrom
update/my-jetpack-retire-wp-build-flag

Conversation

@dhasilva

Copy link
Copy Markdown
Contributor

Proposed changes

Retires the my-jetpack-wp-build feature flag added by the pilot in #52204. The My Jetpack dashboard now always renders through wp-build, inside its rounded frame, and the legacy dashboard bundle is gone.

  • The dashboard always renders through wp-build. The flag constant, its registration, Initializer::is_modernized(), and every branch on it are removed.
  • The onboarding takeover keeps its own webpack bundle. ?step=onboarding hides all wp-admin chrome, so there is no frame to port; My Jetpack: port the dashboard to wp-build behind a default-off flag (pilot) #52204 left it on the legacy path on purpose. _inc/admin.jsx becomes _inc/onboarding.jsx, an entry that renders only the onboarding screen (~300 KB unminified, versus ~10 MB for the old dashboard bundle). Webpack also still builds async-notification-bubble.
  • my_jetpack_main_app keeps its name, as a script-less data handle. Boost's settings page calls Initializer::enqueue_scripts() and depends on that handle by name (Boost: Load my-jetpack script before Boost #42742), only to read myJetpackInitialState. Keeping the name means already-released Boost versions still resolve their dependency, and none of them downloads the dashboard bundle anymore.
  • register_wp_build_polyfills() is removed. It existed only for the legacy bundle's wp-theme / wp-private-apis / wp-notices dependencies (My Jetpack: register wp-build-polyfills so the app (and Boost) loads without Gutenberg on WP < 7.0 #50291). Neither the onboarding bundle nor Boost's scripts depend on those handles, and the dashboard registers the full set in load_wp_build().
  • The dashboard's layout CSS has one owner. routes/dashboard/route.scss already includes jetpack-admin-page-layout-wp-build. The duplicate jetpack-admin-page-layout include in _inc/style.module.scss is gone, and with it the order dependency between the two copies. The #my-jetpack-container deprecation-notice rules are also removed: useDeprecateFeatureNotice is not imported anywhere, so they never matched.
  • The Features tab flag (My Jetpack: add a flag that replaces the Products tab with a Features tab #52346) no longer requires the retired flag. is_features_tab_enabled() now checks only my-jetpack-features-tab. The stale flag filters are dropped from Script_Data_Test and the Jetpack plugin's Akismet_Admin_Chrome_Test.

Effects outside My Jetpack

  • Boost settings page: Boost no longer loads My Jetpack's stylesheet, which used to leak three global rules onto its page:
    • #wpwrap background: no visible point on the page showed it.
    • Hiding #wpbody-content > .notice: admin-ui's hide_core_admin_notices() already hides core notices there.
    • The onboarding screen's body font stack: Boost now uses wp-admin's font stack, like Protect and VideoPress. The glyphs are identical on macOS and Windows and differ only where the two stacks resolve to different fonts (for example Linux).
  • Plugins bundling My Jetpack no longer build or ship the legacy dashboard bundle.
  • Jurassic Ninja sites that enabled the flag can clear the leftover override with wp companion feature-flag reset my-jetpack-wp-build. Nothing reads it anymore.

Verification already done

Computed styles and geometry for every visible element were diffed between trunk (flag on, or the legacy bundle where the flag never applied) and this branch, in the same tab at the same viewport:

Screen Result
Overview No style property changed. Only live stats data and chart bars moved.
#/add-backup interstitial 0 differences (215 elements)
#/connection 0 differences (100 elements)
?step=onboarding No static element changed. Only the auto-rotating testimonial carousel differed.
Boost settings, legacy and modern Body font stack and #wpwrap background only, as described above

Post-rebase smoke check: with only my-jetpack-features-tab on, the tabs read Overview / Features / Help and JetpackScriptData.myJetpack.productsSection is set.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

Dashboard

  • Go to Jetpack → My Jetpack. It renders inside wp-build's rounded frame, with no flag set.
  • Click through Overview / Products / Help, open a product interstitial (e.g. #/add-backup), then use Back and Forward. Reload directly on admin.php?page=my-jetpack#/add-backup.
  • In the Network tab, confirm no request for jetpack-my-jetpack/build/index.js or build/index.css.
  • Optional: add_filter( 'jetpack_feature_flag_enabled_my-jetpack-features-tab', '__return_true' );. The Products tab becomes Features, without any other flag.

Onboarding

  • On a site that isn't connected (a fresh Jurassic Ninja site before connecting), go to Jetpack → My Jetpack. It redirects to step=onboarding and shows the full-screen "Start with Jetpack for free" screen, with no admin bar or menu.
  • In the Network tab, it loads build/onboarding.js and build/onboarding.css.
  • On a connected site, admin.php?page=my-jetpack&step=onboarding still redirects back to the dashboard.

Boost

  • With Boost active, go to Jetpack → Boost. The page renders and works as before, and in the console window.myJetpackInitialState is still defined.
  • In the Network tab, no My Jetpack script or stylesheet loads.
  • Repeat with the modern Boost dashboard: add_filter( 'rsm_jetpack_ui_modernization_boost', '__return_true' );.

🤖 Generated with Claude Code

@dhasilva
dhasilva requested a review from a team as a code owner September 17, 2026 15:43
@dhasilva dhasilva added the [Status] Needs Review This PR is ready for review. label Sep 17, 2026
@dhasilva
dhasilva requested a review from a team as a code owner September 17, 2026 15:43
@dhasilva dhasilva added the [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. label Sep 17, 2026
@dhasilva dhasilva self-assigned this Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the update/my-jetpack-retire-wp-build-flag branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/my-jetpack-retire-wp-build-flag

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Stats Data [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Tests] Includes Tests Docs labels Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Stats Data plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control

jp-launch-control Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/my-jetpack/src/class-initializer.php 335/434 (77.19%) -0.64% -1 💚

1 file is newly checked for coverage.

File Coverage
projects/packages/my-jetpack/_inc/onboarding.jsx 0/5 (0.00%) 💔

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

LiamSarsfield
LiamSarsfield previously approved these changes Sep 17, 2026

@LiamSarsfield LiamSarsfield 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.

I checked this from Boost's side and it looks good to me. On the Boost settings page, legacy and modern (standalone and with Jetpack), myJetpackInitialState, myJetpackRest and the connection state still print before jetpack-boost-admin. The upgrade interstitial loads products and opens as before. #/add-license and #/add-boost work on direct load and with back/forward from Boost. I also ran the released Boost 4.7.1 zip against this My Jetpack, and its my_jetpack_main_app dependency resolves to the script-less handle with no errors. Boost's pages match trunk apart from the font stack and the #wpwrap colour, neither of which is visible here, and notices stay hidden.
One small thing for the description: Boost's page also stops loading build/index.js and jetpack-shared-stores.js, and the legacy Boost page no longer prints the wp-build admin-frame style/script. None of that is visible, and dropping the ~2.4 MB bundle is a nice win for Boost 🚀

CGastrell
CGastrell previously approved these changes Sep 17, 2026

@CGastrell CGastrell 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.

LGTM!

dhasilva and others added 2 commits September 17, 2026 18:23
The dashboard now always renders through wp-build. The webpack build
keeps two entries: the onboarding takeover, which hides all wp-admin
chrome and stays on its own bundle, and the async notification bubble.

The React state stays on the `my_jetpack_main_app` handle, now
script-less. Boost depends on that name from its own admin page, so
released Boost versions keep resolving it without downloading the
dashboard bundle. The Features tab flag no longer requires the
retired wp-build flag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dhasilva
dhasilva dismissed stale reviews from CGastrell and LiamSarsfield via d105a02 September 17, 2026 21:24
@dhasilva
dhasilva force-pushed the update/my-jetpack-retire-wp-build-flag branch from d5389ac to d105a02 Compare September 17, 2026 21:24
@dhasilva
dhasilva merged commit 9e11eeb into trunk Sep 17, 2026
251 of 257 checks passed
@dhasilva
dhasilva deleted the update/my-jetpack-retire-wp-build-flag branch September 17, 2026 22:41
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Sep 17, 2026
dhasilva added a commit that referenced this pull request Sep 18, 2026
The dashboard now always renders through wp-build. The `search-wp-build`
flag, its registration in Initializer::init(), and every branch on it are
removed, along with the legacy webpack entry (`src/dashboard/index.jsx`)
and its config, so the dashboard no longer ships twice.
`src/dashboard/scss/admin-layout.scss` goes too: since #52507 the route
imports `route.scss`, so only the legacy entry used it.

The initial state keeps riding the script-less data handle the wp-build
path already used. No other plugin depends on the retired
`jp-search-dashboard` handle. Where the package was never built, the page
now renders nothing, as My Jetpack's does since #52446.

Nothing else in the package uses automattic/jetpack-feature-flags, so the
requirement is dropped; the Jetpack and Search plugin locks lose only that
edge, since My Jetpack still requires the package.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CGastrell added a commit that referenced this pull request Sep 21, 2026
My Jetpack renders inside boot's layout since #52446 retired the wp-build
flag, and boot's Root already mounts a SnackbarNotices. A second list
subscribes to the same store, so every toast appears twice.

Drop the mount and its placement rule, as this branch already does for Scan.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dhasilva added a commit that referenced this pull request Sep 21, 2026
)

* Search: retire the wp-build flag and the legacy dashboard bundle

The dashboard now always renders through wp-build. The `search-wp-build`
flag, its registration in Initializer::init(), and every branch on it are
removed, along with the legacy webpack entry (`src/dashboard/index.jsx`)
and its config, so the dashboard no longer ships twice.
`src/dashboard/scss/admin-layout.scss` goes too: since #52507 the route
imports `route.scss`, so only the legacy entry used it.

The initial state keeps riding the script-less data handle the wp-build
path already used. No other plugin depends on the retired
`jp-search-dashboard` handle. Where the package was never built, the page
now renders nothing, as My Jetpack's does since #52446.

Nothing else in the package uses automattic/jetpack-feature-flags, so the
requirement is dropped; the Jetpack and Search plugin locks lose only that
edge, since My Jetpack still requires the package.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Changelog

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Changelog: drop the flag-era tail from the package entry

Nothing released described the dashboard without the frame, so "on every
site" pointed at a state no reader saw.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Stats Data [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants