Repository navigation
Conversation
On these plans Jetpack's Protect page does not load (WordPress.com shows a Protect upsell), so the security routes and terms keep the settings on Settings until a Protect page shows them. On every Atomic site the Reader route goes to Features, since the Reader row has no control there. Part of JETPACK-3916. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
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. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
Atomic Business with the Protect dashboard module off can still turn it on from Features, so only sites where WordPress.com removes the module keep Security on Settings. Suggested in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit carried only the changelog; this adds the map edits it describes, plus the stale protectTerms text and the Reader note fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhasilva
left a comment
There was a problem hiding this comment.
I checked both rule changes against the code they describe. Two suggestions inline, neither blocking.
- The new
protectDashboardAvailable: falserules come afterprotectPage: truein all six lists. A site whose Protect page is registered still goes there first, and an Atomic Business site with the module turned off still reaches the Protect card.WPCOM_Scan::filter_available_modules()is hooked only on Atomic and drops the module withoutSCAN_SELF_SERVE, as the condition says. - The
/readerrule matches #55507, which hides the Reader row on Atomic. - The JSON parses, and the
Comment:-only changelog entry suits a file nothing reads yet.
Generated by Claude.
| "host": "\"atomic\" for a WoA site.", | ||
| "moduleActive": "This Jetpack module is active.", | ||
| "protectPage": "did_action( 'jetpack_protect_dashboard_initialized' ) (siteData.hasProtectPage): the protect-dashboard module or the connected Jetpack Protect plugin registered the Protect page. Not Automattic\\Jetpack\\My_Jetpack\\Products\\Protect::has_protect_page(), which is also true while the plugin shows its own page.", | ||
| "protectDashboardAvailable": "The protect-dashboard module is in Jetpack::get_available_modules(). WPCOM_Scan (jetpack-mu-wpcom) removes it on Atomic plans without the Scan feature, such as Personal and Premium.", |
There was a problem hiding this comment.
[suggestion] This condition covers more than Atomic Personal and Premium. Jetpack_Protect_Dashboard_Feature_Flags::filter_available_modules() also drops protect-dashboard from the available list whenever the Jetpack Protect plugin is active, on any host, and while the jetpack-protect-dashboard flag is off. So on a site with the Protect plugin active but not connected (protectPage false), /security and the five Protect terms now stay on Settings too, where they used to go to the Protect card.
Staying on Settings is the better result there, since the card can't turn on a module that isn't available. The problem comes when protect-page is cleared: whoever builds the Personal/Premium page will probably give this rule that page as its destination, and that would also send a self-hosted site with an unconnected Protect plugin to a WordPress.com upsell. I'd list all three causes here, and say in the protect-page description that the marker covers only the WPCOM_Scan cause. The plugin case clears once the plugin connects (protectPage), or it can get a rule of its own.
Generated by Claude.
There was a problem hiding this comment.
Addressed in 7aafe31. The condition now names all three causes (WPCOM_Scan, an active Protect plugin, the dashboard flag), and the protect-page marker says it covers only the WPCOM_Scan one, so a future destination for it must not reach the other two.
| { | ||
| "when": { "host": "atomic" }, | ||
| "destination": "admin.php?page=my-jetpack#/features", | ||
| "note": "wpcomsh keeps the Reader module on for WoA sites, so its Features row has no control, and JETPACK-3940 hides that row, after which a search for reader finds nothing." | ||
| }, |
There was a problem hiding this comment.
[suggestion] Leaving alreadyRedirects off this rule is correct, but /reader already redirects today. main.jsx sends it to features?search=reader on every host while consolidation is on, and that flag defaults on. So since #55507, the live redirect on Atomic Business opens a search that no longer shows the Reader row.
Few people hit it: Settings hides the Reader tab on WoA (settings-nav-tabs) and nothing in the repo links to #/reader, so only a typed or bookmarked URL gets there. Still, an isWoASite() check (from @automattic/jetpack-script-data, as settings-nav-tabs uses) in that case would make the live redirect match this rule, and the rule could then carry alreadyRedirects. A follow-up is fine if you'd rather keep this PR to the map.
Generated by Claude.
There was a problem hiding this comment.
Done separately in #55560 (JETPACK-3957): on WoA, #/reader now opens Features without the search. I kept this PR to the map; once #55560 merges, this rule can take alreadyRedirects.
The protect-page marker covers only WPCOM_Scan's, so a future destination for it must not reach self-hosted sites with an unconnected Protect plugin. Suggested in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Settings app sends `#/reader` there on WoA since #55560.
Part of JETPACK-3916
Proposed changes
Updates the Settings redirect map (
settings-redirect-map.json) for Atomic Personal and Premium, which get settings consolidation once My Jetpack shows there (JETPACK-3784). The map is a plan for retiring the Settings screen; no code reads it yet.hasProtectPageis false); WordPress.com shows a Protect upsell instead, so Settings keeps its Security tab. The map sent/securityand thewaf,protect,account-protection,ssoandmonitorterms to the Protect card in Features, which cannot turn that page on there, and the allowed IP addresses live only on Settings. They now stay on Settings (pending: protect-page, a new marker) where the protect-dashboard module is unavailable, a new condition (protectDashboardAvailable). WPCOM_Scan in jetpack-mu-wpcom removes that module on Atomic plans without Scan. A Business site with the module turned off still goes to the Protect card, which can turn it back on./readeron Atomic now goes to Features instead of a search for "reader" that would find nothing.Every other rule already resolves the same way on Personal and Premium as on Business, through its conditions. The table compares them, using the JETPACK-3914 live pass for where each setting lives:
/securityand the five Protect termsprotect-page)protect-page)/reader/trafficgoogleAnalyticsPanel: falserule already covers Personalgoogle analyticsterm/earn,wordadstermmonetize-page)searchtermRelated product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
python3 -c "import json; json.load(open('projects/plugins/jetpack/_inc/lib/admin-pages/settings-redirect-map.json'))"parses. No code reads the map, so there is nothing else to run.hasProtectPage: false, and its remaining tabs aresecurity, earn(Premium) andsecurity, traffic, earn(Personal), matching the rules above.