Repository navigation
Jetpack AI: Send the editor and Settings links to the Jetpack AI Hub - #53519
Conversation
|
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: 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. |
Code Coverage SummaryCoverage changed in 2 files.
1 file is newly checked for coverage.
|
72b52e5 to
01c31fc
Compare
01c31fc to
c1516f1
Compare
c1516f1 to
c918431
Compare
c918431 to
679889b
Compare

Proposed changes
The My Jetpack product card opens the Jetpack AI Hub, but three links still open the old My Jetpack AI page: "Discover all features" in the AI Assistant block, "Learn more about Jetpack AI" in the Jetpack sidebar, and "Learn more about all Jetpack AI features" under Settings › Writing › Composing. This PR points them at the same place the card goes.
myJetpack.aiManageUrlin the admin script data) for users withmanage_options, reusingJetpack_Ai::get_manage_url(). Nobody else can open the pages it points at, so nobody else pays for the lookup.@automattic/jetpack-shared-extension-utilsgetsgetJetpackAiManageUrl(), which reads that value and falls back to the old My Jetpack page when it is absent. It lives there rather than in@automattic/jetpack-script-dataon purpose: script-data is a page-level global served by whichever plugin's assets package wins, so a brand-new export there is undefined wherever an older bundle is served. On WordPress.com Atomic that bundle comes from wpcomsh, and an earlier version of this branch crashed the AI Assistant block for exactly that reason. shared-extension-utils is bundled into each plugin's own build.manage_optionsget the jetpack.com AI page instead. The Jetpack AI Hub is an administrator page, so sending an Editor there would show "Sorry, you are not allowed to access this page."The old page itself is untouched. Removing it is a separate step that waits on a product decision for WordPress.com Atomic sites.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Self-hosted, as an administrator (Jetpack connected)
wp-admin/admin.php?page=jetpack-ai). Keep that URL in mind: every link below should match it.Self-hosted, as an Editor
WordPress.com Atomic, as an administrator (install the branch with the Jetpack Beta plugin)
WordPress.com Simple (this branch cannot be installed there; this only confirms nothing changes)
🤖 Generated with Claude Code