fix(registry): URL-ify ui-tier cross-deps to prevent shadcn upstream 404#75
Conversation
Adds ...tierComponentNames["ui"] to customComponentNames in build-registry.mjs so ui→ui registryDependencies (toaster→toast, command→dialog, etc.) are emitted as full democrito.design URLs instead of bare names. shadcn v4 would otherwise resolve bare names against its upstream registry and 404. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthrough
ChangesRegistry Dependency URL Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
registry.json (1)
22-33:⚠️ Potential issue | 🟠 Major | ⚡ Quick winURL-ify the base manifest’s local UI dependencies too.
The setup entrypoint still lists local UI primitive names as bare slugs, so
shadcn add https://democrito.design/r/democrito.jsoncan resolve these from the official registry instead of democrito’s registry. These names also exist as local items in this file; either URL-ify them or confirm they intentionally target upstream shadcn components.🔧 Proposed fix
"registryDependencies": [ - "button", - "badge", - "card", - "dialog", - "input", - "label", - "select", - "separator", - "tabs", - "tooltip" + "https://democrito.design/r/button.json", + "https://democrito.design/r/badge.json", + "https://democrito.design/r/card.json", + "https://democrito.design/r/dialog.json", + "https://democrito.design/r/input.json", + "https://democrito.design/r/label.json", + "https://democrito.design/r/select.json", + "https://democrito.design/r/separator.json", + "https://democrito.design/r/tabs.json", + "https://democrito.design/r/tooltip.json" ],🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@registry.json` around lines 22 - 33, The registryDependencies array in the manifest contains bare slug names (button, badge, card, dialog, input, label, select, separator, tabs, tooltip) instead of full URLs. Replace each bare slug with the complete URL format pointing to the appropriate registry so that external tools can properly resolve these dependencies. For example, convert bare slugs to URLs like https://democrito.design/r/SLUG-NAME or the official shadcn registry equivalent, ensuring consistency with how external manifests reference dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@registry.json`:
- Around line 22-33: The registryDependencies array in the manifest contains
bare slug names (button, badge, card, dialog, input, label, select, separator,
tabs, tooltip) instead of full URLs. Replace each bare slug with the complete
URL format pointing to the appropriate registry so that external tools can
properly resolve these dependencies. For example, convert bare slugs to URLs
like https://democrito.design/r/SLUG-NAME or the official shadcn registry
equivalent, ensuring consistency with how external manifests reference
dependencies.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8d66017b-0670-4f11-ba3b-d2ab1e3f5206
📒 Files selected for processing (41)
public/r/activity-feed-item.jsonpublic/r/activity-feed.jsonpublic/r/alert-dialog.jsonpublic/r/apidoc-panel.jsonpublic/r/apikey-manager.jsonpublic/r/auth-form.jsonpublic/r/avatar-group.jsonpublic/r/bulk-actions-bar.jsonpublic/r/calendar.jsonpublic/r/carousel.jsonpublic/r/command.jsonpublic/r/data-manager.jsonpublic/r/data-table.jsonpublic/r/empty-state.jsonpublic/r/export-menu.jsonpublic/r/filter-bar.jsonpublic/r/form-field.jsonpublic/r/form.jsonpublic/r/import-dialog.jsonpublic/r/integration-card.jsonpublic/r/nav-item.jsonpublic/r/onboarding-wizard.jsonpublic/r/organization-manager.jsonpublic/r/pagination.jsonpublic/r/parameter-control.jsonpublic/r/run-history-item.jsonpublic/r/run-history.jsonpublic/r/search-bar.jsonpublic/r/sidebar-nav.jsonpublic/r/sidebar.jsonpublic/r/template-preview.jsonpublic/r/theme-toggle.jsonpublic/r/toaster.jsonpublic/r/toggle-group.jsonpublic/r/token-counter.jsonpublic/r/token-reference-card.jsonpublic/r/top-bar.jsonpublic/r/user-menu.jsonpublic/r/variable-editor-row.jsonregistry.jsonscripts/build-registry.mjs
Summary
...tierComponentNames["ui"]tocustomComponentNamesinscripts/build-registry.mjsso the URL-ifier covers ui→ui cross-deps (previously only atoms/molecules/organisms/templates were covered)public/r/*.json—toaster→toast,command→dialog, etc. are now fullhttps://democrito.design/r/*.jsonURLsRoot cause
The comment in the old code was honest: "only URL-ify custom (non-ui) deps; ui cross-refs stay bare" — that line was the bug. The ui tier was never added to
customComponentNames.Verification
toaster.jsonregistryDependencies →["https://democrito.design/r/toast.json"]✓command.jsonregistryDependencies →["https://democrito.design/r/dialog.json"]✓npm run build && npm test— 125 tests pass ✓🤖 Generated with Claude Code
Summary by CodeRabbit