Skip to content

fix(registry): URL-ify ui-tier cross-deps to prevent shadcn upstream 404#75

Merged
mmorerasanchez merged 1 commit into
mainfrom
fix/ui-cross-dep-urls
Jun 17, 2026
Merged

fix(registry): URL-ify ui-tier cross-deps to prevent shadcn upstream 404#75
mmorerasanchez merged 1 commit into
mainfrom
fix/ui-cross-dep-urls

Conversation

@mmorerasanchez

@mmorerasanchez mmorerasanchez commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds ...tierComponentNames["ui"] to customComponentNames in scripts/build-registry.mjs so the URL-ifier covers ui→ui cross-deps (previously only atoms/molecules/organisms/templates were covered)
  • Regenerates all public/r/*.jsontoaster→toast, command→dialog, etc. are now full https://democrito.design/r/*.json URLs
  • Prevents shadcn v4 from resolving bare names against its upstream registry and 404-ing on democrito-owned components

Root 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.json registryDependencies → ["https://democrito.design/r/toast.json"]
  • command.json registryDependencies → ["https://democrito.design/r/dialog.json"]
  • No bare custom deps remain (integrity check passes) ✓
  • npm run build && npm test — 125 tests pass ✓

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Standardized component registry by updating dependency references to use full qualified URLs instead of shorthand identifiers across all components. This improves consistency in dependency resolution and configuration management throughout the system, with no changes to component functionality or user-visible behavior.

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>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

scripts/build-registry.mjs is extended by one line to include ui-tier component names in customComponentNames, which causes those names to be URL-prefixed when generating registryDependencies. All public/r/*.json manifests and registry.json are then updated to reflect fully-qualified https://democrito.design/r/<name>.json URLs in place of bare slug strings.

Changes

Registry Dependency URL Migration

Layer / File(s) Summary
Build script: include ui tier in URL-ified names
scripts/build-registry.mjs
customComponentNames is extended to include tierComponentNames["ui"], so ui-tier component names are now URL-prefixed when resolving registryDependencies for individual items.
public/r/ manifest updates
public/r/activity-feed-item.json, public/r/activity-feed.json, public/r/alert-dialog.json, public/r/apidoc-panel.json, public/r/apikey-manager.json, public/r/auth-form.json, public/r/avatar-group.json, public/r/bulk-actions-bar.json, public/r/calendar.json, public/r/carousel.json, public/r/command.json, public/r/data-manager.json, public/r/data-table.json, public/r/empty-state.json, public/r/export-menu.json, public/r/filter-bar.json, public/r/form-field.json, public/r/form.json, public/r/import-dialog.json, public/r/integration-card.json, public/r/nav-item.json, public/r/onboarding-wizard.json, public/r/organization-manager.json, public/r/pagination.json, public/r/parameter-control.json, public/r/run-history-item.json, public/r/run-history.json, public/r/search-bar.json, public/r/sidebar-nav.json, public/r/sidebar.json, public/r/template-preview.json, public/r/theme-toggle.json, public/r/toaster.json, public/r/toggle-group.json, public/r/token-counter.json, public/r/token-reference-card.json, public/r/top-bar.json, public/r/user-menu.json, public/r/variable-editor-row.json
All registryDependencies entries across individual component manifests are updated from bare slug strings to https://democrito.design/r/*.json URLs.
registry.json component and aggregate group updates
registry.json
All registryDependencies entries in registry.json are updated from slugs to fully-qualified URLs for all individual components and the aggregate groups democrito-atoms, democrito-molecules, democrito-organisms, democrito-templates, and democrito-ui.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • mmorerasanchez/democrito#74: Directly related — implements the same registryDependencies URL rewrite pattern via scripts/build-registry.mjs and propagates the same kind of manifest updates to public/r/* files.

Poem

🐇 Hopping through the JSON fields,
No more short slugs left concealed!
Each badge and button, card and form,
Now wears a URL — the new norm.
Full paths for all, the registry's neat,
This bunny's refactor is complete! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing registry dependency resolution by converting ui-tier cross-dependencies to URLs to prevent shadcn upstream 404 errors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ui-cross-dep-urls

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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 win

URL-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.json can 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

📥 Commits

Reviewing files that changed from the base of the PR and between 19e0135 and f4d2c00.

📒 Files selected for processing (41)
  • public/r/activity-feed-item.json
  • public/r/activity-feed.json
  • public/r/alert-dialog.json
  • public/r/apidoc-panel.json
  • public/r/apikey-manager.json
  • public/r/auth-form.json
  • public/r/avatar-group.json
  • public/r/bulk-actions-bar.json
  • public/r/calendar.json
  • public/r/carousel.json
  • public/r/command.json
  • public/r/data-manager.json
  • public/r/data-table.json
  • public/r/empty-state.json
  • public/r/export-menu.json
  • public/r/filter-bar.json
  • public/r/form-field.json
  • public/r/form.json
  • public/r/import-dialog.json
  • public/r/integration-card.json
  • public/r/nav-item.json
  • public/r/onboarding-wizard.json
  • public/r/organization-manager.json
  • public/r/pagination.json
  • public/r/parameter-control.json
  • public/r/run-history-item.json
  • public/r/run-history.json
  • public/r/search-bar.json
  • public/r/sidebar-nav.json
  • public/r/sidebar.json
  • public/r/template-preview.json
  • public/r/theme-toggle.json
  • public/r/toaster.json
  • public/r/toggle-group.json
  • public/r/token-counter.json
  • public/r/token-reference-card.json
  • public/r/top-bar.json
  • public/r/user-menu.json
  • public/r/variable-editor-row.json
  • registry.json
  • scripts/build-registry.mjs

@mmorerasanchez mmorerasanchez merged commit 458bbb3 into main Jun 17, 2026
2 checks passed
@mmorerasanchez mmorerasanchez deleted the fix/ui-cross-dep-urls branch June 17, 2026 14:17
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.

1 participant