Skip to content

Normalize integration card categories to match routes#1088

Closed
jottakka wants to merge 5 commits into
mainfrom
fix/normalize-integration-link-category
Closed

Normalize integration card categories to match routes#1088
jottakka wants to merge 5 commits into
mainfrom
fix/normalize-integration-link-category

Conversation

@jottakka

Copy link
Copy Markdown
Contributor

Summary

  • Extract a client-safe toolkit-category helper (INTEGRATION_CATEGORIES + normalizeCategory) so browser cards never import server-only route code
  • Use that helper in toIntegrationLink, sidebar sync, and keep route generation on the same allow-list
  • Backfill catalog category from toolkit JSON (same source of truth as routes), not only docsLink

Independent of #1065: closes the remaining card/route category contract gap Bugbot found there.

Test plan

  • pnpm exec vitest --run --exclude '.worktrees/**' tests/integration-index-links.test.ts toolkit-docs-generator/tests/app-lib/toolkit-category.test.ts toolkit-docs-generator/tests/app-lib/toolkit-static-params.test.ts toolkit-docs-generator/tests/scripts/sync-toolkit-sidebar.test.ts
  • Confirm an unknown/empty category card URL lands on /others/... and matches listValidIntegrationLinks when a page exists there

Made with Cursor

Extract a client-safe toolkit-category helper so integration index links
and catalog enrichment use the same category allow-list as static routes,
instead of raw catalog categories that can miss pages or 404.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 20, 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, Comment Jul 21, 2026 3:59pm

Request Review

Keep catalog enrichment aligned with route generation: toolkit JSON wins
for docsLink, and category values are normalized before cards/filters use them.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jottakka
jottakka requested review from kamath and teallarson July 20, 2026 19:49
@jottakka

Copy link
Copy Markdown
Contributor Author

Independent follow-up to #1065: share a client-safe normalizeCategory so integration cards, catalog enrichment, sidebar, and routes agree on category segments (and JSON wins for docsLink/category).

Comment thread app/_lib/integration-catalog.ts Outdated
@jottakka

Copy link
Copy Markdown
Contributor Author

Folded into #1065 per Teal’s review (category normalize on cards + client-safe helper). Safe to close this PR as superseded once #1065 is updated — the commits were cherry-picked there.

Treat explicit empty-string category/docsLink as present (matching ??), and widen ToolkitWithDocsLink so normalized "others" typechecks through the build.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jottakka

Copy link
Copy Markdown
Contributor Author

Superseded by #1065 (category normalize + client-safe helper were folded in there).

@jottakka jottakka closed this Jul 21, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>

@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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 99ec991. Configure here.

Comment thread app/_lib/integration-index.ts
others redirects to the index and has no [toolkitId] route, so keep it as a normalize fallback only and exclude it from valid/clickable card links.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant