feat: add shadcn MCP server configuration#5
Conversation
Enable AI-assisted component management for the frontend by adding the shadcn MCP server config. This allows browsing, searching, and installing shadcn components using natural language prompts.
- Replace catalyst-dialog (HeadlessUI) with shadcn dialog (Radix) - Update create-dialog, set-trigger-dialog, confirm-dialog components - Add data-testid attributes for stable E2E test selectors - Update workflow-list.page.ts E2E page object for new dialog selectors - Remove unused catalyst-dialog.tsx
📝 WalkthroughWalkthroughThis pull request migrates dialog components from HeadlessUI-based catalyst dialogs to shadcn/Radix dialog components across the frontend application. The changes include removing the old catalyst-dialog component, updating three dialog implementations to use the new dialog structure, adding MCP configuration for shadcn tooling, and updating test selectors to match the new dialog markup. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
frontend/src/components/common/confirm-dialog.tsx (1)
67-78: Use strict equality (===) instead of loose equality (==).Per coding guidelines, TypeScript strict mode is enabled for frontend files. Prefer strict equality operators to avoid potential type coercion issues.
♻️ Suggested fix
<Button color={ - state.actionType == 'danger' + state.actionType === 'danger' ? 'rose' - : state.actionType == 'warning' + : state.actionType === 'warning' ? 'yellow' : 'lime' } onClick={() => fn.current && fn.current(true)} >.mcp.json (1)
1-8: Configuration is correctly structured.The MCP server configuration matches shadcn's official documentation and will properly enable the shadcn CLI as an MCP server. Using
shadcn@latestensures you get the latest features and bugfixes, but note that this approach is not reproducible—each invocation pulls the latest published version, which could include breaking changes. For consistent, deterministic behavior (especially in CI/automation), consider pinning to a specific version:"shadcn@2.5.0"(or your desired version). Check the shadcn releases to select an appropriate version.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.mcp.jsonCLAUDE.mde2e/pages/workflow-list.page.tsfrontend/src/components/common/confirm-dialog.tsxfrontend/src/components/ui/catalyst-dialog.tsxfrontend/src/components/workflows/create-dialog.tsxfrontend/src/components/workflows/set-trigger-dialog.tsx
💤 Files with no reviewable changes (1)
- frontend/src/components/ui/catalyst-dialog.tsx
🧰 Additional context used
📓 Path-based instructions (1)
frontend/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
frontend/**/*.{ts,tsx}: Enable strict mode for TypeScript
Use ESLint and Prettier for TypeScript linting and formatting
Files:
frontend/src/components/common/confirm-dialog.tsxfrontend/src/components/workflows/set-trigger-dialog.tsxfrontend/src/components/workflows/create-dialog.tsx
🧬 Code graph analysis (2)
frontend/src/components/common/confirm-dialog.tsx (2)
frontend/src/components/ui/dialog.tsx (5)
DialogContent(115-115)DialogHeader(116-116)DialogTitle(118-118)DialogDescription(119-119)DialogFooter(117-117)frontend/src/components/ui/button.tsx (1)
Button(191-222)
frontend/src/components/workflows/set-trigger-dialog.tsx (2)
frontend/src/components/ui/dialog.tsx (5)
Dialog(110-110)DialogContent(115-115)DialogHeader(116-116)DialogTitle(118-118)DialogDescription(119-119)frontend/src/components/ui/button.tsx (1)
Button(191-222)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Server
- GitHub Check: Playwright E2E Tests
🔇 Additional comments (8)
CLAUDE.md (1)
100-116: Documentation is clear and well-structured.The MCP servers section provides helpful guidance for AI-assisted component management, including practical example prompts and configuration references that align with the
.mcp.jsonconfiguration.frontend/src/components/common/confirm-dialog.tsx (1)
51-61: Dialog migration looks correct.The transition to
onOpenChangeand the newDialogContent/DialogHeaderstructure is properly implemented. Thedata-testidattribute ensures stable E2E test selectors.e2e/pages/workflow-list.page.ts (2)
32-38: Well-structured E2E selectors.Using
data-testidfor the dialog container and scoping child elements within it is a robust pattern for E2E tests. The:not(:has-text("Creating"))pattern for the create button smartly handles the loading state.
72-81: LGTM!The updated wait sequence and comments correctly reflect the Radix dialog behavior.
frontend/src/components/workflows/set-trigger-dialog.tsx (2)
60-71: Dialog structure migration is consistent.The migration to
DialogContent/DialogHeaderfollows the same pattern as the other dialogs in this PR. Thedata-testidattribute enables stable E2E test selectors.
73-92: Content structure is clean.The loading, error, and success states are handled appropriately. The trigger list renders correctly with proper keys.
frontend/src/components/workflows/create-dialog.tsx (2)
54-84: Dialog migration is complete and well-structured.The implementation correctly uses the new
DialogContent/DialogHeader/DialogFootercomposition. Thedata-testid="create-workflow-dialog"matches the E2E test selector inworkflow-list.page.ts. Loading state is properly handled with the disabled button and text change.
30-52: Form handling logic is correct.The validation, submission, and error handling follow a clean pattern. State is properly reset on successful creation.
Enable AI-assisted component management for the frontend by adding
the shadcn MCP server config. This allows browsing, searching, and
installing shadcn components using natural language prompts.
Summary by CodeRabbit
Refactor
New Features
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.