-
Notifications
You must be signed in to change notification settings - Fork 7
[TOO-314] Tool documentation auto generation tool and replacing hardcode mdx for component based one #705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ode mdx for component based one
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
app/_components/toolkit-docs/components/AvailableToolsTable.tsx
Outdated
Show resolved
Hide resolved
app/_components/toolkit-docs/components/documentation-chunk-renderer.tsx
Show resolved
Hide resolved
app/_components/toolkit-docs/components/AvailableToolsTable.tsx
Outdated
Show resolved
Hide resolved
- Update layout.tsx with locale detection from pathname - Update globals.css with nextra-steps styling - Update robots.txt with AI Agent Resources comment - Keep gmail integration page from main
Resolve all merge conflicts: - Keep our scope-picker.tsx with PostHog tracking - Keep our not-found.tsx with Suspense boundary fix - Keep our package.json with toolkit scripts and mdx deps - Keep next-sitemap.config.js (deleted in main) - Merge globals.css (keyframes + nextra-steps styling) - Merge gitignore (our additions)
app/_components/toolkit-docs/components/documentation-chunk-renderer.tsx
Show resolved
Hide resolved
…y curser (yes, i wil blame him)
| list.push(toolkit); | ||
| } else { | ||
| grouped.set(category, [toolkit]); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreachable else branch in groupByCategory function
Low Severity
The else branch in the groupByCategory function is unreachable dead code. The function first checks if (!grouped.has(category)) and sets an empty array if the category doesn't exist. It then immediately retrieves the list with grouped.get(category). Since the category is guaranteed to exist after the first conditional, list will always be defined, making the else branch impossible to reach.
Additional Locations (1)
There was a problem hiding this comment.
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 and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| }; | ||
|
|
||
| export default meta; | ||
| `; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty array produces invalid JavaScript syntax in meta generation
Low Severity
The generateCategoryMeta and generateMainMeta functions produce syntactically invalid JavaScript when given empty arrays. In generateCategoryMeta, when toolkits is empty, entries becomes an empty string, but the template still includes a trailing comma: ${entries},. This produces { , } which is invalid. Similarly in generateMainMeta, an empty categoryEntries produces a double comma between index and the separator entry. The tests for empty arrays pass only because they check string containment rather than syntax validity.
Additional Locations (1)
| ); | ||
| } | ||
|
|
||
| export { CopyButton }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused export CopyButton from scope-picker module
Low Severity
The CopyButton component is exported but never imported by any other module. Other files use the existing CopyButton from tabbed-code-block/copy-button.tsx instead. This export clutters the module's public API and may confuse developers about which CopyButton to use.
|
|
||
| export function buildScopeDisplayItems(scopes: string[]): string[] { | ||
| return normalizeScopes(scopes); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


Note
Medium Risk
Adds new automation (GitHub Action + sidebar sync script) and a large refactor/new surface area for toolkit-doc rendering (MDX evaluation, selection UI, navigation metadata), which could affect docs builds and site navigation if generation logic or data assumptions are off.
Overview
Toolkit docs are now generated and kept in sync automatically. Adds
generate-toolkit-docs-porter.ymlto regeneratedata/toolkitsafter deploy, run a new.github/scripts/sync-toolkit-sidebar.tsto create/update integrations_meta.tsx, and open an automated PR.Replaces/expands toolkit docs rendering with reusable components. Introduces
app/_components/toolkit-docs/*(MDX chunk renderer with caching, dynamic code examples, available-tools table, tool sections/header, page actions) plus extensive Vitest coverage, and upgradesScopePickerto a paginated, copy-friendly, controlled/uncontrolled selector that also computes required scopes/secrets.Smaller supporting tweaks: dashboard links default to
https://app.arcade.devwith configurable path prefix, toolkit icons inToolInfoswitch to using the design-systempublicIconUrl, and repo/editor ignore settings are updated to reduce watcher load.Written by Cursor Bugbot for commit f621b17. This will update automatically on new commits. Configure here.