Repository navigation
Search: retire the wp-build flag and the legacy dashboard bundle - #52506
Conversation
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
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:
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. |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryCoverage changed in 2 files.
|
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>
1abdfa6 to
9805ba0
Compare
|
Tested on a Jurassic Ninja site and an Atomic Business site. Same page, three states:
Also checked: Standalone Search — listed as unverified — behaves identically to Jetpack. Atomic passes with no flag registered anywhere. The removed One suggestion: drop "on every site" from the Not covered: Simple at runtime, and the client-side half everywhere (the Verdict: no blockers, merge after the changelog nit. Terminator |
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>
|
Dropped "on every site" from the On your two gaps: the client-side half is verified locally — the Generated by Claude. |
`is_wp_build_dashboard_active()` lives in `Jetpack_Backup`, not in Search. Search had it while #52416 was current; #52506 deleted it with the legacy bundle, which §8 already cites. Attribute the shared-predicate pattern to Backup, and describe Search's post-retirement gates as they are now. Drop the duplicate symbol+line citation in the second bullet, and add a pointer from `docs/monorepo.md` § Building so the checklist is reachable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Add the wp-build porting checklist Nine dashboards have shipped through wp-build so far, and the same traps kept recurring: the screen-ID alias shipping without its restore (five ports), JITM views logged for cards nobody could see, wp_localize_script silently doing nothing against an ES module page, and a build/ fallback that disagreed between call sites. Fold the checklist that already existed piecemeal across four Linear comments on JETPACK-2575, plus JETPACK-2573's verification steps and JETPACK-2687/2689's screen-ID findings, into one document in docs/ so the next port can follow it without rediscovering any of this. Fixes JETPACK-2575 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Checklist: unwrap, fix the dashboard count and two section cross-references * Checklist: correct the boot-bump attribution and two fix-vs-regression citations * Checklist: fix the §8 attribution and link the doc from monorepo.md `is_wp_build_dashboard_active()` lives in `Jetpack_Backup`, not in Search. Search had it while #52416 was current; #52506 deleted it with the legacy bundle, which §8 already cites. Attribute the shared-predicate pattern to Backup, and describe Search's post-retirement gates as they are now. Drop the duplicate symbol+line citation in the second bullet, and add a pointer from `docs/monorepo.md` § Building so the checklist is reachable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Checklist: apply the review Every item confirmed against trunk before it was written in. Corrections: - The restore does not protect `pagenow`. `admin-header.php` prints it from `$current_screen->id` before it fires `admin_enqueue_scripts`, so only the old `current_screen` alias ever reached it. Moved to the old-pattern line. - Seven ports shipped without the restore, not five. #52471 also fixed Podcast and SEO. - The JITM container belongs in the page shell, not in a tab panel. `Tabs.Panel` defaults to `keepMounted={ false }`, so Search's container leaves the DOM on a tab switch. Cite Social and Boost instead. - An empty `apiRoot` breaks `@automattic/jetpack-api`, not every API call. `@wordpress/api-fetch` has its own root. - #50762 fixed seven dashboards. SEO, Podcast and Scan still have no `packages/init`, no `build:stamp-textdomains` and no i18n loader, so §6 now says to copy Backup or Search rather than the SEO file it cites. - §8 required a visible error and then called a blank page expected. Split into two rules: a brand-new route shows an error, a retired port renders nothing and that is accepted. §9 step 7 matches. - Drop the port count and list, which was already stale. Name the flag mechanism: a `Feature_Flags` flag, which is where ports should land even though the shipped ones still use bare filters. Additions, each one something a port needs and the checklist omitted: the polyfills package in both manifests; the `.gitattributes` excludes and the `build/**` include; importing `route.scss` from `stage.tsx`, since `@wordpress/build` records `hasStyle` and never reads it; a shared mixin for multi-route layout; the Safe Mode banner, hidden by the same template rule; and moving the legacy entry's side effects into `stage.tsx`. Linear links replaced with bare issue IDs — external contributors cannot open them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Part of JETPACK-2568. Its other open item, the Customberg decision, is not covered here.
Proposed changes
Retires the
search-wp-buildfeature flag added by #52416. The Jetpack Search dashboard now always renders through wp-build, inside the rounded frame, and the legacy dashboard bundle is gone. This follows the same steps as the My Jetpack retirement in #52446.Initializer::init(),is_modernized(),is_wp_build_dashboard_active()and every branch on them are removed.Initializer::init()is back to its pre-port shape.src/dashboard/index.jsx,tools/webpack.dashboard.config.jsand thebuild-dashboardscript (from bothbuildandwatch) are removed, so the package no longer builds or shipsbuild/dashboard/. The dashboard was shipping twice: roughly 735 KB per mirror while the flag was off (item D in JETPACK-2686).src/dashboard/scss/admin-layout.scssis deleted. Since Admin page layout: clip Boot's stage so it can't add a second scrollbar #52507 the route importsroute.scss, which covers everything in this file, so only the legacy entry used it.jetpack-search-dashboard-datahandle the wp-build path already used.load_admin_scripts()no longer branches. No other plugin depends on the retiredjp-search-dashboardhandle (checked in the Search: serve the dashboard through wp-build, UI unchanged #52416 review, and re-checked withgit grepacrossprojects/).automattic/jetpack-feature-flagsis no longer required. Nothing else in the package uses it. The Jetpack and Search plugin locks each lose only that onerequireline: My Jetpack still requires the package, so it stays bundled.Dashboard_Wp_Build_Fallback_TestbecomesDashboard_Wp_Build_Test. The flag and fallback cases are gone. What remains covers the generated render call, the empty unbuilt render, the data handle, and both drift checks on the generated function name.Verification already done
jp test php packages/search: 763 pass. On an unbuilt checkout, 1 skipped (the build-guarded drift test). Afterjp build packages/search, all 6Dashboard_Wp_Build_Testcases pass, drift test included.jp test php packages/sync(the package's AGENTS.md asks for it): 164 pass.size-limitbudgets pass.tsgo --noEmit, ESLint, PHPCS andjp phan packages/searchare clean..github/files/check-lock-files.shpasses.jp build packages/searchproduces nobuild/dashboard/, and the generatedpage-wp-admin.phpdefinesjetpack_search_jetpack_search_dashboard_wp_admin_render_page().search-wp-buildno longer registered anywhere:#jetpack-search-dashboard-wp-admin-app, with#jp-search-dashboard(16px) inside.#/overview.36px / 39.996pxand is 508px wide, as in Search: serve the dashboard through wp-build, UI unchanged #52416's acceptance check.build/routes/dashboard/content.js. Nothing is requested frombuild/dashboard/.Not verified: the standalone Search plugin without Jetpack, Atomic, and WordPress.com Simple. On Simple, the dashboard is subclassed outside this repo to change the menu priority. That subclass could not have referenced anything removed here, since all of it was added by #52416 the day before.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Clear any leftover override first. On Jurassic Ninja:
wp companion feature-flag reset search-wp-build. Locally, remove anyjetpack_feature_flag_enabled_search-wp-buildfilter (mu-plugin or Code Snippet). Nothing reads the flag anymore, so a leftover is harmless, but removing it proves the page doesn't need it.Dashboard (Jetpack plugin)
admin.php?page=jetpack-search#/settings.document.querySelector( '#jetpack-search-dashboard-wp-admin-app #jp-search-dashboard' )finds the wrapper, andwindow.JP_CONNECTION_INITIAL_STATEis defined.jetpack-search/build/dashboard/, andbuild/routes/dashboard/content.jsloads.Standalone Search plugin
🤖 Generated with Claude Code