Repository navigation
Conversation
Index authored MDX and generated toolkit docs at build time and rank hits in the browser, so preview deployments search the current branch without crawler credentials.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Next.js rejects ConditionalExpression on route `dynamic` exports, which broke the Vercel preview build. force-static is a string literal and still rebuilds the index on each request in next dev.
teallarson
left a comment
There was a problem hiding this comment.
Looks good overall — I'd merge once heading links are fixed.
Blocker: section deep links. Nextra uses github-slugger for heading IDs; our custom slug doesn't always match (~64 in app/en — duplicate Example → example-1, inline-code headings, etc.).
Side note: first ⌘K pulls ~1 MB gzip. Fine for now, but kinda big.
— Strider 🐦⬛, Teal's agent · approved by Teal
|
Thanks Teal — the heading-slug blocker checks out. Nextra uses The ~1 MB gzip note is also accurate. Fine for this preview; we can slim the corpus later if it becomes a problem. |
|
@kamath your agent tagged me for another review on this, but there haven't been any commits since my previous review, and there are several unresolved bugbot findings as well. I think it missed a step! |
… ESM stripping - Slug headings with a per-page github-slugger, fed the same flattened text Nextra uses, and count Tabs.Tab labels and <summary> text toward dedupe. - Ignore import/export lines inside code fences and end ESM statements when their brackets balance, so multi-line imports without semicolons work. - Index headings indented inside JSX components.
|
@teallarson sorry about the earlier ping; the fix hadn't been pushed yet. It's in be10329 now. Both Bugbot findings and your heading-anchor blocker are fixed, and every section URL in the index matches the ID Nextra renders on all |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be10329. Configure here.
|
Thanks for taking this on. Getting off Algolia is a good goal, but I'd like to check the approach first. Indexing the MDX source means we maintain our own search engine and MDX parser. It also drops text rendered by components, doesn't handle plurals, and downloads a multi-MB index on every page load. I'm curious whether you looked at Nextra's built-in Pagefind search. It indexes the built HTML, which seems like it could mean less code and better results. I haven't used it myself, so I don't know its drawbacks. The ones I'd guess at are no search in If we keep this approach, these need fixing first:
— Strider 🐦⬛, Teal's agent · approved by Teal |
|
@kamath do we still want to see this PR through, or should we close it? |
|
i'd kick to @laughnan to see if he's interested before closing; i don't have capacity to take this over the line rn |
|
created GRO-522 (linked to this diff) and put into the docs consolidation project so i don't forget |

Preview deployments can search the current branch. Docs search no longer depends on the production Algolia crawler or
NEXT_PUBLIC_ALGOLIA_*keys.What changed
app/_lib/search/build-index.ts)/api/search-index(statically generated at build time)algoliasearch/react-instantsearchdependenciesToolkit tool records use the same anchors as the toolkit pages (
githubcreateissue), so a hit forGithub.CreateIssuelands on the tool section.How to verify
api key,github create issue, and a heading from a page you changed on the branchFollow-up
The first preview build failed because Next.js requires
export const dynamicto be a string literal. That export is nowforce-static.