Repository navigation
Commit 2dd694e
committed
chore: delete 23 unused shadcn/ui components and 17 orphaned deps
None of these components were imported anywhere outside src/components/ui.
Two had an inbound reference, and both traced back to something also dead:
- toggle.tsx: only importer was toggle-group.tsx, itself unused
- skeleton.tsx: only importers were sidebar.tsx, itself unused, and a
one-assertion render test in ui.test.tsx
The other 21 had no importer at all. Checked for dynamic reachability with
`import(` rather than only `lazy(`: every dynamic import in the codebase is
an explicit page import in App.tsx or offline-route-preload.ts.
Removed the dependencies that only these components used. recharts stays:
AdminPage and SparringScorecard use it directly, only the shadcn chart.tsx
wrapper around it was dead.
Also cleans up everything the deletion orphaned:
- the Skeleton test block and import in ui.test.tsx
- src/hooks/use-mobile.tsx, whose only importer on main was sidebar.tsx
- the sidebar color scale in tailwind.config.ts and all 18 --sidebar-*
custom properties in index.css, which sidebar.tsx referenced 32 times and
nothing else uses: there are no bg-/text-/border-/ring-sidebar utilities
anywhere in src, e2e, or public
- the [cmdk-input] focus selector in index.css
- the @radix-ui/react-dropdown-menu entry in the vendor-radix manual chunk
- the use-mobile line in the README project structure
Noted but deliberately not touched: --chart-1 through --chart-5 in index.css
are also unused, but chart.tsx never referenced them and there is no tailwind
chart scale, so they were already dead on main rather than orphaned here.
Verified: lint, typecheck, 924 unit tests, 121 edge tests, build, and 126
Chromium e2e tests pass. Selected coverage scope excludes src/components/ui,
so the thresholds are unaffected.1 parent c7d3437 commit 2dd694e
31 files changed
Lines changed: 1 addition & 3196 deletions
File tree
- src
- components/ui
- hooks
- test/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | 497 | | |
499 | 498 | | |
500 | 499 | | |
| |||
0 commit comments