Skip to content

fix(search): label MCP and CLI doc sections in search results - #2109

Open
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42006
Open

fix(search): label MCP and CLI doc sections in search results#2109
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42006

Conversation

@pavelfeldman

@pavelfeldman pavelfeldman commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Wrap the standard SearchBar (swizzle-wrap, no ejected copy) to pass a transformItems that prefixes search-result group headers from /mcp/ and /agent-cli/ pages with the matching navbar section label ("MCP", "CLI"), since these sections mirror each other's page structure and their results were otherwise indistinguishable.

Before / after for the query from the issue:

Before After
Both "Cookies" hits under one "Network & Storage" header "MCP › Network & Storage" and "CLI › Network & Storage"

Fixes microsoft/playwright#42006

The MCP and Agent CLI docs mirror each other's page structure, and the
Algolia crawler derives the result group header from the active sidebar
category, so search results from the two sections were indistinguishable.
Wrap the SearchBar to prefix result groups from /mcp/ and /agent-cli/
with the corresponding navbar section label.

Fixes: microsoft/playwright#42006
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.

[Docs]: Add Section detail in Search plugin

1 participant