diff --git a/docs/registry/audit-2026-07-29.json b/docs/registry/audit-2026-07-29.json index 36fa1fd..55addbb 100644 --- a/docs/registry/audit-2026-07-29.json +++ b/docs/registry/audit-2026-07-29.json @@ -1,8 +1,9 @@ { "$schema": "./audit-schema-not-yet-defined.json", - "audit-version": "2026-07-29", + "audit-version": "2026-07-29-b", "audit-source": "manual-inspection-of-files", "tolerance-policy-ref": "../plans/2026-07-29-drift-detection.md", + "last-revised": "2026-07-29 — post PR #3 merge: ds-colored-badge divergence fix (d90b7d9) + bg-blue-600 shade bump (e2e47a4) reflected here", "items": { "ds-button": { "showcase-category": "shim", @@ -58,19 +59,24 @@ "consumer-vs-workspace-styling" ], "behavioral-divergence-risk": "high", - "current-state": "color-classes-identical-but-base-element-and-shape-differ", - "concrete-divergence-observed": true, + "current-state": "color-classes-identical-after-d90b7d9+e2e47a4-base-classes-inlined-to-match", + "concrete-divergence-observed": false, + "concrete-divergence-resolved-by": [ + "d90b7d9 — consumer inlined workspace Badge class strings (BADGE_BASE + BADGE_OUTLINE constants) so the consumer's raw renders visually equivalent to the showcase's Badge primitive + variant=outline wrap", + "e2e47a4 — bumped 'blue' shade from bg-blue-500 to bg-blue-600 across both trees (manual align)" + ], "divergence-detail": { "showcase-renders": "Badge(variant=outline) + color overlay -> pill shape (rounded-4xl, h-5), focus ring present", - "consumer-renders": "raw + color overlay -> rounded-md, px-2.5 py-0.5, no focus ring", - "color-map-showcase-vs-consumer": "identical (8 keys, identical class strings)" + "consumer-renders": "raw with BADGE_BASE+OUTLINE+COLOR_CLASSES class strings -> equivalent visual classes to the showcase", + "color-map-showcase-vs-consumer": "identical (8 keys, identical class strings, blue=bg-blue-600/10, others=bg-{color}-500/10)", + "base-element-showcase-vs-consumer": "still different element (Badge vs span) but visually equivalent via inlined class strings" }, "per-check": { "color-map-showcase-vs-consumer": "strict-pass", - "base-element-showcase-vs-consumer": "FAIL — showcase=Badge primitive, consumer=", - "shape-showcase-vs-consumer": "FAIL — showcase=rounded-4xl+h-5, consumer=rounded-md+inline-flex" + "base-class-strings-showcase-vs-consumer": "structural-pass-via-inline", + "shape-showcase-vs-consumer": "equivalent-via-inline" }, - "recommended-fix": "make-ds-colored-badge-match-the-showcase-rendering-or-flip-the-direction-of-collapse-so-showcase-renders-the-consumer" + "recommended-fix": "n/a — current state ships in v1.1; if workspace Badge primitive updates, d90b7d9 comment notes this string must be re-pasted. Drift script will catch silent drift if either side moves." } } } diff --git a/registry/CONTRIBUTING.md b/registry/CONTRIBUTING.md index 8b9d713..bb166f9 100644 --- a/registry/CONTRIBUTING.md +++ b/registry/CONTRIBUTING.md @@ -71,6 +71,29 @@ These come from decisions documented in [`docs/plans/2026-07-29-shadcn-registry- ``` Then run `tsc --noEmit` from `apps/web/` to ensure the showcase site still compiles. +7. **Update `docs/registry/audit-.json`.** The CI `drift` job reads this file for per-item paths and classification (`showcase-shim` vs `showcase-structural`). Without an entry for your new item, the job exits non-zero with `no audit entry for X`. Minimum fields per item: + + ```json + { + "items": { + "ds-": { + "showcase-category": "shim", + "consumer-path": "registry/base-nova/ds-/ds-.tsx", + "showcase-path": "packages/registry/src/components//index.tsx", + "workspace-source-path": "packages/ui/src/components/.tsx" + } + } + } + ``` + + `workspace-source-path` is `null` if the workspace does not implement the component independently. If the drift checks in `apps/web/scripts/check-registry-drift.mjs` don't cover your item's structure yet, extend the script with a per-item check — the script fails closed for un-audited items rather than silently skipping them. +8. **Run the drift script locally** to confirm the new item's two trees are aligned: + + ```sh + node apps/web/scripts/check-registry-drift.mjs + ``` + + If the script flags drift between your new item and its showcase counterpart, fix one side before pushing — drift between what the showcase displays and what consumers install is the user-facing bug this script exists to prevent. ## Adding a block (later) @@ -104,8 +127,8 @@ npm run registry:build --workspace web # Validate the catalog against the shadcn schema npx --yes shadcn@latest registry validate "deessejs/ui#$(git branch --show-current)" -# Type-check the showcase site -cd apps/web && npx tsc --noEmit +# Run the drift-detection script against the consumer and showcase trees +node apps/web/scripts/check-registry-drift.mjs ``` -CI runs all three on every push and PR. +CI runs all three on every push and PR (alongside lint, typecheck, the Phase 4 contract test, and a full build-showcase job).