-
Notifications
You must be signed in to change notification settings - Fork 7
Fix copilot-studio meta key to use underscore #685
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
Conversation
Change "copilot-studio" to "copilot_studio" to match the expected directory naming convention. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Changed copilot_studio to copilot-studio to match the key used in mcp-client-grid.tsx. This fixes the card rendering issue where the Copilot Studio card was not displaying in the MCP clients grid.
|
Bugbot Autofix resolved the bug found in the latest run.
|
- Add scripts/check-meta-keys.ts to validate that _meta.tsx keys match sibling directories or page files - Add pnpm check-meta script command - Add pre-commit hook to validate staged _meta.tsx files - Skips special keys (*, index, ---), external links (href), and separators - Remove orphaned copilot_studio key (directory doesn't exist) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move page from guides/tool-calling/mcp-clients/ to get-started/mcp-clients/ - Add copilot-studio entry to _meta.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 ON. A Cloud Agent has been kicked off to fix the reported issues.
| return errors; | ||
| } | ||
|
|
||
| const content = readFileSync(filePath, "utf-8"); |
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.
Pre-commit validates working directory, not staged content
Medium Severity
When --staged-only mode is used by the pre-commit hook, validateMetaFile reads file content using readFileSync(filePath) which reads from the working directory rather than the git staging area. If a user edits a _meta.tsx file after staging (or uses partial staging), the hook validates the working directory version instead of what's actually being committed. This could allow invalid meta keys to be committed if the working directory version is valid but the staged version is not.
| state.collectingKey = false; | ||
| } | ||
| state.index += 1; | ||
| return true; |
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.
Parser drops quote characters inside quoted strings
Low Severity
The handleStringBoundary function incorrectly handles quote characters that appear inside a string of the opposite quote type. When parsing a double-quoted key containing an apostrophe (e.g., "what's-new"), encountering the ' causes the function to return true without adding the character to currentKey, since neither the "entering string" nor "exiting string" branch matches. This drops the character, causing the key to be parsed as whats-new instead of what's-new, leading to false validation failures.
|
|
||
| handleKeyParsing(content, char, state); | ||
| state.index += 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.
Parser extracts keys from JavaScript comments
Low Severity
The parseNextChar function handles strings, template literals, and braces, but has no logic to skip JavaScript comments (// or /* */). If a _meta.tsx file contains a commented-out key like // "old-key": "Title", the parser will still extract "old-key" and attempt to validate it against the filesystem. This causes false positive validation failures for files with commented code, producing confusing error messages about keys that aren't actually in use.
|
Bugbot Autofix resolved all 3 bugs found in the check-meta-keys script.
|
Summary
"copilot-studio"→copilot_studioin_meta.tsxto match the expected directory naming conventionTest plan
🤖 Generated with Claude Code
Note
Introduces automated validation to prevent broken sidebar/navigation entries from
_meta.tsxfiles.scripts/check-meta-keys.ts: parsesmetaobjects, ignores special keys/external links, suggests similar names, and exits non-zero on invalid keys.husky/pre-commit(runspnpm check-meta --staged-onlywhen_meta.tsxchanges and blocks commits on failures)check-metanpm script inpackage.jsonpublic/llms.txt(updated SHA and Copilot Studio doc link)Written by Cursor Bugbot for commit ba0d97e. This will update automatically on new commits. Configure here.