Skip to content

Jetpack AI Sidebar: Add internal Proofreader sidebar feature flag#49825

Open
iamchughmayank wants to merge 6 commits into
trunkfrom
update/proofreader-ability
Open

Jetpack AI Sidebar: Add internal Proofreader sidebar feature flag#49825
iamchughmayank wants to merge 6 commits into
trunkfrom
update/proofreader-ability

Conversation

@iamchughmayank

@iamchughmayank iamchughmayank commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

  • Adds a host-side feature flag for a Proofreader (spelling & grammar) suggestion in the Jetpack AI Sidebar, mirroring the existing Generate Feedback flag. Internal
    testing environments only; not user-facing.
    • is_proofread_content_enabled() — internal-only, like Generate Feedback.
    • Adds proofreadContent to the Jetpack AI Sidebar feature map, surfaced to the client at agentsManagerData.jetpackAiSidebar.features (built in
      get_jetpack_ai_sidebar_preview_config()).
    • Re-asserts the flag after the jetpack_ai_sidebar_preview_features filter so a generic filter can't enable the internal feature outside internal testing environments.
  • The sidebar provider/UI lives in the companion Calypso PR; the backend ability lives in the companion wpcom PR.

Related PRs

  • Calypso (sidebar provider): #111885
  • wpcom (backend ability): 224522-ghe-Automattic/wpcom

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • End-to-end testing (sandbox + this Jetpack branch + the Calypso provider) is covered in the companion wpcom PR: 224522-ghe-Automattic/wpcom

- 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>
@github-actions

github-actions Bot commented Jun 22, 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 update/proofreader-ability branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/proofreader-ability

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 [Extension] AI Assistant Plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress [Tests] Includes Tests labels Jun 22, 2026
@github-actions

github-actions Bot commented Jun 22, 2026

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: July 7, 2026
    • Code freeze: July 6, 2026

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

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 22, 2026
@jp-launch-control

jp-launch-control Bot commented Jun 22, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/ai-sidebar/class-jetpack-ai-sidebar.php 142/165 (86.06%) 0.26% 0 💚

Full summary · PHP report · JS report

…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

Copilot AI 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.

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 expose proofreadContent in the sidebar preview features payload.
  • Re-assert proofreadContent after the jetpack_ai_sidebar_preview_features filter to prevent non-internal environments from enabling it via the generic filter.
  • Extend existing PHPUnit coverage to include the new proofreadContent flag 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.

Comment thread projects/plugins/jetpack/changelog/update-proofreader-ability Outdated
@iamchughmayank iamchughmayank marked this pull request as ready for review June 24, 2026 16:39
@iamchughmayank iamchughmayank changed the title Jetpack AI: add internal Proofreader sidebar feature flag Jetpack AI Sidebar: Add internal Proofreader sidebar feature flag Jun 24, 2026
- 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>

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment on lines 540 to 543
/**
* In an internal testing environment, the in-development suggestions (Generate
* Feedback and Optimize Title) are exposed.
* Feedback, Proofreader and Optimize Title) are exposed.
*/
Comment thread projects/plugins/jetpack/changelog/update-proofreader-ability Outdated
…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
@iamchughmayank iamchughmayank requested a review from Copilot June 26, 2026 12:35

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

[Extension] AI Assistant Plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants