Keep generated sidebar links aligned with toolkit routes#1066
Open
jottakka wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jottakka
marked this pull request as draft
July 16, 2026 18:22
jottakka
force-pushed
the
split/validate-toolkit-doc-routes
branch
from
July 16, 2026 20:18
8fb9dfe to
35ecefc
Compare
Reuse the canonical toolkit slug and category validation when rendering sidebar metadata, including safely escaped labels and keys. Co-authored-by: Cursor <cursoragent@cursor.com>
jottakka
force-pushed
the
split/sync-toolkit-sidebar-routes
branch
from
July 16, 2026 20:18
6a921fc to
7f18a7e
Compare
jottakka
marked this pull request as ready for review
July 18, 2026 21:53
|
Current version of PR was reviewed by /review-bugbot on Jul 16, 15:31 GMT-3. It flagged 0 findings. Bugbot on commit |
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.
Summary
Dependency
Depends on #1065 for the shared route and slug contract.
Test plan
pnpm exec vitest run --root toolkit-docs-generator --config vitest.config.ts tests/scripts/sync-toolkit-sidebar.test.tsNote
Low Risk
Docs-generator-only changes with stricter slug/category validation; depends on the shared slug module from #1065.
Overview
Generated integrations sidebar metadata now uses the shared
getToolkitSlughelper instead of local slug parsing, so navhrefs match app static routes and unsafedocsLinksegments fall back to kebab-case or normalized IDs.Category paths are clamped with
normalizeCategory: only known category keys are used; anything else (e.g. path-like values) is routed underothers._meta.tsxoutput usesJSON.stringifyfor titles, hrefs, and non-identifier keys so quotes, backslashes, and newlines in labels cannot break the generated file.Tests cover unknown categories, bad
docsLinkslugs, legacy toolkit IDs, and label escaping.Reviewed by Cursor Bugbot for commit 6a921fc. Bugbot is set up for automated code reviews on this repo. Configure here.