Skip to content

Commit dcf1d96

Browse files
authored
chore: delete 23 unused shadcn/ui components and 17 orphaned deps (#34)
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 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 on main fe679fd, from a clean npm ci: docs:check, lint, typecheck, 955 unit tests, 121 edge tests, build, and 126 Chromium e2e tests pass. Selected coverage scope excludes src/components/ui, so thresholds are unaffected.
1 parent 3857ca5 commit dcf1d96

30 files changed

Lines changed: 1 addition & 3195 deletions

‎package-lock.json‎

Lines changed: 0 additions & 439 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,11 @@
4040
"@jam.dev/sdk": "^1.0.1",
4141
"@radix-ui/react-accordion": "^1.2.11",
4242
"@radix-ui/react-alert-dialog": "^1.1.14",
43-
"@radix-ui/react-aspect-ratio": "^1.1.7",
44-
"@radix-ui/react-avatar": "^1.1.10",
4543
"@radix-ui/react-checkbox": "^1.3.2",
46-
"@radix-ui/react-collapsible": "^1.1.11",
47-
"@radix-ui/react-context-menu": "^2.2.15",
4844
"@radix-ui/react-dialog": "^1.1.14",
49-
"@radix-ui/react-dropdown-menu": "^2.1.15",
50-
"@radix-ui/react-hover-card": "^1.1.14",
5145
"@radix-ui/react-label": "^2.1.7",
52-
"@radix-ui/react-menubar": "^1.1.15",
53-
"@radix-ui/react-navigation-menu": "^1.2.13",
5446
"@radix-ui/react-popover": "^1.1.14",
5547
"@radix-ui/react-progress": "^1.1.7",
56-
"@radix-ui/react-radio-group": "^1.3.7",
5748
"@radix-ui/react-scroll-area": "^1.2.9",
5849
"@radix-ui/react-select": "^2.2.5",
5950
"@radix-ui/react-separator": "^1.1.7",
@@ -62,8 +53,6 @@
6253
"@radix-ui/react-switch": "^1.2.5",
6354
"@radix-ui/react-tabs": "^1.1.12",
6455
"@radix-ui/react-toast": "^1.2.14",
65-
"@radix-ui/react-toggle": "^1.1.9",
66-
"@radix-ui/react-toggle-group": "^1.1.10",
6756
"@radix-ui/react-tooltip": "^1.2.7",
6857
"@sentry/react": "^10.65.0",
6958
"@stripe/stripe-js": "^8.7.0",
@@ -77,16 +66,13 @@
7766
"caniuse-lite": "^1.0.30001766",
7867
"class-variance-authority": "^0.7.1",
7968
"clsx": "^2.1.1",
80-
"cmdk": "^1.1.1",
8169
"date-fns": "^3.6.0",
8270
"docx": "^9.5.1",
83-
"embla-carousel-react": "^8.6.0",
8471
"file-saver": "^2.0.5",
8572
"framer-motion": "^12.31.0",
8673
"html-to-image": "^1.11.13",
8774
"i18next": "^23.16.8",
8875
"i18next-browser-languagedetector": "^8.0.4",
89-
"input-otp": "^1.4.2",
9076
"jspdf": "^4.1.0",
9177
"jspdf-autotable": "^5.0.7",
9278
"lucide-react": "^0.462.0",
@@ -95,21 +81,18 @@
9581
"pdfjs-dist": "^6.3.289",
9682
"posthog-js": "^1.399.2",
9783
"react": "^18.3.1",
98-
"react-day-picker": "^8.10.1",
9984
"react-dom": "^18.3.1",
10085
"react-hook-form": "^7.61.1",
10186
"react-i18next": "^15.4.1",
10287
"react-joyride": "^2.9.3",
10388
"react-markdown": "^9.0.1",
104-
"react-resizable-panels": "^2.1.9",
10589
"react-router-dom": "^7.18.3",
10690
"react-window": "^2.2.5",
10791
"reactflow": "^11.11.4",
10892
"recharts": "^2.15.4",
10993
"sonner": "^1.7.4",
11094
"tailwind-merge": "^2.6.0",
11195
"tailwindcss-animate": "^1.0.7",
112-
"vaul": "^0.9.9",
11396
"zod": "^4.3.6",
11497
"zustand": "^5.0.10"
11598
},

‎src/components/ui/aspect-ratio.tsx‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎src/components/ui/avatar.tsx‎

Lines changed: 0 additions & 38 deletions
This file was deleted.

‎src/components/ui/breadcrumb.tsx‎

Lines changed: 0 additions & 86 deletions
This file was deleted.

‎src/components/ui/calendar.tsx‎

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)