Agents Manager: show the chat on the Site Editor navigation view#112372
Open
wellyshen wants to merge 2 commits into
Open
Agents Manager: show the chat on the Site Editor navigation view#112372wellyshen wants to merge 2 commits into
wellyshen wants to merge 2 commits into
Conversation
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
d2ba89c to
ab8872c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Restores Agents Manager AI chat availability on the WordPress Site Editor navigation (hub/list) view by removing the previously introduced “hide on navigation view” behavior, while keeping unrelated improvements from the earlier change.
Changes:
- Removes the Site Editor navigation-view hiding hook (
useHideChatOnSiteEditorNavigation) and its unit tests. - Removes the navigation-view render/“ready” gate from
AgentDock, allowing the dock + layout manager to run on the navigation view again. - Cleans up now-unused exports/helpers (e.g.,
isSiteEditorCanvasEditMode, and internal-only constants that no longer need to be exported).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/agents-manager/src/utils/site-editor-context.ts | Removes the now-unused isSiteEditorCanvasEditMode helper. |
| packages/agents-manager/src/hooks/use-hide-chat-on-site-editor-navigation.ts | Deletes the hook that hid chat surfaces on the Site Editor navigation view. |
| packages/agents-manager/src/hooks/use-agent-layout-manager/index.tsx | Makes sidebar layout class constants internal-only (no longer exported). |
| packages/agents-manager/src/hooks/use-admin-bar-integration/index.tsx | Makes admin-bar element ID constants internal-only (no longer exported). |
| packages/agents-manager/src/hooks/tests/use-hide-chat-on-site-editor-navigation.test.ts | Removes tests for the deleted navigation-view hiding hook. |
| packages/agents-manager/src/components/agent-dock/index.tsx | Removes the navigation-view gate so chat can render on the Site Editor navigation view again. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
This PR just gets the AI chat back on the site navigation screen. I will do a self-test, review, and then merge it when it's ready! |
ab8872c to
8c838ab
Compare
8c838ab to
cf0facd
Compare
|
Looks like one of the E2E tests has failed. You can fix them following these steps:
|
Revert the navigation-view hiding added in #112164. Remove `useHideChatOnSiteEditorNavigation` (and its test), the dock's render gate and layout-manager `isReady` wiring, and the now-unused `isSiteEditorCanvasEditMode` helper; un-export the admin-bar button IDs and sidebar class-name constants the hook imported. The `#wpadminbar` height fix and the `isChatEnabled` rename from that PR are kept. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cf0facd to
35214bf
Compare
…ation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to AI-1056
Proposed Changes
site-editor.php) again:useHideChatOnSiteEditorNavigationand its tests.isReadywiring intouseAgentLayoutManager.isSiteEditorCanvasEditMode()helper.ADMIN_BAR_BUTTON_ID/ADMIN_BAR_AI_CHAT_BUTTON_IDand the sidebar container class constants — the removed hook was their only external consumer.#wpadminbarheight fix and theshouldRenderChat→isChatEnabledrename.Why are these changes being made?
Agents_Manager::is_site_editor_navigation()and the docked-shell pre-render skip). Ship both together: with only the Jetpack side deployed, the frontend would still hide the chat on the navigation view; with only this PR, the chat renders but the docked shell isn't pre-rendered there (a minor flash, not breakage).Testing Instructions
Sandbox (Simple site with the unified experience enabled):
cd apps/agents-manager && yarn dev --sync— onlywidgets.wp.comneeds sandboxing, not the site itself./wp-admin/site-editor.php(the navigation view, no?canvas=edit).?canvas=edit) and back to the navigation view — the chat keeps working in both directions and the docked state persists.Calypso:
yarn start, log in athttp://calypso.localhost:3000.Unit tests:
yarn jest -c test/packages/jest.config.js --testPathPattern=agents-manager(37 suites, 388 tests).Pre-merge Checklist
🤖 Generated with Claude Code