fix: build partner sidebar entries from the partner catalog - #1142
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
@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 cbc5725. Configure here.
teallarson
marked this pull request as ready for review
August 26, 2026 19:48
The sidebar sync rewrites every category _meta.tsx from scratch out of the toolkit JSON data directory. Nimble and Tavily are partner pages with no toolkit JSON, so each scheduled run proposed deleting their nav entries (the Partners section in search/_meta.tsx) while leaving the pages in place. Derive those entries from PARTNER_TOOLKITS instead, the list the integrations catalog already renders its cards from, and add a test that fails when a partner has no page on disk or no sidebar entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`Toolkit` declares docsLink and relativeDocsLink as required strings, so the `?? partner.docsLink ?? null` fallbacks in the slug derivation could never fire. Removing them also removes the test for a partner with no docs link — a state PartnerToolkit forbids, reachable only through the cast helper the test file used to build fixtures. buildPartnerToolkitInfoList now takes PartnerNavSource, the four fields it actually reads, so tests pass plain objects. That leaves "all" — a legal ToolkitCategory with no integrations route — as the real input the category guard rejects, and the test now uses it. mergeToolkitAndPartnerInfo replaces the bare array spread. A partner and a toolkit resolving to the same slug in one category previously emitted two _meta.tsx entries under one key; tsc and biome both rejected the result, but only after the file was written and with no hint about the second entry. It now throws before anything is written, naming both. Drops the routable-category assertion from the nav guard test (the builder throws on it and its own unit test covers it) and folds the per-partner Partners-separator check into the entry check it always accompanied.
teallarson
force-pushed
the
fix/partner-sidebar-entries
branch
from
August 28, 2026 15:08
cbc5725 to
000b9e1
Compare
EricGustin
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the regression #1133 keeps proposing, discussed in Slack.
What was happening
sync-toolkit-sidebar.tsrewrites every category's_meta.tsxfrom scratch out oftoolkit-docs-generator/data/toolkits/. Nimble and Tavily are partner pages with no toolkit JSON, so every scheduled run proposed deleting thePartnerssection fromsearch/_meta.tsx. The pages themselves were never touched — they just lost their nav entries.skip-toolkits.txt/remove-toolkits.txtcan't fix this: both are keyed on toolkit IDs arriving from the catalog, and partners never appear there.What this does
buildPartnerToolkitInfoListderives the sidebar entries fromPARTNER_TOOLKITS(app/_data/partner-toolkits.ts) — the same listintegration-catalog.tsalready renders catalog cards from. Adding a partner is now one entry in one file, and the nav, the card, and the badge all follow.generateCategoryMetarenders them in aPartnerssection afterOptimized/Starter. Running the sync onmainnow reportsNo changes for: search— the generated file is byte-identical to what's committed.tests/partner-integration-nav.test.tsfails when aPARTNER_TOOLKITSentry has no page on disk, no sidebar entry, an unroutable category, or docs links that disagree with its page path.The dead
elsebranch ingenerateCategoryMetais gone:navGroupis alwaysoptimizedorstarterfor generated toolkits, so it could only ever map an empty array.Verification
npx tsx toolkit-docs-generator/scripts/sync-toolkit-sidebar.tsonmainbefore this change:Updating _meta.tsx for: search. After: no changes in any category.Partnersblock is removed fromsearch/_meta.tsx, with a message naming the file and the command to regenerate it.pnpm test(865 passed),pnpm typecheck,pnpm lintall clean.Note on #1133
The toolkit version bumps in #1133 (Power BI, SharePoint, Snowflake) are correct and worth keeping. Once this lands, a fresh run of the automation will produce them without the
_meta.tsxhunk.🤖 Generated with Claude Code
Note
Low Risk
Docs-only navigation generation with extensive tests; no runtime API, auth, or data-handling changes.
Overview
Fixes a regression where
sync-toolkit-sidebar.tsrewrote category_meta.tsxfiles from toolkit JSON only, so hand-authored partner pages (e.g. Tavily, Nimble) lost their Partners nav on every automated run.The sync script now pulls sidebar entries from
PARTNER_TOOLKITSinapp/_data/partner-toolkits.ts—the same source as the integrations catalog—viabuildPartnerToolkitInfoList, merges them with JSON-backed toolkits (mergeToolkitAndPartnerInfo, with a hard error on slug collisions in the same category), and emits a Partners section after Optimized/Starter ingenerateCategoryMeta. Sync results includepartnerCount.tests/partner-integration-nav.test.tsguards that each catalog partner has an on-disk page, a matching_meta.tsxentry, and consistent docs links. Script README andpartner-toolkitscomments document the workflow; unit tests cover partner nav generation.Reviewed by Cursor Bugbot for commit 000b9e1. Bugbot is set up for automated code reviews on this repo. Configure here.