fix(registry): derive component count from registry, drop hardcoded 225#450
Merged
Conversation
The homepage reads the live count (getComponentCount = registry.items.length
= 309), while the PWA manifest, MCP server instructions, the changelog
[Unreleased] snapshot, and home/{en,fr}.mdx hardcoded a stale 225 — last
accurate around PR #386 and never bumped as ~84 components were added.
- manifest.ts, mcp/route.ts: derive the count from the registry (no literal)
- CHANGELOG [Unreleased] + home/{en,fr}.mdx: bump 225 -> 309
- add component-count.test.ts: fails when any human-maintained count diverges
from registry.items.length, so the next added component forces a copy update
Closes #449
Claude-Session: https://claude.ai/code/session_01CbnP4KD8kio2hozz54h9zV
|
ntk preview
Built from |
#443 (ce98eca) made the prompt-input `ref` prop optional in the canonical packages/ui source but did not run `registry:build`, so the generated shadcn shim still shipped the old `ref: ... | undefined` type. This regenerates it, clearing the pre-existing `registry:check` drift that blocks Quality Gates on every PR. Claude-Session: https://claude.ai/code/session_01CbnP4KD8kio2hozz54h9zV
Collaborator
Author
|
Bundled a second commit ( |
bntvllnt
added a commit
that referenced
this pull request
Jun 25, 2026
Regenerate registry.json via `registry:build` so the committed artifacts match the canonical component sources picked up from main (#443 prompt-input optional ref, #450 component-count). Clears the Quality Gates registry-drift check. Claude-Session: https://claude.ai/code/session_01Mx9zT1QTSPnBFFxErJ2UrW
bntvllnt
added a commit
that referenced
this pull request
Jun 26, 2026
…309) Resolves the CHANGELOG conflict and brings the release-prep branch up to date with everything that landed on main since it was authored (React 19 migration, core/forms/charts/motion families, count-derivation #450). - Component count corrected everywhere to the registry-derived 309 (was 225/295 across CHANGELOGs, READMEs, package.json, ARCHITECTURE, ROADMAP). - ROADMAP headline counts recomputed (+169 net from the 140 baseline); curated list relabeled as a highlight subset. - 0.3.0 changelog dates refreshed to 2026-06-26. - component-count.test.ts: assert the *newest* CHANGELOG count snapshot (not strictly [Unreleased]) so the drift guard survives a release cut — after this PR the count lives in [0.3.0] and [Unreleased] is empty. Claude-Session: https://claude.ai/code/session_01KB2yTDBo7Knydqvz1VvFdF
bntvllnt
added a commit
that referenced
this pull request
Jun 27, 2026
Closes #432 Makes `main` ready to cut **stable 0.3.0** (per `docs/RELEASING.md`). **Docs + one test-guard tweak — this PR does not release.** Merge → dispatch Publish is the separate next step. > **Refreshed 2026-06-26:** rebuilt on top of current `main` (was 9 days stale / conflicting). Reconciled with everything that landed since it was authored — React 19 migration (#441), the core/forms/charts/motion families, and the count-derivation fix (#450). ## Changes - **Changelogs** (`CHANGELOG.md` + `packages/ui/CHANGELOG.md`): `[Unreleased]` → dated **`[0.3.0] - 2026-06-26`** (the publish workflow's release gate greps `## [0.3.0]`), dropped the now-satisfied pre-release notes, added the granular 0.3.0-train families (form primitives, charts/dataviz, AI/core primitives, motion/effects), a **Fixed** entry (theme-adaptive `CandlestickChart`/`SparklineGrid` colors), the `v0.3.0` link reference, and a fresh empty `[Unreleased]`. - **Component count → 309 everywhere.** The single source of truth is `registry.items.length` (= 309 after #450). Synced every prose surface that drifted: `README.md` (×3), `packages/ui/README.md`, `packages/ui/package.json` `"description"`, `docs/ARCHITECTURE.md`, and the ROADMAP. (The earlier 144→225 / 295 numbers are superseded.) - **ROADMAP**: status `planning` → `release prep`; `milestone TBD` → real 0.3.0 milestone; headline counts recomputed to **+169** net (140 → 309); the curated component list is relabeled as a highlight subset (it enumerates the first ~85, not all 169). - **RELEASING.md**: documents the `apps/registry` version bump, the full doc-sync step (now incl. `packages/ui/package.json` description + the count-guard test), and the **post-publish** `PUBLISHED_VERSION` flip. - **`apps/registry/lib/component-count.test.ts`** (added on `main` by #450): the guard asserted the count lives in `[Unreleased]`. Cutting the release moves it into `[0.3.0]` and empties `[Unreleased]`, which would break that guard. Retargeted it to assert the **newest** count snapshot in the changelog (first match, file is newest-first) — works both between releases and immediately after a cut. Still pins to `registry.items.length`. ## Deliberately NOT here - **No `PUBLISHED_VERSION` flip.** It stays `^0.2.1` until 0.3.0 is live on npm `latest`; flipping before publish would make the deployed registry advertise an unpublished version and break `npx shadcn add`. Documented post-publish follow-up. - No version bump — `packages/ui` and `apps/registry` are already `0.3.0`. ## Verification Count guard simulated against the real files (no local `node_modules` in the branch worktree; CI runs the real suite): - newest `CHANGELOG.md` count snapshot = **309** == `registry.items.length` - `home/{en,fr}.mdx` count claims all = **309** - PWA manifest derives from the registry (unchanged on `main`) ## Release sequence after this merges 1. Merge this PR (canary republishes `0.3.0-canary.<sha>`). 2. **Actions → Publish → Run workflow** on `main` → tags `v0.3.0`, publishes `--tag latest`, GitHub Release. 3. Post-publish PR: flip `PUBLISHED_VERSION` → `0.3.0` + regenerate registry (drift/integrity guards verify it). --------- Co-authored-by: bntvllnt <bntvllnt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The site reported two different component counts:
/ai,/vs/shadcn,llms.txt,llms-full.txtgetComponentCount()=registry.items.length[Unreleased], PWA manifest, MCP server instructions,home/{en,fr}.mdxRoot cause: two sources of truth. The live count auto-updates from
registry.json; the hardcoded225is copy-pasted prose that drifted as ~84 components were added.What changed
app/manifest.ts,app/mcp/route.ts— derive the count from the registry (getComponentCount()/REGISTRY.items.length). These can no longer drift.CHANGELOG.md[Unreleased],home/{en,fr}.mdx— bump225→309. The changelog snapshot is intentionally a release-time value (parsed bylib/changelog.tsas a "up from N" stat), so it stays a literal but is now guarded.apps/registry/lib/component-count.test.ts— regression guard: fails when the changelog[Unreleased]count, either home MDX, or the manifest description diverges fromregistry.items.length. Verified it goes red on the stale225and green on309.Notes / out of scope
content/pages/home/{en,fr}.mdxappear orphaned — the locale homepage renders<Landing/>(React), not this MDX, and/llms-full.txtreads a non-existentcontent/pages/home.mdx. Updated in place rather than deleted (Chesterton's fence); orphan cleanup can be a follow-up.(up from 140)delta in the changelog is left untouched.Validation
vitest run— 34/34 pass (incl. new guard); RED proof confirmed on stale valuetsc --noEmit— cleaneslint(changed files) — cleanCloses #449