Skip to content

fix: docs search hidden pages#3734

Open
dhimanAbhi wants to merge 1 commit intohatchet-dev:mainfrom
dhimanAbhi:fix/docs-search-hidden-pages
Open

fix: docs search hidden pages#3734
dhimanAbhi wants to merge 1 commit intohatchet-dev:mainfrom
dhimanAbhi:fix/docs-search-hidden-pages

Conversation

@dhimanAbhi
Copy link
Copy Markdown

Description

Hidden documentation pages marked with display: "hidden" in _meta.js were appearing in search results.

This PR fixes the issue by ensuring that hidden pages are excluded from the search UI while still being included in the search index for MCP compatibility.

Fixes #3146

Type of change

  • Bug fix (non-breaking change which fixes an issue)

What's Changed

  • Added hidden flag to search index entries during generation
  • Propagated hidden state from _meta.js across nested pages
  • Ensured folder-level hidden configuration applies to all child pages
  • Filtered out hidden pages in the search UI
  • Preserved hidden pages in the index to avoid breaking MCP tooling

Signed-off-by: Abhishek Dhiman <abhi2002dhiman@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

@dhimanAbhi is attempting to deploy a commit to the Hatchet Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Collaborator

@gregfurman gregfurman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Can we tidy up the diff a bit so these changes are minimal?

Comment on lines +324 to +329
console.log("SEARCH DEBUG:", {
query,
raw: raw.map(r => ({ id: r.id, hidden: r.hidden })),
reranked: reranked.map(r => ({ id: r.id, hidden: r.hidden })),
visible: visibleResults.map(r => ({ id: r.id, hidden: r.hidden })),
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 This seems like it could get spammy very quickly

Suggested change
console.log("SEARCH DEBUG:", {
query,
raw: raw.map(r => ({ id: r.id, hidden: r.hidden })),
reranked: reranked.map(r => ({ id: r.id, hidden: r.hidden })),
visible: visibleResults.map(r => ({ id: r.id, hidden: r.hidden })),
});

try {
const expanded = expandSynonyms(query);
const raw = idx.search(expanded, SEARCH_OPTIONS);
// Rerank against the original query so title matching is accurate
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we preserve these comments?

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.

[BUG] Hidden doc pages are still visible in the search

2 participants