Skip to content

Commit 2dd694e

Browse files
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

‎README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ debate-navigator/
494494
│ │ └── ...
495495
│ │
496496
│ ├── hooks/
497-
│ │ ├── use-mobile.tsx # Responsive detection
498497
│ │ ├── use-speech-to-text.ts # Voice input
499498
│ │ └── use-toast.ts # Notifications
500499
│ │

0 commit comments

Comments
 (0)