Skip to content

Agents Manager: add standalone AI chat button to the admin bar#49455

Merged
wellyshen merged 1 commit into
trunkfrom
add/agents-manager-ai-chat-button
Jun 11, 2026
Merged

Agents Manager: add standalone AI chat button to the admin bar#49455
wellyshen merged 1 commit into
trunkfrom
add/agents-manager-ai-chat-button

Conversation

@wellyshen

@wellyshen wellyshen commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Part of AI-995

Proposed changes

  • Add a standalone "Ask AI" button to the wp-admin bar (agents-manager-ai-chat node under top-secondary), separate from the Help Center menu.
  • Registered only in the unified experience (agents_manager_use_unified_experience), for connected, non-Gutenberg, non-CIAB variants.
  • Add PHPUnit coverage for the gating (the button is registered only when the unified experience is enabled, and not otherwise).

Related product discussion/links

  • AI-995

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

No.

Testing instructions

@wellyshen wellyshen self-assigned this Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 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 add/agents-manager-ai-chat-button branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/agents-manager-ai-chat-button
bin/jetpack-downloader test jetpack-mu-wpcom-plugin add/agents-manager-ai-chat-button

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

@wellyshen wellyshen marked this pull request as ready for review June 8, 2026 12:16
Copilot AI review requested due to automatic review settings June 8, 2026 12:16
@github-actions

github-actions Bot commented Jun 8, 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 Jun 8, 2026
@wellyshen wellyshen added [Status] Needs Review This PR is ready for review. [mu wpcom Feature] Agents Manager 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 [Package] Agents Manager labels Jun 8, 2026

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 standalone “Ask AI” admin-bar entry for Agents Manager so users in the unified experience can open a new chat directly, separate from the Help Center dropdown.

Changes:

  • Register a new agents-manager-ai-chat node under top-secondary when agents_manager_use_unified_experience is enabled (and only for connected, non-Gutenberg, non-CIAB contexts).
  • Add a new changelog entry documenting the new admin-bar button.

Reviewed changes

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

File Description
projects/packages/agents-manager/src/class-agents-manager.php Adds an admin_bar_menu registration for a new “Ask AI” admin-bar item (standalone new-chat entry).
projects/packages/agents-manager/changelog/add-agents-manager-ai-chat-button Changelog entry for the new standalone AI chat admin-bar button.

Comment thread projects/packages/agents-manager/src/class-agents-manager.php
@wellyshen wellyshen added [Package] Jetpack mu wpcom WordPress.com Features [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. Enhancement Changes to an existing feature — removing, adding, or changing parts of it I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. and removed [Package] Agents Manager labels Jun 8, 2026
@wellyshen wellyshen force-pushed the add/agents-manager-ai-chat-button branch from 3a04ab8 to 04762a7 Compare June 8, 2026 12:27
@jp-launch-control

jp-launch-control Bot commented Jun 8, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/agents-manager/src/class-agents-manager.php 240/366 (65.57%) -1.00% 7 💔

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 requested a review from a team June 8, 2026 12:29
@wellyshen wellyshen removed the Enhancement Changes to an existing feature — removing, adding, or changing parts of it label Jun 8, 2026
@wellyshen wellyshen force-pushed the add/agents-manager-ai-chat-button branch from 04762a7 to b4bae55 Compare June 8, 2026 12:42
@wellyshen wellyshen removed the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Jun 8, 2026
@wellyshen wellyshen force-pushed the add/agents-manager-ai-chat-button branch from b4bae55 to edeff72 Compare June 8, 2026 12:47
@wellyshen wellyshen added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Jun 8, 2026
@wellyshen wellyshen force-pushed the add/agents-manager-ai-chat-button branch 3 times, most recently from 57c5e09 to 72d1a18 Compare June 11, 2026 11:08

@johngodley johngodley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested as part of Automattic/wp-calypso#111434 and everything works as described. Code looks good

Adds an "Ask AI" button (`agents-manager-ai-chat`) to the wp-admin bar,
separate from the Help Center menu. Registered only in the unified experience,
for connected, non-Gutenberg, non-CIAB variants. Its click behavior (reopening
the chat) is defined Calypso-side.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wellyshen wellyshen force-pushed the add/agents-manager-ai-chat-button branch from 72d1a18 to 5dd54dc Compare June 11, 2026 16:33
@wellyshen wellyshen removed the [Status] Needs Review This PR is ready for review. label Jun 11, 2026
@wellyshen wellyshen merged commit f2be9f9 into trunk Jun 11, 2026
120 of 121 checks passed
@wellyshen wellyshen deleted the add/agents-manager-ai-chat-button branch June 11, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [mu wpcom Feature] Agents Manager [Package] Agents Manager [Package] Jetpack mu wpcom WordPress.com Features [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants