Agents Manager: skip the docked-sidebar pre-render on the Site Editor navigation view#50120
Agents Manager: skip the docked-sidebar pre-render on the Site Editor navigation view#50120wellyshen wants to merge 1 commit into
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! |
Code Coverage SummaryCoverage changed in 2 files.
Full summary · PHP report · JS report Coverage check overridden by
I don't care about code coverage for this PR
|
f45fc23 to
5925544
Compare
There was a problem hiding this comment.
Pull request overview
This PR refines where Agents Manager’s editor chat entry points and docked-sidebar shell are rendered by distinguishing the Site Editor dashboard (site-editor.php without ?canvas=edit) from the editing canvas.
Changes:
- Add an
Agents_Manager::is_site_editor_dashboard()check and use it to skip registering the omnibar Ask AI button and Help “?” menu on the Site Editor dashboard. - Prevent
Sidebar_Open_Preservationfrom pre-rendering the docked shell on the Site Editor dashboard (avoids reserved-space flash). - Add/adjust PHPUnit coverage for both the dashboard vs canvas behaviors.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/packages/agents-manager/tests/php/Sidebar_Open_Preservation_Test.php | Updates/extends tests to ensure the docked shell is only pre-rendered in the Site Editor canvas (?canvas=edit) and not on the dashboard. |
| projects/packages/agents-manager/tests/php/Agents_Manager_Test.php | Adds tests validating omnibar entry points are registered in the Site Editor canvas but not on the dashboard. |
| projects/packages/agents-manager/src/class-sidebar-open-preservation.php | Skips docked-shell pre-rendering on the Site Editor dashboard via the shared check. |
| projects/packages/agents-manager/src/class-agents-manager.php | Adds is_site_editor_dashboard() and uses it to avoid omnibar entry point registration on the dashboard view. |
| projects/packages/agents-manager/changelog/fix-agents-manager-site-editor-dashboard-no-dock-shell | Adds a patch-level fixed changelog entry for the behavior change. |
447313b to
3d7a082
Compare
4fe4bba to
994ed79
Compare
994ed79 to
befab03
Compare
716fa95 to
fbb3d5b
Compare
… navigation view The Site Editor navigation view (its hub/list view) has a left navigation menu where the chat can't dock. Add `Agents_Manager::is_site_editor_navigation()` and skip pre-rendering the docked sidebar shell there, so only the editing canvas (`?canvas=edit`) reserves space for it. The admin-bar entry points stay registered on the navigation view: the Site Editor toggles the canvas client-side with no reload, so they must stay in the DOM the whole session. The frontend hides them on the navigation view instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fbb3d5b to
c48617b
Compare
Part of AI-1044
Proposed changes
Agents_Manager::is_site_editor_navigation()— true onsite-editor.phpwithout?canvas=edit.Sidebar_Open_Preservationdelegates to the shared check), so no reserved sidebar space flashes before the app boots — only the editing canvas (?canvas=edit) can dock the chat.The admin-bar entry points (the Ask AI button and the Help "?" menu) stay registered on the navigation view: the Site Editor toggles the canvas client-side with no reload, so they must stay in the DOM the whole session. The frontend hides them on the navigation view instead (see the paired wp-calypso PR).
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions