Skip to content

docs: correct the AI Copilot and settings tab references - #429

Merged
mmtr merged 1 commit into
trunkfrom
docs/fix-ai-copilot-and-settings-tab-refs
Jul 27, 2026
Merged

docs: correct the AI Copilot and settings tab references#429
mmtr merged 1 commit into
trunkfrom
docs/fix-ai-copilot-and-settings-tab-refs

Conversation

@mmtr

@mmtr mmtr commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Proposed changes

  • Rewrite the AI Copilot section of AGENTS.md against the Abilities API. It still documented includes/ai-copilot/tools-registry.php and desktop_mode_register_ai_tool(), both removed in 0.9.4.
  • Drop desktop_mode_ai_tool_registered from the listed observability actions. The other nine filters and four actions are live and unchanged.
  • Correct the built-in settings tab orders in four places: AGENTS.md, docs/javascript-reference.md, includes/settings-tabs.php, and src/desktop.ts. ai=20 no longer exists and themes=12 was missing.

Why are these changes being made?

AGENTS.md is what agents and contributors read before touching a surface, and docs/ is the public contract for plugin authors. Both pointed at a registration API that was deleted, so anyone following them would register a tool the Copilot never sees. docs/migration-ai-connectors.md already documented the move correctly, the other references never caught up.

The tab list had the same problem in the public registerSettingsTab contract and in two docblocks, so a plugin author picking an order value was working from a list that no longer matches the shell.

Testing instructions

Docs and comments only, no runtime change. To verify the claims:

  1. Confirm the removed API is gone: grep -rn "desktop_mode_register_ai_tool\|tools-registry" includes/ src/ returns nothing.
  2. Confirm the abilities path in includes/ai-copilot/abilities.php: abilities register on wp_abilities_api_init (line 371), the desktop-mode category on wp_abilities_api_categories_init (line 46), and desktop_mode_ai_search_ability_names() selects on meta.annotations.readonly.
  3. Confirm the tab orders against src/settings/panel.ts: appearance=10, themes=12, apps-icons=22, features=25, effects=27, help=40 (admin-only), About pinned with Number.MAX_SAFE_INTEGER.
  4. Run npm run build, npm run typecheck, and npm run lint. All pass, and assets/js/ shows no diff.
Open WordPress Playground Preview

The AI Copilot section of AGENTS.md still described
includes/ai-copilot/tools-registry.php and
desktop_mode_register_ai_tool(), both removed in 0.9.4 when the
Copilot's tools moved to the WordPress Abilities API. Rewrite it
against the current surface and drop the dead
desktop_mode_ai_tool_registered action from the observability list.

The built-in settings tab orders were also stale in four places:
ai=20 no longer exists and themes=12 was never added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mmtr mmtr self-assigned this Jul 27, 2026
@mmtr
mmtr enabled auto-merge (squash) July 27, 2026 18:48
@mmtr
mmtr merged commit d3c44eb into trunk Jul 27, 2026
5 checks passed
@mmtr
mmtr deleted the docs/fix-ai-copilot-and-settings-tab-refs branch July 27, 2026 18:49
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.

1 participant