Repository navigation
Conversation
wpcomsh keeps the Reader module on and #55507 hides its Features row, so `?search=reader` found nothing there. Fixes JETPACK-3957. 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. 🤷 |
dhasilva
left a comment
There was a problem hiding this comment.
The change looks right: on WoA, #55507 removes the Reader row from Features, so plain Features is the only useful place to land, and it matches the /reader rule in #55519. CI is green.
I left two suggestions inline: gate on the existing isMovedOut() helper instead of adding a second isWoASite() check, and make the changelog entry private, because the bug never reaches a release.
On testing: you can check the redirect without an Atomic site. With this build and settings consolidation on, add a mu-plugin that sets $data['site']['host'] = 'woa' through jetpack_admin_js_script_data. That makes isWoASite() true, and admin.php?page=jetpack#/reader should then land on my-jetpack#/features.
Generated by Claude.
| // WoA keeps the Reader on and hides its row, so a search there would find nothing. | ||
| if ( '/reader' === route && isSettingsConsolidationEnabled() ) { | ||
| window.location.replace( | ||
| getAdminUrl( 'admin.php?page=my-jetpack#/features?search=reader' ) | ||
| getAdminUrl( | ||
| isWoASite() | ||
| ? 'admin.php?page=my-jetpack#/features' | ||
| : 'admin.php?page=my-jetpack#/features?search=reader' |
There was a problem hiding this comment.
[suggestion] getMovedOutModules() already has this WoA rule (settings-consolidation/index.js#L60-L61), and the Reader card reads it through isMovedOut( moduleName ) (reader/index.jsx#L72). If the redirect uses the same helper, the redirect and the card stay in step and the code carries one reason instead of two:
getAdminUrl(
isMovedOut( 'wpcom-reader' )
? 'admin.php?page=my-jetpack#/features'
: 'admin.php?page=my-jetpack#/features?search=reader'
)The new comment line can then go, or its reason can move into the comment at L60. The test would also need isMovedOut in the lib/settings-consolidation mock. The real isMovedOut calls its own module's isSettingsConsolidationEnabled, not the mocked export, so in the test it would read false.
Generated by Claude.
| Significance: patch | ||
| Type: bugfix | ||
|
|
||
| Settings: Open My Jetpack Features without an empty search when an old Reader link is followed on WordPress.com sites. |
There was a problem hiding this comment.
[suggestion] This fixes a bug that no release has. The #/reader redirect only runs with settings consolidation on, and turning consolidation on by default (#55325) hasn't shipped yet: its changelog entry is still pending on trunk. If both land in the same release, its notes would list a fix for a bug its users never hit. A private entry fits:
Significance: patch
Type: bugfix
Comment: Send old Reader links to Features without a search on WoA, where the Reader row is hidden.
If the entry stays public, "an empty search" reads like a blank search box. "A search that finds nothing" says what actually happened.
Generated by Claude.
Fixes JETPACK-3957
Proposed changes
#/readerlink to My Jetpack › Features with?search=reader. On WoA, wpcomsh keeps the Reader module on and wpcomsh: Hide the forced-on Reader row from My Jetpack Features #55507 hides its Features row, so that search finds nothing.#/readernow opens Features without the search. Self-hosted keeps the search.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
pnpm test-gui _inc/client/test/security-route.test.jsxinprojects/plugins/jetpack. The new WoA row fails without the change; the existing/readerrow still expects the search on other sites.Not checked live: reaching
#/readeron an Atomic site needs a Jetpack Beta build of this branch.