Skip to content

Conversation

@ameybh
Copy link
Contributor

@ameybh ameybh commented Aug 20, 2025

Add Command component

Added a Command component that includes all the features from Shadcn's Command component and the underlying cmdk library. This component will serve as the foundation for the upcoming Combobox component

Summary by CodeRabbit

  • New Features

    • Added a composable Command palette component with dialog mode, searchable input, grouped items, separators, checks, and keyboard shortcuts; exported as a single public component.
  • Documentation

    • New Command docs page with installation and usage guidance and two interactive previews (default and dialog styles).
  • Chores

    • Added cmdk dependency, registered Command in the component catalog and navigation, and updated registry metadata and example previews.

@vercel
Copy link

vercel bot commented Aug 20, 2025

@ameybh is attempting to deploy a commit to the Retro UI Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

Warning

Rate limit exceeded

@ariflogs has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 4980a81 and 5e39e5a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • components/retroui/index.ts (1 hunks)
  • config/components.ts (3 hunks)
  • config/navigation.ts (1 hunks)
  • package.json (1 hunks)
  • registry.json (1 hunks)

Walkthrough

Adds a new, fully-typed Command palette component (built on cmdk) with dialog, input, list, group, item, separator, shortcut, and check subcomponents; updates retroui exports, registry, navigation, docs, two preview examples, and adds the cmdk dependency.

Changes

Cohort / File(s) Summary
Command component
components/retroui/Command.tsx
New composite Command export built on cmdk primitives. Provides typed static subcomponents: Check, Dialog, Empty, Group, Input, Item, List, Separator, Shortcut; uses cn utility and design tokens; exported as Command.
Retroui exports
components/retroui/index.ts
Re-exports Command (export * from "./Command") and reorders existing exports.
Component registry & config
config/components.ts, registry.json
Registers core component command, adds two example previews (command-style-default, command-style-dialog), inlines/reformats dependency arrays across registry entries, and adds components/retroui/Command.tsx to the registry.
Navigation update
config/navigation.ts
Adds Components nav entry for Command; minor formatting trailing-comma change.
Documentation
content/docs/components/command.mdx
New docs page for the Command component with showcases, install instructions, and source reference.
Preview examples
preview/components/command-style-default.tsx, preview/components/command-style-dialog.tsx
New preview components: default static style and dialog-style (dialog toggled by Cmd/Ctrl+J, manages open state); both render Command subcomponents with icons.
Package dependency
package.json
Adds dependency: cmdk ^1.1.1.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Preview as CommandStyleDialog
  participant Dialog as Command.Dialog
  participant Input as Command.Input
  participant List as Command.List (cmdk)

  Note over Preview,Dialog: keyboard-triggered open/close flow
  User->>Preview: Press Cmd/Ctrl+J
  Preview->>Preview: set open = true
  Preview->>Dialog: render Dialog (open, onOpenChange)
  User->>Input: Type query
  Input->>List: update/filter items
  List-->>User: render groups, items, shortcuts
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitch my nose and press J bright,
A palette blooms in soft moonlight.
Shortcuts, groups, and icons in a stack,
I hop through commands and never look back.
Hooray — a rabbit’s light-footed hack! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (14)
config/navigation.ts (1)

54-54: Consider highlighting the new component in the nav

Add a “New” tag to surface discoverability for Command.

-        { title: "Command", href: `${componentsRoute}/command` },
+        { title: "Command", href: `${componentsRoute}/command`, tag: "New" },
components/retroui/index.ts (2)

1-11: Remove duplicate Input export in the barrel

There are two export * from "./Input"; lines (Line 2 and Line 9). Keep one to avoid confusion and potential type merging surprises in editors.

 export * from "./Button";
 export * from "./Input";
 export * from "./Textarea";
 export * from "./Checkbox";
 export * from "./Radio";
 export * from "./Select";
 export * from "./Switch";
 export * from "./Label";
-export * from "./Input";
 export * from "./Text";

27-27: Optional: restrict Command re-export to the intended surface

If components/retroui/Command.tsx also exports internal types/helpers, prefer named re-export to limit the public surface.

-export * from "./Command";
+export { Command } from "./Command";
content/docs/components/command.mdx (2)

4-4: Fix future-dated lastUpdated

Page shows 21 Aug, 2025, while this PR is dated Aug 20, 2025. Avoid future “updated” badges.

-lastUpdated: 21 Aug, 2025
+lastUpdated: 20 Aug, 2025

24-24: Improve accessibility wording (avoid emoji-only instruction)

Replace the pointing emoji with accessible wording.

-#### 2. Copy the code 👇 into your project:
+#### 2. Copy the code below into your project:
preview/components/command-style-dialog.tsx (2)

31-38: Show platform-appropriate shortcut in the hint (⌘J vs Ctrl+J)

Small UX win: reflect the actual modifier based on OS.

   return (
     <>
       <p className="text-muted-foreground text-sm">
-        Press{" "}
-        <kbd className="bg-muted text-muted-foreground pointer-events-none inline-flex h-5 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none">
-          <span className="text-xs">⌘</span>J
-        </kbd>
+        Press{" "}
+        <kbd className="bg-muted text-muted-foreground pointer-events-none inline-flex h-5 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none">
+          {typeof navigator !== "undefined" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform) ? (
+            <><span className="text-xs">⌘</span>J</>
+          ) : (
+            <>Ctrl J</>
+          )}
+        </kbd>
       </p>

43-75: Optional: add values (and simple onSelect) to items for better filtering UX

Providing a value improves search matching and demonstrates selection behavior.

-          <Command.Group heading="Suggestions">
-            <Command.Item>
+          <Command.Group heading="Suggestions">
+            <Command.Item value="calendar" onSelect={() => setOpen(false)}>
               <Calendar />
               <span>Calendar</span>
             </Command.Item>
-            <Command.Item>
+            <Command.Item value="emoji" onSelect={() => setOpen(false)}>
               <Smile />
               <span>Search Emoji</span>
             </Command.Item>
-            <Command.Item>
+            <Command.Item value="calculator" onSelect={() => setOpen(false)}>
               <Calculator />
               <span>Calculator</span>
             </Command.Item>
           </Command.Group>
           <Command.Separator />
           <Command.Group heading="Settings">
-            <Command.Item>
+            <Command.Item value="profile" onSelect={() => setOpen(false)}>
               <User />
               <span>Profile</span>
               <Command.Shortcut>⌘P</Command.Shortcut>
             </Command.Item>
-            <Command.Item>
+            <Command.Item value="billing" onSelect={() => setOpen(false)}>
               <CreditCard />
               <span>Billing</span>
               <Command.Shortcut>⌘B</Command.Shortcut>
             </Command.Item>
-            <Command.Item>
+            <Command.Item value="settings" onSelect={() => setOpen(false)}>
               <Settings />
               <span>Settings</span>
               <Command.Shortcut>⌘S</Command.Shortcut>
             </Command.Item>
preview/components/command-style-default.tsx (1)

18-18: Add an explicit accessible name to the input.

Placeholders aren’t read as labels by all AT. Add an aria-label (or wire up aria-labelledby) for better accessibility.

-        <Command.Input placeholder="Type a command or search..." />
+        <Command.Input
+          placeholder="Type a command or search..."
+          aria-label="Command menu"
+        />
config/components.ts (1)

136-139: Declare Command’s external dependencies for consistency.

Other core entries (e.g., accordion, slider) list external deps. Command depends on cmdk, Radix Dialog (via the wrapper), and lucide-react. Add them to keep the catalog metadata accurate.

     command: {
       name: "command",
+      dependencies: ["cmdk", "@radix-ui/react-dialog", "lucide-react"],
       filePath: "components/retroui/Command.tsx",
     },
components/retroui/Command.tsx (5)

10-23: Forward refs on the root Command to preserve composability.

Without forwarding refs, consumers can’t imperatively focus/measure the Command (common in dialogs). Recommend wrapping with forwardRef and setting displayName.

-function Command({
-  className,
-  ...props
-}: React.ComponentProps<typeof CommandPrimitive>) {
-  return (
-    <CommandPrimitive
-      className={cn(
-        "flex h-full w-full flex-col overflow-hidden rounded-md bg-background text-foreground  border-border shadow-md",
-        className,
-      )}
-      {...props}
-    />
-  );
-}
+const Command = React.forwardRef<
+  React.ElementRef<typeof CommandPrimitive>,
+  React.ComponentPropsWithoutRef<typeof CommandPrimitive>
+>(({ className, ...props }, ref) => {
+  return (
+    <CommandPrimitive
+      ref={ref}
+      className={cn(
+        "flex h-full w-full flex-col overflow-hidden rounded-md bg-background text-foreground border-border shadow-md",
+        className,
+      )}
+      {...props}
+    />
+  );
+});
+Command.displayName = "Command";

48-68: Forward refs on Command.Input to enable programmatic focus.

Consumers often focus the input when opening the palette. Forwarding the ref keeps this possible.

-function CommandInput({
-  className,
-  ...props
-}: React.ComponentProps<typeof CommandPrimitive.Input>) {
-  return (
-    <div
-      className="flex items-center border-border border-b px-3"
-      cmdk-input-wrapper=""
-      data-slot="command-input"
-    >
-      <Search className="me-2 h-4 w-4 shrink-0 opacity-50 text-foreground" />
-      <CommandPrimitive.Input
-        className={cn(
-          "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 font-body",
-          className,
-        )}
-        {...props}
-      />
-    </div>
-  );
-}
+const CommandInput = React.forwardRef<
+  React.ElementRef<typeof CommandPrimitive.Input>,
+  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
+>(({ className, ...props }, ref) => {
+  return (
+    <div
+      className="flex items-center border-border border-b px-3"
+      cmdk-input-wrapper=""
+      data-slot="command-input"
+    >
+      <Search className="me-2 h-4 w-4 shrink-0 opacity-50 text-foreground" />
+      <CommandPrimitive.Input
+        ref={ref}
+        className={cn(
+          "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 font-body",
+          className,
+        )}
+        {...props}
+      />
+    </div>
+  );
+});
+CommandInput.displayName = "CommandInput";

70-84: Minor CSS nit: simplify height calc.

You can drop calc() around min() and rely on arbitrary value support for better readability.

-        "max-h-[400px] overflow-auto overscroll-contain transition-[height]  h-[calc(min(300px,var(--cmdk-list-height)))] bg-background",
+        "max-h-[400px] overflow-auto overscroll-contain transition-[height] h-[min(300px,var(--cmdk-list-height))] bg-background",

127-141: Selected vs hover styles may conflict.

The hover styles can visually override the selected state depending on generated CSS order. Consider removing hover bg/text when selected, or preferring only the data-[selected] styles.


159-177: Broaden Command.Check props to accept Lucide icon props.

Current typing only exposes icon and className; callers can’t pass size, strokeWidth, etc. Widen the props using the Check icon’s own props.

-interface CommandCheckProps {
-  icon?: LucideIcon;
-  className?: string;
-}
+type CommandCheckProps =
+  React.ComponentProps<typeof Check> & { icon?: LucideIcon };

Optionally keep the default size via className, but this lets consumers override icon props as needed.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 82ce613 and 99d5412.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/retroui/Command.tsx (1 hunks)
  • components/retroui/index.ts (1 hunks)
  • config/components.ts (4 hunks)
  • config/navigation.ts (2 hunks)
  • content/docs/components/command.mdx (1 hunks)
  • package.json (1 hunks)
  • preview/components/command-style-default.tsx (1 hunks)
  • preview/components/command-style-dialog.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (7)
components/retroui/index.ts (2)
components/retroui/CommandDisplay.tsx (4)
  • CommandDisplay (10-65)
  • CommandDisplayProps (6-8)
  • part (44-49)
  • navigator (13-21)
components/ComponentInstall.tsx (1)
  • command (10-30)
preview/components/command-style-default.tsx (1)
components/retroui/CommandDisplay.tsx (1)
  • CommandDisplay (10-65)
config/navigation.ts (2)
types/index.d.ts (3)
  • INavigationConfig (12-15)
  • INavItem (1-5)
  • INavItemWithChildren (7-10)
components/SideNav.tsx (2)
  • SideNav (8-43)
  • item (16-39)
preview/components/command-style-dialog.tsx (1)
components/retroui/CommandDisplay.tsx (1)
  • CommandDisplay (10-65)
content/docs/components/command.mdx (2)
components/ComponentInstall.tsx (5)
  • CliCommand (32-86)
  • ComponentInstallCli (88-109)
  • command (10-30)
  • ComponentInstall (115-130)
  • ComponentInstallManual (111-113)
components/ComponentShowcase.tsx (1)
  • ComponentShowcase (10-64)
components/retroui/Command.tsx (1)
components/retroui/Dialog.tsx (1)
  • IDialogHeaderProps (203-206)
config/components.ts (2)
components/ComponentShowcase.tsx (1)
  • ComponentShowcase (10-64)
components/retroui/CommandDisplay.tsx (2)
  • CommandDisplay (10-65)
  • CommandDisplayProps (6-8)
🪛 LanguageTool
content/docs/components/command.mdx

[grammar] ~24-~24: There might be a mistake here.
Context: ...# 2. Copy the code 👇 into your project: </ComponentInstall.Manual> </ComponentIns...

(QB_NEW_EN)

🔇 Additional comments (8)
package.json (1)

35-35: Dependency addition looks good

Adding cmdk at ^1.1.1 aligns with the new Command component and React 18 stack.

components/retroui/index.ts (1)

27-27: Barrel re-export for Command is correct

Re-exporting Command from the barrel matches the repo’s public API pattern.

content/docs/components/command.mdx (1)

16-21: I’ve added a script to confirm which packages Command.tsx actually imports so we can update the docs precisely to its real peer dependencies. Once we see the results, I’ll adjust the install instructions accordingly. Let me know when that’s available.

preview/components/command-style-default.tsx (1)

17-54: Looks good — clear, minimal preview that exercises groups, items, separators, and shortcuts.

Structure and icon usage read well; disabled state shown. No functional concerns here.

config/components.ts (3)

243-246: Formatting-only change LGTM.

Multiline lazy import improves readability without behavior change.


431-433: Formatting-only change LGTM.

Consistent with other entries; no functional impact.


603-612: New example entries wired correctly.

Names, file paths, and lazy imports align with the new previews.

components/retroui/Command.tsx (1)

179-191: API surface looks solid.

Nice cohesive namespace export (Command.Check, .Dialog, .Input, etc.). This mirrors familiar patterns and will be ergonomic to consume.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
content/docs/components/command.mdx (2)

13-15: Resolved: CLI command now cross-platform-friendly (Windows quotes fixed).

Switching to double quotes (escaped as "...") inside the JSX attribute addresses cmd.exe/PowerShell issues flagged earlier. Good catch and implementation.


36-38: Resolved: “Dialog” heading now matches the showcased preview.

The heading accurately reflects <ComponentShowcase name="command-style-dialog" />. Looks consistent with the previews and ToC.

🧹 Nitpick comments (3)
content/docs/components/command.mdx (3)

9-12: Unify the Examples structure: add “Default” heading and avoid duplicate section anchors.

Currently the default preview appears above the “Examples” section without a subheading, while “Dialog” lives under “Examples.” Add a “Default” subsection for consistency and remove the extra “## Examples” to keep a single section anchor in the ToC.

Apply these diffs:

-<ComponentShowcase name="command-style-default" />
-<br />
-<br />
+## Examples
+
+### Default
+
+<ComponentShowcase name="command-style-default" />
+<br />
+<br />
-## Examples
-

Also applies to: 34-35


22-23: Reduce layout “
” tags; prefer spacing utilities for consistency.

Repeated <br /> for vertical rhythm is brittle in MDX and can clutter markup. Consider margin utilities on surrounding wrappers (e.g., mt-6, mb-6) or wrapping sections in containers with spacing.

Also applies to: 31-33, 39-40


24-24: Minor copy edit: drop the emoji for a cleaner docs heading.

House style in other pages seems emoji-free in headings. Optional, but keeps the tone consistent.

Apply this diff if you agree:

-#### 2. Copy the code 👇 into your project:
+#### 2. Copy the code into your project:
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 99d5412 and d05e78a.

📒 Files selected for processing (2)
  • content/docs/components/command.mdx (1 hunks)
  • preview/components/command-style-dialog.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • preview/components/command-style-dialog.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
content/docs/components/command.mdx (3)
components/ComponentInstall.tsx (5)
  • CliCommand (32-86)
  • ComponentInstallCli (88-109)
  • command (10-30)
  • ComponentInstall (115-130)
  • ComponentInstallManual (111-113)
app/(docs)/docs/[[...slug]]/page.tsx (1)
  • page (44-101)
components/ComponentShowcase.tsx (1)
  • ComponentShowcase (10-64)
🪛 LanguageTool
content/docs/components/command.mdx

[grammar] ~24-~24: There might be a mistake here.
Context: ...# 2. Copy the code 👇 into your project: </ComponentInstall.Manual> </ComponentIns...

(QB_NEW_EN)

🔇 Additional comments (1)
content/docs/components/command.mdx (1)

9-12: Preview registrations verified

Both command-style-default and command-style-dialog are correctly registered and implemented, so no changes are needed:

  • config/components.ts
    • Lines 603–606: "command-style-default" entry with filePath and lazy import
    • Lines 608–611: "command-style-dialog" entry with filePath and lazy import
  • preview/components/command-style-default.tsx
    • Line 14: export default function CommandStyleDefault()
  • preview/components/command-style-dialog.tsx
    • Line 15: export default function Component()

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
registry.json (4)

279-280: Correct Radio description (single-choice, not multiple).

Radios allow selecting a single option from a group.

-      "description": "Sometimes you need to pick multiple options! That's where the Radio component comes into play.",
+      "description": "Pick exactly one option from a set. That's where the Radio component comes into play.",

801-812: Mismatch between name and file path. Use a “variants” name here.

Name says “toggle” but file is “…variants.tsx”.

-      "name": "checkbox-style-toggle",
-      "title": "checkbox-style-toggle",
+      "name": "checkbox-style-variants",
+      "title": "checkbox-style-variants",
       "type": "registry:block",
       "registryDependencies": ["https://retroui.dev/r/checkbox.json"],
       "files": [
         {
           "path": "preview/components/checkbox-style-variants.tsx",
           "target": "components/retroui/preview/checkbox-style-variants.tsx",
           "type": "registry:block"
         }
       ]

814-825: Second duplicate “checkbox-style-default”. Rename as sizes.

Avoid duplicate names; file path indicates sizes.

-      "name": "checkbox-style-default",
-      "title": "checkbox-style-default",
+      "name": "checkbox-style-sizes",
+      "title": "checkbox-style-sizes",
       "type": "registry:block",
       "registryDependencies": ["https://retroui.dev/r/checkbox.json"],
       "files": [
         {
           "path": "preview/components/checkbox-style-sizes.tsx",
           "target": "components/retroui/preview/checkbox-style-sizes.tsx",
           "type": "registry:block"
         }
       ]

617-628: Critical: Resolve duplicate registry item names in registry.json

The registry contains duplicate entries for both badge-style-default and checkbox-style-default, which will break consumers and installers. Each “variant” entry should have a unique name and title matching its file paths.

Addresses in registry.json:

  • badge-style-default entries around lines 617–628 and 643–654
  • checkbox-style-default entries around lines 785–794 and 811–820

Apply the following diffs to the second occurrence of each duplicate block:

--- registry.json
@@ # badge-style-default duplicate (2nd occurrence)
-      "name": "badge-style-default",
-      "title": "badge-style-default",
+      "name": "badge-style-rounded",
+      "title": "badge-style-rounded",
       "type": "registry:block",
       "registryDependencies": ["https://retroui.dev/r/badge.json"],
       "files": [
         {
-          "path": "preview/components/badge-style-rounded.tsx",
-          "target": "components/retroui/preview/badge-style-rounded.tsx",
+          "path": "preview/components/badge-style-rounded.tsx",
+          "target": "components/retroui/preview/badge-style-rounded.tsx",
           "type": "registry:block"
         }
       ]

@@ # checkbox-style-default duplicate (2nd occurrence)
-      "name": "checkbox-style-default",
-      "title": "checkbox-style-default",
+      "name": "checkbox-style-sizes",
+      "title": "checkbox-style-sizes",
       "type": "registry:block",
       "registryDependencies": ["https://retroui.dev/r/checkbox.json"],
       "files": [
         {
-          "path": "preview/components/checkbox-style-sizes.tsx",
-          "target": "components/retroui/preview/checkbox-style-sizes.tsx",
+          "path": "preview/components/checkbox-style-sizes.tsx",
+          "target": "components/retroui/preview/checkbox-style-sizes.tsx",
           "type": "registry:block"
         }
       ]
  • Verify that each .name is globally unique after these changes.
  • Confirm registry consumers install the intended variants correctly.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d05e78a and 8275249.

📒 Files selected for processing (1)
  • registry.json (85 hunks)
🔇 Additional comments (6)
registry.json (6)

5-5: Inline root dependencies change looks good.

Switching to inline arrays improves readability and keeps diffs smaller.


58-58: Consistent inline deps for utils.

Good consistency with the new inline style.


516-517: Nice: registryDependencies switched to inline arrays.

This improves maintainability and consistency across entries.

Also applies to: 529-530, 542-543, 568-569, 581-582, 594-595, 607-608, 620-621, 633-634


1117-1118: Adding lucide-react to relevant preview blocks is appropriate.

Previews commonly showcase icons; declaring this keeps consumers from missing a dep on install.

Also applies to: 1131-1132, 1145-1146, 1159-1160, 1176-1177, 1193-1194, 1210-1211, 1244-1245, 1261-1262, 1278-1279, 1295-1296, 1312-1313, 1331-1332, 1350-1351


38-51: Dark theme matches light theme values — intentional?

All HSLs in dark match light. If unintentional, consider darker backgrounds/foregrounds or derive from tokens.

I can help propose a token set if you share intended dark palette.


191-204: Command component integration verified – ready to merge

All required integration points are present and correct:

  • File exists at components/retroui/Command.tsx
  • Re-export in components/retroui/index.ts: export * from "./Command"
  • cmdk dependency pinned in package.json (^1.1.1)
  • Navigation entry added in config/navigation.ts

No further changes needed.

"name": "accordion",
"type": "registry:component",
"title": "Accordion",
"description": "This collapsible component let's your users read only the content they care about. 😌",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Grammar: "let's" → "lets".

User-facing copy: “This collapsible component lets your users…” (no apostrophe).

-      "description": "This collapsible component let's your users read only the content they care about. 😌",
+      "description": "This collapsible component lets your users read only the content they care about. 😌",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"description": "This collapsible component let's your users read only the content they care about. 😌",
"description": "This collapsible component lets your users read only the content they care about. 😌",
🤖 Prompt for AI Agents
In registry.json around line 70 the description contains the incorrect
contraction "let's"; update the string to use the correct possessive/verb form
"lets" so the user-facing copy reads: "This collapsible component lets your
users read only the content they care about. 😌".

"dependencies": [
"@radix-ui/react-switch"
],
"dependencies": ["@radix-ui/react-switch"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Grammar: remove “to” in “Let users to turn on…”.

-      "description": "Let users to turn on or off your marketing emails or notifications.",
+      "description": "Let users turn on or off your marketing emails or notifications.",

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In registry.json around line 339, the human-readable description contains the
ungrammatical phrase "Let users to turn on..."; edit that string to remove the
extraneous "to" so it reads "Let users turn on..." (preserve surrounding
punctuation/capitalization and ensure JSON string remains valid).

Comment on lines 1357 to 1360
}
]
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Add missing Command preview blocks to align with PR description and docs.

The AI summary and PR intent mention two Command previews (“default” and “dialog”). They’re not present in this registry file. Add them so the preview gallery and installers can discover them.

   ]
-}
+  ,
+  {
+    "name": "command-style-default",
+    "title": "command-style-default",
+    "type": "registry:block",
+    "registryDependencies": ["https://retroui.dev/r/command.json"],
+    "dependencies": ["lucide-react"],
+    "files": [
+      {
+        "path": "preview/components/command-style-default.tsx",
+        "target": "components/retroui/preview/command-style-default.tsx",
+        "type": "registry:block"
+      }
+    ]
+  },
+  {
+    "name": "command-style-dialog",
+    "title": "command-style-dialog",
+    "type": "registry:block",
+    "registryDependencies": ["https://retroui.dev/r/command.json"],
+    "dependencies": ["lucide-react", "@radix-ui/react-dialog"],
+    "files": [
+      {
+        "path": "preview/components/command-style-dialog.tsx",
+        "target": "components/retroui/preview/command-style-dialog.tsx",
+        "type": "registry:block"
+      }
+    ]
+  }
+}

🏁 Script executed:

#!/bin/bash
# Verify the preview files referenced above exist
test -f preview/components/command-style-default.tsx || echo "Missing preview/components/command-style-default.tsx"
test -f preview/components/command-style-dialog.tsx  || echo "Missing preview/components/command-style-dialog.tsx"

Length of output: 108


🏁 Script executed:

#!/bin/bash
# Confirm absence of the blocks in registry.json
rg -n '"name": "command-style-default"' registry.json || echo "Missing block: command-style-default"
rg -n '"name": "command-style-dialog"' registry.json  || echo "Missing block: command-style-dialog"

# Show the file tail to verify trailing syntax for insertion
tail -n 5 registry.json

Length of output: 330


Add missing Command preview blocks to registry.json

The registry file currently ends without the two Command preview blocks (“command-style-default” and “command-style-dialog”), even though their corresponding preview components exist. To ensure the preview gallery and installers can discover them, insert the following immediately before the final closing } in registry.json:

   ]
-}
+  ,
+  {
+    "name": "command-style-default",
+    "title": "command-style-default",
+    "type": "registry:block",
+    "registryDependencies": ["https://retroui.dev/r/command.json"],
+    "dependencies": ["lucide-react"],
+    "files": [
+      {
+        "path": "preview/components/command-style-default.tsx",
+        "target": "components/retroui/preview/command-style-default.tsx",
+        "type": "registry:block"
+      }
+    ]
+  },
+  {
+    "name": "command-style-dialog",
+    "title": "command-style-dialog",
+    "type": "registry:block",
+    "registryDependencies": ["https://retroui.dev/r/command.json"],
+    "dependencies": ["lucide-react", "@radix-ui/react-dialog"],
+    "files": [
+      {
+        "path": "preview/components/command-style-dialog.tsx",
+        "target": "components/retroui/preview/command-style-dialog.tsx",
+        "type": "registry:block"
+      }
+    ]
+  }
+}

• File: registry.json
• Preview components verified in preview/components/ – both command-style-default.tsx and command-style-dialog.tsx exist.
• Insert the comma and block objects after the closing ] of the existing array, before the final }.

Committable suggestion skipped: line range outside the PR's diff.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
content/docs/components/command.mdx (2)

18-20: Thanks for adding cmdk to Manual install — this unblocks copy-paste usage

The missing dependency from earlier review is now included. Looks good.


36-38: Preview heading and component are aligned — good fix

“Dialog” now matches the showcased command-style-dialog example.

🧹 Nitpick comments (3)
content/docs/components/command.mdx (3)

10-11: Prefer semantic spacing over repeated
tags

Use layout utilities instead of visual line breaks to keep MDX accessible and consistent with the site’s Tailwind patterns.

 <ComponentShowcase name="command-style-default" />
-<br />
-<br />
+<div className="my-8" aria-hidden="true" />

 ...
 <ComponentShowcase name="command-style-dialog" />
-<br />
-<br />
+<div className="my-8" aria-hidden="true" />

Also applies to: 31-33, 39-40


4-4: Normalize front matter date to ISO 8601 for reliable parsing

Use an ISO string to avoid locale parsing issues downstream and keep formatting consistent.

-lastUpdated: 21 Aug, 2025
+lastUpdated: 2025-08-21

24-24: Minor wording tweak for the heading (emoji can be screen-reader noisy)

Optional: drop the emoji or move it to a visually hidden label.

-#### 2. Copy the code 👇 into your project:
+#### 2. Copy the code into your project:
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8275249 and c7363c6.

📒 Files selected for processing (1)
  • content/docs/components/command.mdx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
content/docs/components/command.mdx (3)
components/ComponentInstall.tsx (4)
  • CliCommand (32-86)
  • ComponentInstallCli (88-109)
  • command (10-30)
  • ComponentInstall (115-130)
components/MDX.tsx (1)
  • type (16-109)
app/(docs)/docs/[[...slug]]/page.tsx (1)
  • page (44-101)
🪛 LanguageTool
content/docs/components/command.mdx

[grammar] ~24-~24: There might be a mistake here.
Context: ...# 2. Copy the code 👇 into your project: </ComponentInstall.Manual> </ComponentIns...

(QB_NEW_EN)

<br />

<ComponentInstall>
<ComponentInstall.Cli npmCommand="npx shadcn@latest add &quot;https://retroui.dev/r/command.json&quot;" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Use real double quotes via JSX braces instead of HTML entities in CLI command

Avoid &quot; in JSX props; it may copy as literal text. Use a JS string so copied command contains actual quotes across all shells.

-  <ComponentInstall.Cli npmCommand="npx shadcn@latest add &quot;https://retroui.dev/r/command.json&quot;" />
+  <ComponentInstall.Cli npmCommand={'npx shadcn@latest add "https://retroui.dev/r/command.json"'} />

Run this quick check to catch any remaining HTML-entity quotes in MDX props:


🏁 Script executed:

#!/bin/bash
rg -nP '&quot;' content/docs/**/*.mdx

Length of output: 1374


Refactor CLI command to use real quotes instead of HTML entities

Verified via ripgrep that this is the only occurrence of &quot; in MDX props. Please update the following line in content/docs/components/command.mdx:

-  <ComponentInstall.Cli npmCommand="npx shadcn@latest add &quot;https://retroui.dev/r/command.json&quot;" />
+  <ComponentInstall.Cli npmCommand={'npx shadcn@latest add "https://retroui.dev/r/command.json"'} />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<ComponentInstall.Cli npmCommand="npx shadcn@latest add &quot;https://retroui.dev/r/command.json&quot;" />
<ComponentInstall.Cli npmCommand={'npx shadcn@latest add "https://retroui.dev/r/command.json"'} />
🤖 Prompt for AI Agents
In content/docs/components/command.mdx around line 14, the npmCommand prop uses
HTML entity &quot; for the internal URL quotes; replace the entities with real
double quotes and make the prop use single quotes for its value so it remains
valid JSX/MDX, e.g. change the attribute to use single quotes around the whole
string and real double quotes around the URL.

@vercel
Copy link

vercel bot commented Aug 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
retro-ui Ready Ready Preview Comment Aug 24, 2025 5:26pm

@ariflogs ariflogs merged commit 356ccd3 into Logging-Studio:main Aug 24, 2025
3 checks passed
@ameybh ameybh deleted the command branch August 25, 2025 18:04
@coderabbitai coderabbitai bot mentioned this pull request Sep 5, 2025
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.

2 participants