Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions docs/registry/audit-2026-07-29.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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 <span> 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 <span> + 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 <span> 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=<span>",
"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."
}
}
}
29 changes: 26 additions & 3 deletions registry/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<date>.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-<id>": {
"showcase-category": "shim",
"consumer-path": "registry/base-nova/ds-<id>/ds-<id>.tsx",
"showcase-path": "packages/registry/src/components/<id>/index.tsx",
"workspace-source-path": "packages/ui/src/components/<id>.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)

Expand Down Expand Up @@ -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).
Loading