Skip to content

SEO: Add a per-site feature flag - #50899

Merged
gmjuhasz merged 3 commits into
trunkfrom
gmjuhasz/enable-site-seo-flag
Aug 3, 2026
Merged

SEO: Add a per-site feature flag#50899
gmjuhasz merged 3 commits into
trunkfrom
gmjuhasz/enable-site-seo-flag

Conversation

@gmjuhasz

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Add a sticker-controlled seo-admin-ui WordPress.com feature entry, following the existing Social UI v2 rollout pattern.
  • Enable Jetpack SEO when either the existing rsm_jetpack_seo filter or the new site feature is active.
  • Reuse that shared availability check for the opt-in surfaces and plugin-search suggestion so they cannot drift from the package gate.

This lets the SEO rollout be managed per site after the supporting code ships, while preserving the existing filter for development and self-hosted testing.

Related product discussion/links

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

No.

Testing instructions

  • With the matching WordPress.com Store_Product_List change deployed, add the jetpack-seo-admin-ui blog sticker to a test site and refresh its feature data.
  • Without an rsm_jetpack_seo filter, confirm seo-admin-ui is active and the Jetpack SEO menu/page loads.
  • Remove the sticker and confirm the menu is unavailable when neither gate is enabled.
  • Add add_filter( 'rsm_jetpack_seo', '__return_true' ); and confirm the existing filter still enables the menu/page.
  • Automated checks run locally: SEO PHPUnit suite (178 tests, 724 assertions), PHPCS, changelog validation, and Phan for packages/seo, plugins/jetpack, and plugins/wpcomsh.

@github-actions

github-actions Bot commented Jul 29, 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 or WordPress.com Site Helper), and enable the gmjuhasz/enable-site-seo-flag branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack gmjuhasz/enable-site-seo-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] Seo [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Wpcomsh [Status] In Progress [Tests] Includes Tests Docs labels Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 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:

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.


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

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

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jul 29, 2026
@jp-launch-control

jp-launch-control Bot commented Jul 29, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/seo/src/class-initializer.php 37/43 (86.05%) -0.44% 1 ❤️‍🩹
projects/plugins/jetpack/modules/plugin-search.php 0/269 (0.00%) 0.00% 1 ❤️‍🩹

Full summary · PHP report · JS report

@gmjuhasz
gmjuhasz requested a review from a team July 29, 2026 14:52
@gmjuhasz gmjuhasz self-assigned this Jul 29, 2026
@gmjuhasz gmjuhasz added the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Jul 29, 2026
@gmjuhasz
gmjuhasz marked this pull request as ready for review July 29, 2026 14:53
manzoorwanijk
manzoorwanijk previously approved these changes Jul 30, 2026

@manzoorwanijk manzoorwanijk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

xavier-lc pushed a commit that referenced this pull request Jul 30, 2026
Ran the skill end to end against three PRs of deliberately different
shape and fixed what each one broke:

- #50899 (PHP package + admin surface): wrong SSH host fallback, `wp
  --version` smoke test that prints the help screen, `jnwp` documented
  as a shell function that cannot survive between tool calls, and wrong
  Beta Tester plugin slugs.
- #50925 (JS-only package, front-end surface): step 2b had no path for
  asset-based PRs at all, and step 5a wrongly assumed every plan gate
  reads `jetpack_active_plan` (Search keeps its own option).
- #50419 (standalone plugin, plugin-owned assets): shadowing does not
  apply to standalone targets, `get_installed_path()` does not apply to
  plugin-owned assets, and the bundle-grep recipe used `grep -c`, which
  counts lines and returns 1 for a minified bundle regardless.

The substantive correction is step 2b. It framed autoloader shadowing as
an edge case tied to stale branches and recommended a rebase. In fact
branch and trunk normally share a base version, so the `-alpha<timestamp>`
suffix is the tiebreak and production wins by default — observed losing by
5.3h on one PR and by 470s on another. A rebase does not fix that. The
stale-branch flag and rebase advice now apply only to a genuinely lower
base version.

Also: act on PR `state` rather than just capturing it (merged PRs invert
the shadowing analysis), treat an unfilled PR template as no testing
instructions, make "no preconditions" an explicit valid outcome, and make
step 6 prove the surface renders instead of assuming it — a run can now
end "set up correctly but the feature needs infrastructure a local
override cannot fake" rather than handing over a dead link.

Readiness polling was wrong twice before landing: HTTP 200 arrives ~15s
before configuration starts, and `jetpack-beta` is installed in JN's
first phase. It now waits on `blogname`, the last command JN runs,
verified across all 7 available site configs, with a documented fallback.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYjcP1i48RfT2kA7XrkgND
@gmjuhasz
gmjuhasz merged commit f39b930 into trunk Aug 3, 2026
78 checks passed
@gmjuhasz
gmjuhasz deleted the gmjuhasz/enable-site-seo-flag branch August 3, 2026 07:43
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress [Status] Needs Team Review Obsolete. Use Needs Review instead. labels Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs [Package] Seo [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Wpcomsh [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.

2 participants