Skip to content

Agents Manager: skip the docked-sidebar pre-render on the Site Editor navigation view#50120

Open
wellyshen wants to merge 1 commit into
trunkfrom
fix/agents-manager-hide-chat-on-site-editor-dashboard
Open

Agents Manager: skip the docked-sidebar pre-render on the Site Editor navigation view#50120
wellyshen wants to merge 1 commit into
trunkfrom
fix/agents-manager-hide-chat-on-site-editor-dashboard

Conversation

@wellyshen

@wellyshen wellyshen commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Part of AI-1044

Proposed changes

  • Add Agents_Manager::is_site_editor_navigation() — true on site-editor.php without ?canvas=edit.
  • Skip pre-rendering the docked sidebar shell on the navigation view (Sidebar_Open_Preservation delegates 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

@wellyshen wellyshen self-assigned this Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 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 or WordPress.com Site Helper), and enable the fix/agents-manager-hide-chat-on-site-editor-dashboard branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/agents-manager-hide-chat-on-site-editor-dashboard
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/agents-manager-hide-chat-on-site-editor-dashboard

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 commented Jul 1, 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!

@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 Jul 1, 2026
@wellyshen wellyshen added [Package] Jetpack mu wpcom WordPress.com Features [mu wpcom Feature] Agents Manager [Tests] Includes Tests I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. 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] In Progress [Tests] Includes Tests labels Jul 1, 2026
@github-actions github-actions Bot added [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. labels Jul 1, 2026
@jp-launch-control

jp-launch-control Bot commented Jul 1, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/agents-manager/src/class-agents-manager.php 265/394 (67.26%) -0.69% 4 💔
projects/packages/agents-manager/src/class-sidebar-open-preservation.php 32/36 (88.89%) 0.65% 0 💚

Full summary · PHP report · JS report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@wellyshen wellyshen force-pushed the fix/agents-manager-hide-chat-on-site-editor-dashboard branch from f45fc23 to 5925544 Compare July 1, 2026 16:05
@wellyshen wellyshen marked this pull request as ready for review July 1, 2026 16:07
Copilot AI review requested due to automatic review settings July 1, 2026 16:07

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

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_Preservation from 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.

Comment thread projects/packages/agents-manager/src/class-agents-manager.php Outdated
@wellyshen wellyshen force-pushed the fix/agents-manager-hide-chat-on-site-editor-dashboard branch 2 times, most recently from 447313b to 3d7a082 Compare July 1, 2026 16:44
@wellyshen wellyshen added [Status] Needs Review This PR is ready for review. 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] In Progress labels Jul 1, 2026
@wellyshen wellyshen force-pushed the fix/agents-manager-hide-chat-on-site-editor-dashboard branch 2 times, most recently from 4fe4bba to 994ed79 Compare July 1, 2026 18:12

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

@wellyshen wellyshen requested a review from Copilot July 1, 2026 18:37
@wellyshen wellyshen force-pushed the fix/agents-manager-hide-chat-on-site-editor-dashboard branch from 994ed79 to befab03 Compare July 1, 2026 18:37

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

Comment thread projects/packages/agents-manager/tests/php/Agents_Manager_Test.php
Comment thread projects/packages/agents-manager/tests/php/Agents_Manager_Test.php
@wellyshen wellyshen force-pushed the fix/agents-manager-hide-chat-on-site-editor-dashboard branch 3 times, most recently from 716fa95 to fbb3d5b Compare July 2, 2026 06:59
@wellyshen wellyshen changed the title Agents Manager: don't render chat entry points on the Site Editor dashboard Agents Manager: don't render chat entry points on the Site Editor navigation view Jul 2, 2026
@wellyshen wellyshen changed the title Agents Manager: don't render chat entry points on the Site Editor navigation view Agents Manager: skip the docked-sidebar pre-render on the Site Editor navigation view Jul 2, 2026
@wellyshen wellyshen removed the request for review from a team July 2, 2026 12:50
@wellyshen wellyshen marked this pull request as draft July 2, 2026 12:50
@wellyshen wellyshen marked this pull request as ready for review July 2, 2026 13:06
… 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>
@wellyshen wellyshen force-pushed the fix/agents-manager-hide-chat-on-site-editor-dashboard branch from fbb3d5b to c48617b Compare July 2, 2026 13:08
@wellyshen wellyshen requested a review from a team July 2, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants