Skip to content

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

Merged
dgozman merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42006
Jul 28, 2026
Merged

fix(search): label MCP and CLI doc sections in search results#2109
dgozman merged 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
@dgozman
dgozman merged commit 3cf6169 into microsoft:main Jul 28, 2026
2 checks passed
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

2 participants