Skip to content

Fix MCP usage routing and ConfirmationDialog URLs - #8530

Merged
primer[bot] merged 3 commits into
mainfrom
joshfarrant/fix-mcp-usage-guideline-routes
Oct 14, 2026
Merged

primer[bot] merged 3 commits into
mainfrom
joshfarrant/fix-mcp-usage-guideline-routes

Conversation

@joshfarrant

@joshfarrant joshfarrant commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #8531

Usage-guideline requests use raw component IDs rather than documentation slugs. For example, the ActionBar request redirects to the Primer homepage, which is returned as if it were component guidance.

Use the existing slug for usage requests and correct the missing ConfirmationDialog alias in the existing mapper. The alias correction also fixes ConfirmationDialog requests through get_component and get_component_batch.

Changelog

New

Individually named usage-routing cases for all 76 distinct advertised components, a catalogue coverage guard, and four single/batch ConfirmationDialog cases including lowercase input. Expected paths are literals; only external HTTP is mocked.

Changed

get_component_usage_guidelines uses the existing documentation slug. The mapper resolves confirmationdialog to confirmation-dialog.

Removed

None.

Rollout strategy

Patch release of @primer/mcp; no interface change or consumer migration.

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

Testing & Reviewing

  • Before: the tests produce 42 usage-route failures and 34 passing controls against the exact original source. All four new single/batch ConfirmationDialog cases also fail.
  • After: all 76 usage cases and all 94 MCP tests pass.
  • MCP build, type-check, changed-file lint/format and whitespace checks pass.
  • The built stdio server returns live ActionBar, ActionList, Button and ConfirmationDialog guidance. Single/batch ConfirmationDialog calls, including lowercase input and a mixed Button batch, return the correct documentation.

All fixture URLs were reviewed against the deployed sitemap and actual document identity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b764bc7b-e03b-4b61-a481-9e4933599d54
@changeset-bot

changeset-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b39fb00

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

🟢 Approval recommended

The routing correction is focused, comprehensively tested, and accompanied by an appropriate changeset.

0 open findings

What changed in this PR

Fixes MCP usage-guideline routing by using component documentation slugs.

Changes:

  • Routes guideline requests through canonical component slugs.
  • Adds coverage for all advertised components and routing regressions.
  • Adds a patch changeset.
File Description
packages/​mcp/​src/​server.ts Uses documentation slugs for guideline URLs.
packages/​mcp/​src/​server.test.ts Tests canonical routing and catalogue coverage.
.changeset/​twenty-crabs-lose.md Records the MCP routing fix.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b764bc7b-e03b-4b61-a481-9e4933599d54
@joshfarrant joshfarrant changed the title Fix MCP component usage guideline routing Fix MCP usage routing and ConfirmationDialog URLs Oct 13, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8530 October 13, 2026 13:04 Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b764bc7b-e03b-4b61-a481-9e4933599d54

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.

🟢 Approval recommended

The focused routing fixes are consistent with existing slug handling and comprehensively tested.

0 open findings

🧠 Review effort: Balanced

@joshfarrant
joshfarrant enabled auto-merge October 14, 2026 08:15
@joshfarrant joshfarrant added the integration-tests: skipped manually Changes in this PR do not require an integration test label Oct 14, 2026
@primer
primer Bot disabled auto-merge October 14, 2026 15:59
@primer
primer Bot added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 7b4281b Oct 14, 2026
65 checks passed
@primer
primer Bot deleted the joshfarrant/fix-mcp-usage-guideline-routes branch October 14, 2026 16:06

This branch was successfully deployed

1 active and 1 inactive deployments
storybook-preview-8530 — b39fb004 Deployed Oct 13, 2026 by github-actions[bot]
github-pages — b39fb004 Deployed Oct 13, 2026 by joshfarrant via deploy-preview #33630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP constructs incorrect component documentation URLs

4 participants