docs(admin-web): note deferred phase-2 shadcn-layer migration

This commit is contained in:
saravanakumardb1 2026-05-29 13:07:27 -07:00
parent 42aaea03e5
commit b2539f21d0

View File

@ -113,3 +113,35 @@ _(record `pnpm --filter @bytelyst/admin-web test:e2e` passed/failed here; each w
| Item | Reason (surface/data gate) | Follow-up | | Item | Reason (surface/data gate) | Follow-up |
| ------------ | -------------------------- | --------- | | ------------ | -------------------------- | --------- |
| _(none yet)_ | | | | _(none yet)_ | | |
---
## Phase 2 (FUTURE — do NOT start in this run)
> Tracked here so it isn't lost. **Out of scope for the phase-1 run above.** Do not begin any of
> this without an explicit, separate delegation — it is large and high-risk.
**Goal:** migrate the local shadcn `src/components/ui/*` layer (~16 radix-based components: `button`,
`badge`, `dialog`, `dropdown-menu`, `select`, `tabs`, `tooltip`, `switch`, `slider`, `progress`,
`avatar`, `label`, `separator`, `sheet`, …) onto shared `@bytelyst/ui` equivalents via the
`Primitives.tsx` adapter, retiring the bespoke radix wrappers.
**Why it's deferred:**
- Touches nearly all ~45 surfaces (every page imports shadcn primitives) → enormous blast radius.
- Behavioral parity risk: shadcn variants, `class-variance-authority` styling, and radix a11y
semantics must be matched 1:1 or admin workflows regress.
- Should be done component-by-component behind the wave-1 token bridge, each with snapshot/interaction
tests, not as a big-bang swap.
**Suggested sequencing (when scheduled):**
1. Bridge first (done in phase-1 UX-1) so shared components already theme correctly.
2. Migrate leaf primitives with no children first (`badge`, `label`, `separator`, `avatar`).
3. Then form controls (`input`, `select`, `switch`, `slider`) with submit/interaction tests.
4. Then overlays (`dialog`, `dropdown-menu`, `tooltip`, `sheet`) — verify focus-trap/Esc/scroll-lock.
5. Delete each shadcn wrapper only once all its importers are migrated and the drift ratchet passes.
6. One component per commit; keep `test:coverage` and `size:check` green throughout.
**Acceptance:** local `src/components/ui/*` shadcn wrappers removed (or reduced to thin re-exports of
the adapter), all surfaces visually + behaviorally unchanged, coverage and bundle budgets held.