Skip to content

fix: build partner sidebar entries from the partner catalog - #1142

Merged
teallarson merged 2 commits into
mainfrom
fix/partner-sidebar-entries
Aug 28, 2026
Merged

fix: build partner sidebar entries from the partner catalog#1142
teallarson merged 2 commits into
mainfrom
fix/partner-sidebar-entries

Conversation

@teallarson

@teallarson teallarson commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes the regression #1133 keeps proposing, discussed in Slack.

What was happening

sync-toolkit-sidebar.ts rewrites every category's _meta.tsx from scratch out of toolkit-docs-generator/data/toolkits/. Nimble and Tavily are partner pages with no toolkit JSON, so every scheduled run proposed deleting the Partners section from search/_meta.tsx. The pages themselves were never touched — they just lost their nav entries.

skip-toolkits.txt / remove-toolkits.txt can't fix this: both are keyed on toolkit IDs arriving from the catalog, and partners never appear there.

What this does

  • buildPartnerToolkitInfoList derives the sidebar entries from PARTNER_TOOLKITS (app/_data/partner-toolkits.ts) — the same list integration-catalog.ts already renders catalog cards from. Adding a partner is now one entry in one file, and the nav, the card, and the badge all follow.
  • generateCategoryMeta renders them in a Partners section after Optimized / Starter. Running the sync on main now reports No changes for: search — the generated file is byte-identical to what's committed.
  • tests/partner-integration-nav.test.ts fails when a PARTNER_TOOLKITS entry has no page on disk, no sidebar entry, an unroutable category, or docs links that disagree with its page path.

The dead else branch in generateCategoryMeta is gone: navGroup is always optimized or starter for generated toolkits, so it could only ever map an empty array.

Verification

  • npx tsx toolkit-docs-generator/scripts/sync-toolkit-sidebar.ts on main before this change: Updating _meta.tsx for: search. After: no changes in any category.
  • Guard test fails as intended when the Partners block is removed from search/_meta.tsx, with a message naming the file and the command to regenerate it.
  • pnpm test (865 passed), pnpm typecheck, pnpm lint all 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.tsx hunk.

🤖 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.ts rewrote category _meta.tsx files 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_TOOLKITS in app/_data/partner-toolkits.ts—the same source as the integrations catalog—via buildPartnerToolkitInfoList, 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 in generateCategoryMeta. Sync results include partnerCount.

tests/partner-integration-nav.test.ts guards that each catalog partner has an on-disk page, a matching _meta.tsx entry, and consistent docs links. Script README and partner-toolkits comments 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.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 28, 2026 3:11pm

Request Review

@teallarson

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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
teallarson marked this pull request as ready for review August 26, 2026 19:48
teallarson and others added 2 commits August 28, 2026 10:55
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
teallarson merged commit 9572f82 into main Aug 28, 2026
7 checks passed
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.

2 participants