Skip to content

Conversation

@emdashcodes
Copy link
Contributor

@emdashcodes emdashcodes commented Dec 3, 2025

This PR includes two changes for the Help Center + Big Sky & CIAB integration:

1. Fix: Add optional chaining for next-admin store access

When helpCenterData.isNextAdmin is true but the next-admin store hasn't been registered yet (i.e. still loading), calling select('next-admin').getMetaMenuItems() throws a TypeError because select('next-admin') returns undefined. This was causing crashes for me. The check reruns when the store changes so it still works and loads the help center after CIAB loads in.

2. Support navigation continuation hook

Adds support for a useNavigationContinuation hook that can be provided by external plugins (Big Sky). This enables conversation continuation after page navigation when using the wp-admin/navigate ability specifically.

This pattern was already in use for wp-admin navigation. It is needed because the page does a full page reload, and we need to follow-up with the model after the app has re-rendered.

Testing Steps

Loading

  1. Load CIAB without the unified-agent feature flag (i.e. /wp-admin/admin.php?page=next-admin&p=%2F)
  2. Verify the Help Center loads without console errors
  3. Verify the agent chat panel appears and functions correctly
  4. (Optional) Load with flags=unified-agent and see the unified agent correctly loads instead

Navigation

  1. Load CIAB without the unified-agent feature flag (i.e. /wp-admin/admin.php?page=next-admin&p=%2F)
  2. Verify the Help Center loads without console errors
  3. Verify the agent chat panel appears and functions correctly
  4. Load with ?flags=unified-agent to test the unified agent
  5. Ask the agent to navigate to a wp-admin page (e.g., "take me to the posts page")
  6. Verify the page navigates and the conversation resumes with the agent acknowledging the navigation

@emdashcodes emdashcodes requested a review from jom December 3, 2025 17:51
@emdashcodes emdashcodes self-assigned this Dec 3, 2025
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 3, 2025
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/help-center-next-admin-optional-chaining on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Dec 3, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Async-loaded Components (~213 bytes added 📈 [gzipped])

name                               parsed_size           gzip_size
async-load-help-center-app              +710 B  (+0.0%)     +213 B  (+0.0%)
async-load-automattic-help-center       +710 B  (+0.0%)     +213 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@emdashcodes emdashcodes requested a review from a team as a code owner December 3, 2025 19:23
@emdashcodes emdashcodes changed the title Fix: add optional chaining for next-admin store access Help Center + Big Sky Integration Updates Dec 3, 2025
@emdashcodes emdashcodes merged commit 019f7e0 into trunk Dec 4, 2025
12 checks passed
@emdashcodes emdashcodes deleted the fix/help-center-next-admin-optional-chaining branch December 4, 2025 16:14
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants