Repository navigation
Commit 3faccce
chore: remove dead code and tautological tests
Dead code (zero references anywhere, including tests):
- src/lib/ai/prompts/index.ts (165 lines) — prompt building moved
server-side to supabase/functions/_shared/prompts.ts
- useKeyboardShortcuts, useResolvedTheme hooks
- isUrlSafe (validateUrl is the live entry point)
- requireAdmin in _shared/auth.ts — admin/index.ts does its own
inline user_roles lookups
- getAppRedirectUrl in native.ts
- mockSparringResponse/mockSparringScore aliases
- buildSearchQueries wrapper — inlined the one-line .map into its
two callers, which were both tests
Tests that assert nothing about our code:
- example.test.ts: expect(true).toBe(true)
- utils.test.ts: 11 tests over cn(), a one-line clsx+tailwind-merge
pass-through — tested the libraries, not us
- providers.test.ts: 14 of 15 tests re-asserted that a static const
is still a static const; kept the duplicate-model-ID check, which
guards real routing behavior
- i18n.test.ts: "locale has keys" tautologies and a key-count check
subsumed by the bidirectional key-set comparisons
- export-utils-extended.test.ts: 6 "typeof x === function" tests
- pages/HistoryPage smoke tests asserting document.body is defined
- settings-store-branches: the `afterRehydrate(undefined)` call
existed only to hit an `if (!state) return` line
Preserved deliberately: setActiveEnv/IS_STAGING in supabase/env.ts
(reserved by plans/supabase-staging.md for the admin env switcher),
and security-hardening/runtime-contracts/vercel-deployment-config
tests, which guard invariants from PRs #26/#27.
Verified: 921 tests pass, lint clean, tsc clean, build succeeds,
coverage thresholds still met (statements 90.45/90, branches
82.91/80, functions 91.46/89, lines 94.04/90).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 79b65ca commit 3faccce
18 files changed
Lines changed: 8 additions & 533 deletions
File tree
- src
- hooks
- lib
- ai
- prompts
- providers
- validation
- test
- pages
- stores
- supabase/functions
- ai
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
512 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 228 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 35 | | |
53 | 36 | | |
54 | 37 | | |
| |||
100 | 83 | | |
101 | 84 | | |
102 | 85 | | |
103 | | - | |
| 86 | + | |
104 | 87 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 88 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 89 | | |
113 | 90 | | |
114 | 91 | | |
| |||
124 | 101 | | |
125 | 102 | | |
126 | 103 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 104 | | |
133 | 105 | | |
134 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 117 | | |
0 commit comments