Harden toolkit docs generation and indexing#1060
Conversation
Fail closed on unsafe or incomplete inputs, reuse one Engine snapshot, and expose generated routes to crawlers. Replace the redundant site build with focused generator validation and document the Vercel and Algolia flow. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@cursor review |
|
Current version of PR was reviewed by /review-bugbot with additional instructions on Jul 12, 22:44 GMT-3. It flagged 0 findings. Bugbot on commit |
Keep last-known-good output on failures while returning nonzero status, publish real toolkit routes to llms.txt, and align Markdown, sidebar, slug, and subpage handling across consumers. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cursor review |
Skip llms generation when its own bot commit synchronizes the PR, while retaining full-history diffs and fork safety. Co-authored-by: Cursor <cursoragent@cursor.com>
Ignore metadata-only changes so generated commits preserve the prior source SHA and do not trigger another artifact commit. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cursor review |
Allow manual workflow dispatches to target a dedicated branch and base ref without changing the shared automation PR. Co-authored-by: Cursor <cursoragent@cursor.com>
Request InstantSearch-compatible highlight markers and suppress stale results until they match the current typed query. Co-authored-by: Cursor <cursoragent@cursor.com>
Collapse rapid keystrokes into one request so the result list no longer repeatedly unmounts and rerenders during input. Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise rapid query replacement and immediate clearing with fake timers so the anti-flicker request behavior cannot regress. Co-authored-by: Cursor <cursoragent@cursor.com>
Algolia search regression verificationReproduced on the preview before the fix:
Fixed by requesting Final generated preview measurement:
|
|
@cursor review |
Group generated integrations in llms.txt, reject invalid empty slugs, and preserve UI chunk placement and replacement semantics in Markdown exports. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cursor review |
Handle failed Algolia requests explicitly and preserve null safety when lightweight documentation chunks share sort priority. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cursor review |
Target the dispatch ref only for explicit verification branches while keeping shared automation PRs on the repository default branch. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 63c423c. Configure here.
Reviewer guide
Open the standalone reviewer handoff. It separates new behavior from unchanged behavior, identifies meaningful commits, and explains which generated commits to skip.
Summary
Scope
Test plan
pnpm run toolkit-docs:check(46 files, 581 tests)pnpm test(58 files, 774 tests)pnpm lintpnpm buildNote
Medium Risk
Touches sitemap, llms.txt, slug/route resolution, and generator fail-closed behavior—incorrect slug filtering or snapshot handling could hide integration pages or block doc updates, but changes are covered by extensive tests and preserve prior JSON on merge errors.
Overview
This PR tightens the toolkit docs pipeline and how generated integration pages are discovered, exported, and searched.
Generator & CI: The generate workflow now runs
toolkit-docs:checkinstead of a separate generator build, uses a single cached Engine/v1/tool_metadatasnapshot for skip-unchanged runs, and refuses to wipe all toolkits on an empty API response. Writes are atomic, toolkit IDs are validated for collisions/reserved names, merge failures surface as nonzero exits while keeping last-known-good JSON when possible, and optionalpr_branchsupports isolated verification PRs.Site routing & exports: Toolkit slugs are validated (
getToolkitSlugcan return null); routes, the integrations index, sitemap, and sidebar sync skip or drop invalid entries and sort routes deterministically. Copy-page Markdown now includes toolkit/tool documentation chunks (replace/before/after) via sharedsortDocumentationChunks. llms.txt expands real toolkit URLs (not[toolkitId]templates), groups them by integration category, avoids metadata-only commit loops, and the workflow skips fork PRs with full git history.Search: Algolia UI adds debounced query, loading/error/empty states, and shared config helpers (with tests).
Docs copy: Agentic-development and README text reflect llms.txt in CI rather than automatic markdown negotiation on every URL.
Reviewed by Cursor Bugbot for commit 63c423c. Bugbot is set up for automated code reviews on this repo. Configure here.