Skip to content

Settings: Send old Reader links to Features without a search on WoA - #55560

Open
CGastrell wants to merge 1 commit into
trunkfrom
fix/settings-reader-link-atomic
Open

CGastrell wants to merge 1 commit into
trunkfrom
fix/settings-reader-link-atomic

Conversation

@CGastrell

Copy link
Copy Markdown
Contributor

Fixes JETPACK-3957

Proposed changes

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.jsx in projects/plugins/jetpack. The new WoA row fails without the change; the existing /reader row still expects the search on other sites.

Not checked live: reaching #/reader on an Atomic site needs a Jetpack Beta build of this branch.

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>
@CGastrell CGastrell added Bug When a feature is broken and / or not performing as intended [Status] Needs Review This PR is ready for review. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Nov 27, 2026
@CGastrell CGastrell self-assigned this Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 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 fix/settings-reader-link-atomic branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/settings-reader-link-atomic

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 [Tests] Includes Tests Admin Page React-powered dashboard under the Jetpack menu labels Nov 27, 2026
@github-actions

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: December 8, 2026
    • Code freeze: December 7, 2026

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

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

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

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.

Comment on lines +311 to +317
// 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'

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.

[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.

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.

[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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu Bug When a feature is broken and / or not performing as intended [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] Needs Review This PR is ready for review. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants