docs: strip heading-id markers from the MCP search text - #1785
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe docs manifest text pipeline now removes trailing ChangesDocs manifest text extraction
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The manifest cleanup has no identified user-visible regression and is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit reads each line, Comment |
Deploying quickadd with
|
| Latest commit: |
deeb6e2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2bb60cde.quickadd.pages.dev |
| Branch Preview URL: | https://docs-mcp-index-strip-heading.quickadd.pages.dev |
Summary
/docs-index.jsonfeeds the/mcpserver'ssearch_quickadd_docstool. Itsheadingsfield already drops the{#custom-id}suffixes, but thetextfield kept all 313 of them. They leaked into search snippets on the live site (e.g.### Linux {#linux}for the query "linux cron"), and the id text also counted toward term matches.Changes
src/pages/docs-index.json.ts: strip a trailing{#id}from each line oftext, the same wayheadingsalready does. Every{#in the docs is a heading suffix (checked with grep), so nothing else is affected.Testing / validation
docs-index.jsoncompared with master: slugs, titles, descriptions, headings and URLs are unchanged. Eachtextfield differs only by the removed markers (313 → 0).functions/mcp.tsonRequesthandler under Node, withASSETSserved from each build. For "linux cron", "quick reference" and "capture daily note", markers in results go from 2/0/0 to 0/0/0, and the top results are the same.Checklist
docs:does not trigger a release.Note
Strip heading-id markers from MCP search text in
docs-index.json.tsUpdates the page-text normalization in the docs index API handler to remove explicit heading anchor markers and adjacent line-end whitespace after fenced-code removal. Heading extraction logic is unchanged.
Macroscope summarized deeb6e2.
Summary by CodeRabbit
{#...}.