Jetpack AI Sidebar: Add internal Proofreader sidebar feature flag#49825
Jetpack AI Sidebar: Add internal Proofreader sidebar feature flag#49825iamchughmayank wants to merge 6 commits into
Conversation
- Mirror Generate Feedback: dev-mode-only gate, emitted as proofreadContent in jetpackAiSidebarPreview.features for the sidebar provider to render the chip - Re-assert the flag after the preview-features filter so it cannot enable the internal feature - Include it in the master sidebar preview gate - Add tests for the default flag value and the filter guard Co-Authored-By: Claude Opus 4.8 (1M context) <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 SummaryCoverage changed in 1 file.
|
…bility # Conflicts: # projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/ai-sidebar/class-jetpack-ai-sidebar.php # projects/plugins/jetpack/tests/php/extensions/plugins/ai-sidebar/Jetpack_AI_Sidebar_Test.php
There was a problem hiding this comment.
Pull request overview
Adds a new internal-testing-only UI feature flag for a “Proofreader” suggestion in the Jetpack AI Sidebar Preview feature set, aligning it with the existing in-development suggestion gating approach (e.g., Generate Feedback).
Changes:
- Introduce
is_proofread_content_enabled()and exposeproofreadContentin the sidebar previewfeaturespayload. - Re-assert
proofreadContentafter thejetpack_ai_sidebar_preview_featuresfilter to prevent non-internal environments from enabling it via the generic filter. - Extend existing PHPUnit coverage to include the new
proofreadContentflag behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/ai-sidebar/class-jetpack-ai-sidebar.php | Adds the Proofreader feature flag and includes it in the preview feature payload with post-filter re-assertion. |
| projects/plugins/jetpack/tests/php/extensions/plugins/ai-sidebar/Jetpack_AI_Sidebar_Test.php | Updates tests to assert proofreadContent is gated off outside internal testing and cannot be enabled by the generic features filter. |
| projects/plugins/jetpack/changelog/update-proofreader-ability | Adds a Jetpack plugin changelog entry for the new internal Proofreader sidebar flag. |
- Drop redundant `Jetpack AI:` prefix in favor of `AI Sidebar:` (matches sibling entries; the plugin name is already implied in its own changelog) - `dev/internal mode` -> `internal testing environments`, matching the actual `jetpack_is_internal_testing_environment()` gate Addresses the Copilot review note on the changelog entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| /** | ||
| * In an internal testing environment, the in-development suggestions (Generate | ||
| * Feedback and Optimize Title) are exposed. | ||
| * Feedback, Proofreader and Optimize Title) are exposed. | ||
| */ |
…bility # Conflicts: # projects/plugins/jetpack/tests/php/extensions/plugins/ai-sidebar/Jetpack_AI_Sidebar_Test.php
- Changelog: capitalize "Add", "&" -> "and" - Feature-flag PHPDoc: "&" -> "and" - Test docblock: reflow parenthetical + add serial comma
Proposed changes
testing environments only; not user-facing.
is_proofread_content_enabled()— internal-only, like Generate Feedback.proofreadContentto the Jetpack AI Sidebar feature map, surfaced to the client atagentsManagerData.jetpackAiSidebar.features(built inget_jetpack_ai_sidebar_preview_config()).jetpack_ai_sidebar_preview_featuresfilter so a generic filter can't enable the internal feature outside internal testing environments.Related PRs
Does this pull request change what data or activity we track or use?
No.
Testing instructions