FORNO-300: Skip premature enabling of AM via Block Notes#47975
FORNO-300: Skip premature enabling of AM via Block Notes#47975iamchughmayank wants to merge 2 commits intotrunkfrom
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. |
There was a problem hiding this comment.
Pull request overview
This PR removes Block Notes’ behavior that force-enabled the Agents Manager “unified experience” via the agents_manager_use_unified_experience filter, aligning with the goal of avoiding premature Agents Manager activation when Block Notes is enabled.
Changes:
- Removed the
enable_agents_manager_for_block_notes()filter hook from the Block Notes extension. - Deleted the associated unit tests that asserted the previous enablement behavior.
- Simplified test teardown by no longer clearing
agents_manager_use_unified_experiencefilters.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/plugins/jetpack/extensions/plugins/block-notes/block-notes.php | Stops Block Notes from enabling Agents Manager unified experience via a filter. |
| projects/plugins/jetpack/tests/php/extensions/plugins/block-notes/Block_Notes_Test.php | Removes tests for the deleted enablement function and drops related teardown cleanup. |
| // ------------------------------------------------------------------------- | ||
| // register_headless_agent_provider() tests | ||
| // ------------------------------------------------------------------------- |
There was a problem hiding this comment.
The PR removes the enable_agents_manager_for_block_notes() filter behavior (and its tests), but there isn’t a replacement regression test asserting Block Notes no longer enables Agents Manager’s unified experience. Consider adding a test that verifies no agents_manager_use_unified_experience filter is registered / apply_filters( 'agents_manager_use_unified_experience', false ) remains false when only Block Notes is enabled, so this behavior doesn’t accidentally reappear.
Code Coverage SummaryCoverage changed in 1 file.
|
|
Converted to draft since Block Notes was disabled temporarily. |
Fixes #
Proposed changes
Block Notes was hooking into the
agents_manager_use_unified_experiencefilter to force-enable Agents Manager whenever Block Notes was active causing Agents Manager to load site-wide.enable_agents_manager_for_block_notes()function and itsagents_manager_use_unified_experiencefilter hookBlock Notes JS (
block-notes.min.js) is self-contained and works independently of Agents Manager, consistent with how Image Studio operates.Other information
Related product discussion/links
Does this pull request change what data or activity we track or use?
Testing instructions
Regression test Block Notes:
bin/jetpack-downloader test jetpack fix/skip-premature-am-enable-block-notes