Skip to content

Fix 1662#1664

Open
kemboi22 wants to merge 14 commits intounovue:devfrom
kemboi22:fix-1662
Open

Fix 1662#1664
kemboi22 wants to merge 14 commits intounovue:devfrom
kemboi22:fix-1662

Conversation

@kemboi22
Copy link
Contributor

@kemboi22 kemboi22 commented Jan 27, 2026

🔗 Linked issue

Fix the issue #1662

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)

  • 🐞 Bug fix (a non-breaking change that fixes an issue)

  • 👌 Enhancement (improving an existing functionality like performance)

  • ✨ New feature (a non-breaking change that adds functionality)

  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)

  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

  • I have linked an issue or discussion.

  • I have updated the documentation accordingly.

Summary by CodeRabbit

  • New Features

    • Introduced a Registry Directory with a searchable, filterable list of component registries.
    • Easily browse and add registries to your projects with one click.
    • New "Directory" menu item for quick navigation.
  • Documentation

    • Added comprehensive documentation for the Registry Directory feature.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

This PR introduces a directory registry feature including new Vue components for displaying and managing registries, corresponding data structures, navigation configuration, and documentation for the feature.

Changes

Cohort / File(s) Summary
Registry UI Components
apps/v4/components/registry/AddRegistryModal.vue, apps/v4/components/registry/RegistryList.vue
New Vue 3 components for registry functionality: AddRegistryModal renders a dialog with registry command details; RegistryList provides a searchable interface displaying registries with actions (Add/View) and metadata.
Registry Data Layer
apps/v4/lib/directory-registry.ts, apps/v4/registry/directory.json
New TypeScript interface DirectoryRegistry and constant directoryRegistryList; JSON file containing three registry entries with name, description, link, logo, and optional command.
Documentation & Configuration
apps/v4/content/docs/directory.md, apps/v4/lib/config.ts
New documentation page explaining registry usage with RegistryList component; navigation item added to siteConfig.
Minor Fix
apps/v4/registry/new-york-v4/ui/carousel/CarouselContent.vue
TypeScript error suppression comment added; minor formatting adjustment to carousel container rendering.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A registry directory hops into view,
With modals and lists, all shiny and new!
From JSON to Vue, the components align,
To search and to browse, each registry line—
Hop along, dear reviewers, this feature's sublime! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix 1662' refers to an issue number but provides no meaningful information about what the actual change accomplishes or what feature/component is being modified. Update the title to describe the main change, such as 'Add directory registry feature' or 'Introduce registry directory with modal component' to clearly convey what this PR implements.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@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

🤖 Fix all issues with AI agents
In `@apps/v4/components/registry/RegistryList.vue`:
- Around line 61-68: The Clear button is non-functional and the closing tag
casing is wrong: add a click handler on the InputGroupButton (e.g.
`@click`="clearSearch" or `@click`="searchQuery = ''") that resets the component's
search model (or calls an existing method like clearSearch) so the X button
actually clears the query, and correct the mismatched closing tag from
</inputgroupaddon> to </InputGroupAddon>; ensure the clearSearch implementation
updates the same reactive variable used by the input v-model or emits the proper
event.

In `@apps/v4/content/docs/directory.md`:
- Around line 6-10: The CLI example in the docs contains a trailing period that
will be copied into the command and cause failures; update the example string
"npx shadcn-vue add @<registry>/<component>." to remove the trailing period so
it reads "npx shadcn-vue add @<registry>/<component>" in the docs (refer to the
example command line in apps/v4/content/docs/directory.md where the snippet
contains @<registry>/<component>).

In `@apps/v4/registry/directory.json`:
- Around line 3-18: Fix the user-facing typos in the registry JSON: rename the
"Insipira UI" entry to "Inspira UI" so it matches the description text, remove
the stray space before the comma in that description ("TailwindCSS , motion-v" →
"TailwindCSS, motion-v"), and add the missing space in the "Mapcn" description
("Beautiful maps,made simple." → "Beautiful maps, made simple."); locate and
update the entries by their "name" fields ("Insipira UI"/"Inspira UI" and
"Mapcn") in the JSON array.
🧹 Nitpick comments (5)
apps/v4/registry/new-york-v4/ui/carousel/CarouselContent.vue (1)

11-12: Document why the @ts-expect-error is required (and fix the typo).

This suppression can hide real type issues unless the expected error is documented and tracked.

✏️ Suggested comment tweak
-// `@ts-expect-error` Skip this when building since its a neede var
+// `@ts-expect-error`: carouselRef is required for template refs; fix useCarousel typing when possible.

Please confirm by running your usual typecheck to ensure the error is still expected.

apps/v4/components/registry/RegistryList.vue (4)

31-35: Consider case-insensitive search for better UX.

The current filter uses includes() which is case-sensitive. Users searching for "map" won't find "Mapcn".

♻️ Suggested improvement
 const registryList = computed(() => {
+  const query = searchQuery.value.toLowerCase()
   return directoryRegistryList.filter((r) => {
-    return r.name.includes(searchQuery.value) || r.description.includes(searchQuery.value)
+    return r.name.toLowerCase().includes(query) || r.description.toLowerCase().includes(query)
   })
 })

56-59: Clear button visibility should be conditional on search input.

The data-disabled attribute is hardcoded to false. Consider binding it to whether searchQuery is empty so the clear button only appears when there's text to clear.

♻️ Suggested improvement
         <InputGroupAddon
           align="inline-end"
-          :data-disabled="false"
+          :data-disabled="!searchQuery"
           class-name="data-[disabled=true]:hidden"
         >

51-54: Counter shows total count instead of filtered results.

Displaying directoryRegistryList.length always shows the total count. Users might expect to see how many results match their search.

♻️ Suggested improvement
-            {{ directoryRegistryList.length }}
-            {{ directoryRegistryList.length === 1 ? "Registry" : "Registries" }}
+            {{ registryList.length }}
+            {{ registryList.length === 1 ? "Registry" : "Registries" }}

117-117: Modal close handler ignores emitted value.

The @update:open handler calls toggleAddRegistryModal(null) regardless of the emitted value. This works but doesn't follow the standard v-model pattern. If the modal emits false when closed, you're toggling instead of setting directly.

♻️ Suggested improvement for clearer intent
-    <AddRegistryModal v-if="selectedRegistry" :open="addRegistryOpen" :registry="selectedRegistry" `@update`:open="toggleAddRegistryModal(null)" />
+    <AddRegistryModal 
+      v-if="selectedRegistry" 
+      v-model:open="addRegistryOpen" 
+      :registry="selectedRegistry" 
+      `@update`:open="(val) => { if (!val) selectedRegistry = null }" 
+    />

Or simplify the toggle function to accept a boolean:

-function toggleAddRegistryModal(registry: DirectoryRegistry | null) {
-  selectedRegistry.value = registry
-  addRegistryOpen.value = !addRegistryOpen.value
-}
+function openAddRegistryModal(registry: DirectoryRegistry) {
+  selectedRegistry.value = registry
+  addRegistryOpen.value = true
+}
+
+function closeAddRegistryModal() {
+  addRegistryOpen.value = false
+  selectedRegistry.value = null
+}

Comment on lines +61 to +68
<InputGroupButton
aria-label="Clear"
title="Clear"
size="icon-xs"
>
<X />
</InputGroupButton>
</inputgroupaddon>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Clear button is non-functional and has inconsistent tag casing.

Two issues here:

  1. The clear button is missing a @click handler to actually clear the search query.
  2. Line 68: </inputgroupaddon> uses lowercase while the opening tag uses PascalCase.
🐛 Proposed fix
           <InputGroupButton
             aria-label="Clear"
             title="Clear"
             size="icon-xs"
+            `@click`="searchQuery = ''"
           >
             <X />
           </InputGroupButton>
-        </inputgroupaddon>
+        </InputGroupAddon>
📝 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
<InputGroupButton
aria-label="Clear"
title="Clear"
size="icon-xs"
>
<X />
</InputGroupButton>
</inputgroupaddon>
<InputGroupButton
aria-label="Clear"
title="Clear"
size="icon-xs"
`@click`="searchQuery = ''"
>
<X />
</InputGroupButton>
</InputGroupAddon>
🤖 Prompt for AI Agents
In `@apps/v4/components/registry/RegistryList.vue` around lines 61 - 68, The Clear
button is non-functional and the closing tag casing is wrong: add a click
handler on the InputGroupButton (e.g. `@click`="clearSearch" or
`@click`="searchQuery = ''") that resets the component's search model (or calls an
existing method like clearSearch) so the X button actually clears the query, and
correct the mismatched closing tag from </inputgroupaddon> to
</InputGroupAddon>; ensure the clearSearch implementation updates the same
reactive variable used by the input v-model or emits the proper event.

Comment on lines +6 to +10
These registries are built into the CLI with no additional configuration required. To add a component, run:

```bash
npx shadcn-vue add @<registry>/<component>.
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove the trailing period in the CLI example.

Copy/pasting the command as-is will include the period and fail.

🔧 Proposed fix
-npx shadcn-vue add @<registry>/<component>.
+npx shadcn-vue add @<registry>/<component>
🤖 Prompt for AI Agents
In `@apps/v4/content/docs/directory.md` around lines 6 - 10, The CLI example in
the docs contains a trailing period that will be copied into the command and
cause failures; update the example string "npx shadcn-vue add
@<registry>/<component>." to remove the trailing period so it reads "npx
shadcn-vue add @<registry>/<component>" in the docs (refer to the example
command line in apps/v4/content/docs/directory.md where the snippet contains
@<registry>/<component>).

Comment on lines +3 to +18
"name": "Insipira UI",
"description": "Inspira UI is a collection of reusable, animated components powered by TailwindCSS , motion-v , GSAP & threejs — crafted to help you ship faster and better.",
"link": "https://inspira-ui.com/docs/en",
"logo": "https://cdn.inspira-ui.com/logo-dark.svg"
},
{
"name": "Stunning UI",
"description": "Create Stunning Websites That Stand Out",
"link": "https://www.stunningui.com/",
"logo": "https://robertshaw.id/assets/stunning-ui.svg"
},

{
"name": "Mapcn",
"description": "Beautiful maps,made simple.",
"link": "https://mapcn-vue.geoql.in/",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix user-facing typos in registry data.

The name/description mismatch and missing space will show up in UI.

🔧 Proposed fix
-    "name": "Insipira UI",
+    "name": "Inspira UI",
@@
-    "description": "Beautiful maps,made simple.",
+    "description": "Beautiful maps, made simple.",
📝 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
"name": "Insipira UI",
"description": "Inspira UI is a collection of reusable, animated components powered by TailwindCSS , motion-v , GSAP & threejs — crafted to help you ship faster and better.",
"link": "https://inspira-ui.com/docs/en",
"logo": "https://cdn.inspira-ui.com/logo-dark.svg"
},
{
"name": "Stunning UI",
"description": "Create Stunning Websites That Stand Out",
"link": "https://www.stunningui.com/",
"logo": "https://robertshaw.id/assets/stunning-ui.svg"
},
{
"name": "Mapcn",
"description": "Beautiful maps,made simple.",
"link": "https://mapcn-vue.geoql.in/",
"name": "Inspira UI",
"description": "Inspira UI is a collection of reusable, animated components powered by TailwindCSS , motion-v , GSAP & threejs — crafted to help you ship faster and better.",
"link": "https://inspira-ui.com/docs/en",
"logo": "https://cdn.inspira-ui.com/logo-dark.svg"
},
{
"name": "Stunning UI",
"description": "Create Stunning Websites That Stand Out",
"link": "https://www.stunningui.com/",
"logo": "https://robertshaw.id/assets/stunning-ui.svg"
},
{
"name": "Mapcn",
"description": "Beautiful maps, made simple.",
"link": "https://mapcn-vue.geoql.in/",
🤖 Prompt for AI Agents
In `@apps/v4/registry/directory.json` around lines 3 - 18, Fix the user-facing
typos in the registry JSON: rename the "Insipira UI" entry to "Inspira UI" so it
matches the description text, remove the stray space before the comma in that
description ("TailwindCSS , motion-v" → "TailwindCSS, motion-v"), and add the
missing space in the "Mapcn" description ("Beautiful maps,made simple." →
"Beautiful maps, made simple."); locate and update the entries by their "name"
fields ("Insipira UI"/"Inspira UI" and "Mapcn") in the JSON array.

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