Skip to content

Disable Write Brief (Breve) proofreading feature by default#47914

Merged
saroshaga merged 3 commits intotrunkfrom
update/disable-breve-via-filter
Apr 6, 2026
Merged

Disable Write Brief (Breve) proofreading feature by default#47914
saroshaga merged 3 commits intotrunkfrom
update/disable-breve-via-filter

Conversation

@saroshaga
Copy link
Copy Markdown
Contributor

@saroshaga saroshaga commented Apr 3, 2026

Summary

  • Flip the breve_enabled filter default from true to false in the AI Assistant PHP registration
  • This hides the Write Brief (Breve) proofreading feature for all users without removing any code
  • Remove the Breve video card from the My Jetpack AI product page since the feature is now disabled
  • The feature can be re-enabled per-site by hooking into the filter: add_filter( 'breve_enabled', '__return_true' );

More Context

  • pgLAn3-iK-p2
  • p1HpG7-xUC-p2

Testing instructions:

  1. Build the Jetpack plugin (`pnpm jetpack build plugins/jetpack`)
  2. Open the WordPress block editor (create or edit a post)
  3. Open the Jetpack AI Assistant sidebar panel (in the right sidebar)
  4. Verify the "Write Brief" section is not visible in the sidebar
  5. Type some content in a paragraph block — verify there are no Breve highlights (colored underlines for spelling, complex words, long sentences)
  6. Navigate to My Jetpack → AI (`wp-admin/admin.php?page=my-jetpack#/jetpack-ai`)
  7. Scroll down to the "AI Features" video showcase section
  8. Verify the "Make your writing easy to read" (Breve) video card is not shown
  9. Verify all other video cards (Content Generation, Featured Images, Title Optimization, Forms, Content Feedback) are still present
  10. Add `add_filter( 'breve_enabled', '__return_true' );` to your theme's `functions.php`
  11. Reload the editor and verify the "Write Brief" toggle reappears in the AI Assistant sidebar
  12. Verify Breve highlights work when enabled
  13. Verify other AI features (title optimization, featured image, feedback) still work normally

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

No. This PR only changes the default value of an existing filter. No new data collection, tracking, or privacy-related changes are introduced.

🤖 Generated with Claude Code

Flip the breve_enabled filter default from true to false, which hides
the feature for all users without removing any code. The feature can be
re-enabled by setting the filter to true.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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/disable-breve-via-filter branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/disable-breve-via-filter

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 [Block] AI Assistant [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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:

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.

@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 Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR disables the Write Brief (Breve) proofreading feature by default (while keeping the code intact), making it opt-in via the breve_enabled filter. This is a reversible alternative to fully removing the feature.

Changes:

  • Flip the default for the breve_enabled filter from true to false when registering the Breve extension (still gated to English locales).
  • Add a Jetpack changelog fragment documenting the behavior change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
projects/plugins/jetpack/extensions/blocks/ai-assistant/ai-assistant.php Defaults Breve availability to off by setting apply_filters( 'breve_enabled', false ) (still only for en* locales).
projects/plugins/jetpack/changelog/disable-breve-via-filter Adds a changelog fragment describing the default-disable behavior and how to re-enable.

@@ -0,0 +1,5 @@
Significance: minor
Type: major
Comment: Disable the Write Brief (Breve) proofreading feature by default. It can be re-enabled via the 'breve_enabled' filter.
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Comment: header in Jetpack changelog fragments is typically used to explain why no changelog entry text is included. This fragment includes both a Comment: header and a non-empty entry, which may cause the changelogger tooling to treat the entry unexpectedly. Consider removing the Comment: header (or alternatively, remove the entry text if the intent is to skip the changelog).

Suggested change
Comment: Disable the Write Brief (Breve) proofreading feature by default. It can be re-enabled via the 'breve_enabled' filter.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jp-launch-control
Copy link
Copy Markdown

jp-launch-control bot commented Apr 3, 2026

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/my-jetpack/_inc/components/product-interstitial/jetpack-ai/product-page.jsx 0/60 (0.00%) 0.00% -3 💚

Full summary · PHP report · JS report

@saroshaga saroshaga requested a review from dhasilva April 3, 2026 09:38
The Comment header in Jetpack changelog fragments is meant for entries
with no changelog text. Move the filter re-enabling note into the
actual changelog entry instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@aagam-shah aagam-shah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

The My Jetpack AI product page (wp-admin/admin.php?page=my-jetpack#/jetpack-ai) still shows the Breve video card unconditionally — it's not gated by this filter.

Image

Should we remove this as part of this PR?

The Breve feature is now disabled by default, so the product page
should no longer showcase it unconditionally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@saroshaga
Copy link
Copy Markdown
Contributor Author

The My Jetpack AI product page (wp-admin/admin.php?page=my-jetpack#/jetpack-ai) still shows the Breve video card unconditionally — it's not gated by this filter.
Should we remove this as part of this PR?

done it 21089da

@aagam-shah aagam-shah requested a review from Copilot April 3, 2026 09:48
@aagam-shah
Copy link
Copy Markdown
Contributor

@claude - please review this PR

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 3, 2026

Claude finished @aagam-shah's task in 1m 42s —— View job


PR Review

  • Gather context and read changed files
  • Review PHP changes
  • Review JSX changes
  • Review changelog entries
  • Post full review

Overall, this is a clean, well-scoped PR. The approach of flipping the filter default is the right call for a safe, reversible disable. Here's a breakdown of each change:

ai-assistant.php — Core change

The single-line flip from true to false is correct:

// Before
if ( str_starts_with( $site_locale, 'en' ) && apply_filters( 'breve_enabled', true ) ) {

// After
if ( str_starts_with( $site_locale, 'en' ) && apply_filters( 'breve_enabled', false ) ) {

The updated inline comment clearly documents the new opt-in behavior. No issues here.

product-page.jsx — My Jetpack AI product page cleanup

The Breve video card block is fully removed. I verified:

  • videoTitleBreve and videoLinkBreve constants are gone, and no other references remain
  • newBadge was only used for the Breve card — correctly removed
  • getRedirectUrl import is not orphaned — still used for 5+ other redirects in the same file

Clean removal with no loose ends.

Changelog entries

projects/plugins/jetpack/changelog/disable-breve-via-filter:

Significance: minor
Type: major

Minor nit: Type: major maps to "Major Enhancements" in the plugin's changelogger config, which is a slightly odd category for disabling a feature. Type: other might be semantically more accurate (it goes into the non-user-facing section). That said, Type: major with Significance: minor is an existing pattern in this repo (see release-image-studio-in-jetpack), so this isn't a blocker. Fix this →

projects/packages/my-jetpack/changelog/disable-breve-via-filter:

Significance: patch
Type: changed

Looks correct — patch significance for a UI-only removal in the my-jetpack package.

Observations

  • The previously flagged Comment: header issue (noted by Copilot) was already fixed in commit 21e4f20. Current changelog format is clean.
  • The Breve video card removal in My Jetpack (added in 21089da after review) is properly accompanied by a changelog entry for the my-jetpack package.
  • The PR description should still add the testing instructions and data/privacy sections to satisfy the bot checks, even if the answers are trivial (e.g., "No data or privacy changes").

Summary: The implementation is correct and complete. The only actionable item is the optional changelog type adjustment noted above. Good to merge once the label and PR description sections are addressed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 4 out of 4 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

@aagam-shah aagam-shah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@saroshaga saroshaga added the [Status] Needs Review This PR is ready for review. label Apr 3, 2026
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Apr 3, 2026
@saroshaga saroshaga added the [Status] Needs Review This PR is ready for review. label Apr 3, 2026
Copy link
Copy Markdown
Contributor

@keoshi keoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Kudos to @aagam-shah for spotting Breve's mention in the AI LP.

Copy link
Copy Markdown
Contributor

@CGastrell CGastrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Works as described! :shipit:

@saroshaga saroshaga merged commit e1990c7 into trunk Apr 6, 2026
103 checks passed
@saroshaga saroshaga deleted the update/disable-breve-via-filter branch April 6, 2026 04:15
@github-actions github-actions bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] Needs Review This PR is ready for review. labels Apr 6, 2026
saroshaga added a commit that referenced this pull request Apr 6, 2026
- Tighten deprecation link condition to also check canWriteBriefBeEnabled()
  so notice only shows when the feature could be enabled but isn't
- Update changelog wording to describe conditional behavior
- Remove stale my-jetpack changelog (product page change was in #47914)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] AI Assistant [Package] My Jetpack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] UI Changes Add this to PRs that change the UI so documentation can be updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants