Skip to content

Commit 2050147

Browse files
samutpraclaude
andcommitted
docs(design): add component coverage checklist
Checklist view of the component inventory, complementing components.md. - Add .planning/design/system/component-checklist.md: all 45 built components (21 primitives + 24 app-level) as checked items, grouped by category, plus 9 verified gaps (unbuilt primitives) with their current raw workaround, and a "when adding a component" checklist. - Correct the earlier miscount: the inventory is 45 components (24 app-level), not 41/20. components.md body already listed all 24; only the summary count was off. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 31da589 commit 2050147

1 file changed

Lines changed: 120 additions & 0 deletions

File tree

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Carmen Platform — Component Coverage Checklist
2+
3+
> Checklist view of the design-system component inventory. For full descriptions and the
4+
> page-pattern map, see **[`components.md`](./components.md)**. Verified from
5+
> `src/components/` on 2026-07-17.
6+
>
7+
> - `[x]` = built and in use.
8+
> - `[ ]` = **not yet in the system** — a primitive an admin dashboard commonly needs but
9+
> this repo doesn't have (see *Gaps* at the bottom for the current workaround).
10+
>
11+
> **Coverage: 45 built** — 21 shadcn primitives + 24 app-level.
12+
13+
---
14+
15+
## Primitives — `src/components/ui/` (21) ✅
16+
17+
**⚠️ Do not modify without an explicit reason (repo rule 2).**
18+
19+
- [x] Avatar — `avatar.tsx`
20+
- [x] Badge — `badge.tsx` (status: `success`/`warning`/`info`/`secondary`/`destructive`)
21+
- [x] Button — `button.tsx` (CVA variants + `size="icon"`)
22+
- [x] Card — `card.tsx` (flat `bg-card` + 1px border)
23+
- [x] ChipInput — `chip-input.tsx`
24+
- [x] ConfirmDialog — `confirm-dialog.tsx` (replaces `window.confirm()`)
25+
- [x] DataTable — `data-table.tsx` (TanStack v8, server-side, auto `#` column)
26+
- [x] DevDebugSheet — `dev-debug-sheet.tsx` (dev-only)
27+
- [x] Dialog — `dialog.tsx`
28+
- [x] DropdownMenu — `dropdown-menu.tsx`
29+
- [x] Input — `input.tsx`
30+
- [x] JsonViewer — `json-viewer.tsx`
31+
- [x] Label — `label.tsx`
32+
- [x] Select — `select.tsx`
33+
- [x] Separator — `separator.tsx`
34+
- [x] Sheet — `sheet.tsx`
35+
- [x] Skeleton — `skeleton.tsx`
36+
- [x] Table — `table.tsx`
37+
- [x] Tabs — `tabs.tsx`
38+
- [x] Textarea — `textarea.tsx`
39+
- [x] Tooltip — `tooltip.tsx`
40+
41+
## Layout & navigation (4) ✅
42+
43+
- [x] Layout — `Layout.tsx` (shell, sidebar state, breadcrumb bar, nav registry)
44+
- [x] Sidebar — `Sidebar.tsx` (desktop fixed + mobile Sheet drawer)
45+
- [x] Breadcrumbs — `Breadcrumbs.tsx`
46+
- [x] PageHeader — `PageHeader.tsx`
47+
48+
## Access control (2) ✅
49+
50+
- [x] PrivateRoute — `PrivateRoute.tsx` (route guard)
51+
- [x] Can — `Can.tsx` (inline permission gate)
52+
53+
## Data display & state (5) ✅
54+
55+
- [x] TableSkeleton — `TableSkeleton.tsx`
56+
- [x] EmptyState — `EmptyState.tsx`
57+
- [x] ReadOnlyField — `ReadOnlyField.tsx`
58+
- [x] VersionBadge — `VersionBadge.tsx`
59+
- [x] DialogPreview — `DialogPreview.tsx`
60+
61+
## Forms & inputs — app-level (8) ✅
62+
63+
- [x] SearchInput — `SearchInput.tsx` (debounced 400ms)
64+
- [x] BusinessUnitMultiSelect — `BusinessUnitMultiSelect.tsx`
65+
- [x] UserMultiSelect — `UserMultiSelect.tsx`
66+
- [x] PermissionPicker — `PermissionPicker.tsx`
67+
- [x] MarkdownEditor — `MarkdownEditor.tsx`
68+
- [x] XmlEditor — `XmlEditor.tsx` (CodeMirror 6)
69+
- [x] ImageUpload — `ImageUpload.tsx`
70+
- [x] BrandingImageUpload — `BrandingImageUpload.tsx`
71+
72+
## Feedback & overlays — app-level (1) ✅
73+
74+
- [x] KeyboardShortcuts — `KeyboardShortcuts.tsx` (`⌘K`/`⌘S`/`Esc`/`?`)
75+
76+
> Toast is `sonner` (external, wired in `App.tsx`). ConfirmDialog / Dialog / Sheet / Tooltip
77+
> are primitives above.
78+
79+
## Domain-specific cards (4) ✅
80+
81+
- [x] InterfaceEntitlementCard — `InterfaceEntitlementCard.tsx`
82+
- [x] TenantMigrationCard — `TenantMigrationCard.tsx`
83+
- [x] TenantSeedCard — `TenantSeedCard.tsx`
84+
- [x] DbConnectionView — `DbConnectionView.tsx`
85+
86+
---
87+
88+
## Gaps — not yet in the system (unbuilt)
89+
90+
Common shadcn/admin-dashboard primitives this repo does **not** have. Each note shows the
91+
current workaround, so adding one is an extraction, not net-new UX.
92+
93+
- [ ] **Checkbox** — no `ui/checkbox.tsx`. Currently **raw `<input type="checkbox">` in 16
94+
files** (row selection, "Active only" filters, form toggles). *Strongest candidate to
95+
extract* — most-repeated raw element, would unify focus/disabled/indeterminate styling.
96+
- [ ] **Switch / Toggle** — no primitive. Boolean toggles use raw checkboxes or buttons.
97+
- [ ] **Accordion / Collapsible** — no shared primitive, though `tailwind.config.js` already
98+
ships accordion keyframes and `ApplicationEdit.tsx` rolls its own collapsible module list.
99+
- [ ] **RadioGroup** — no primitive (single-choice fields use Select instead).
100+
- [ ] **Popover** — no standalone primitive (Dropdown/Tooltip cover most cases).
101+
- [ ] **Alert / inline banner** — no primitive; inline errors use `text-destructive` text +
102+
toast for transient messages.
103+
- [ ] **Progress** — no primitive (streaming cards use custom UI).
104+
- [ ] **Command / Combobox** — no primitive; `⌘K` search is custom in `KeyboardShortcuts`.
105+
- [ ] **DatePicker / Calendar** — no primitive; native `<input type="date">` (1 file).
106+
107+
> These are **candidates, not a mandate.** Only extract a primitive when a second use site
108+
> appears or the raw pattern drifts. Checkbox (16 raw usages) is the one with a clear case today.
109+
110+
---
111+
112+
## When adding a component
113+
114+
- [ ] Lives in `src/components/ui/` (primitive) or `src/components/` (app-level composite)?
115+
- [ ] Uses **semantic tokens only** — no hardcoded hex, no raw Tailwind color scales, no raw
116+
green for status (`<Badge variant>` instead). See [`tokens.md`](./tokens.md).
117+
- [ ] Radius via `rounded-lg`/`md`/`sm`; spacing on the 4px grid.
118+
- [ ] Works in **both light and dark** (semantic tokens flip automatically).
119+
- [ ] Co-located `*.test.tsx` (RTL, behavior not snapshots) — repo rule 18.
120+
- [ ] Added to `components.md` + this checklist.

0 commit comments

Comments
 (0)