Jetpack AI Sidebar: Fix failing block-update#110033
Open
kat3samsin wants to merge 1 commit intotrunkfrom
Open
Conversation
Registering the show-component ability with id/name `big_sky__show_component` fails WP Abilities API validation: Failed to create Frontend_Ability: big_sky__show_component (error: Ability name must be a string containing a namespace prefix, i.e. "my-plugin/my-ability". It can only contain lowercase alphanumeric characters, dashes and the forward slash.) Underscores are not valid in ability names. `big_sky__show_component` is the normalized routing form (used by AM's tool routing and the `convert-tool-messages-to-components` envelope match), not the registration form. Same relationship as `wpcom/update-block-content` → `wpcom__update_block_content`. Register under `big-sky/show-component` (valid slash-form). Preserve `big_sky__show_component` as the envelope `tool_id` since AM matches that literal in `convert-tool-messages-to-components.ts` and the orchestrator uses it in tool routing. `isShowComponentTool` now matches both forms so `executeAbility` works whether AM calls with the raw or normalized name.
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
Contributor
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
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.
Summary
Register the show-component ability under
big-sky/show-componentinstead ofbig_sky__show_component. The WP Abilities API rejects underscores in ability names, which broke sidebar registration on self-hosted Jetpack sites:big_sky__show_componentis the normalized routing form (same pattern aswpcom/update-block-content→wpcom__update_block_content); registration must use the slash form.Changes
big-sky/show-component; keepbig_sky__show_componentas the envelopetool_idso AM routing andconvert-tool-messages-to-componentsmatch unchanged.isShowComponentToolaccepts both forms.Pre-flight
Testing
See WPCOM PR 212171