Commit 5fbbee6
committed
Phase 23 Part 2A: Major Type Error Fixes (111 → 78 errors)
Fixed major categories of TypeScript errors:
**Type System Enhancements:**
- Added missing AI types: RecommendationRequest, Anomaly, AnomalyDetectionRequest/Report, SmartGroupingRequest/Result
- Added UserStats type to admin.ts
- Expanded SystemStats with completed_tasks, failed_tasks, total_storage fields
- Extended ParameterRecommendation.basedOn with similarProjects, bestPractices, publicDatasets
**Component Fixes:**
- Dashboard.tsx: Fixed data reference, added statsService import
- ResultList.tsx: Fixed pagination hook usage (page/pageSize → pagination.current/pageSize)
- ResultList.tsx: Changed resultsData.results → resultsData.items (PaginatedResponse)
- ParameterRecommendation.tsx: Added null coalescing for overallConfidence
- AdminDashboard.tsx: Added optional chaining for storage fields
**Import & Variable Cleanup:**
- Removed unused variables: Title, error, result, info, handleUpload
- Fixed message import from type to value in FileList.tsx
- Removed StaggeredList from TaskList.tsx
**API Method Corrections:**
- resultService.getResults → resultService.getAll
- Fixed pagination.onChange, pagination.reset usage
**Build Progress:**
- TypeScript errors: 111 → 78 (30% reduction)
- Systematic error categorization and fixing
- Improved type safety across admin and AI features
Next: Fix remaining 78 errors (component prop types, unused variables, filter types)1 parent 6930e17 commit 5fbbee6
File tree
10 files changed
+158
-182
lines changed- frontend/src
- components/ai
- pages
- admin
- dashboard
- files
- results
- settings
- tasks
- types
10 files changed
+158
-182
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
144 | | - | |
145 | | - | |
146 | | - | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
| 161 | + | |
163 | 162 | | |
164 | 163 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 164 | + | |
170 | 165 | | |
171 | | - | |
| 166 | + | |
172 | 167 | | |
173 | 168 | | |
174 | 169 | | |
| |||
187 | 182 | | |
188 | 183 | | |
189 | 184 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 185 | + | |
195 | 186 | | |
196 | 187 | | |
197 | 188 | | |
| |||
222 | 213 | | |
223 | 214 | | |
224 | 215 | | |
225 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
| |||
246 | 241 | | |
247 | 242 | | |
248 | 243 | | |
249 | | - | |
250 | | - | |
| 244 | + | |
| 245 | + | |
251 | 246 | | |
252 | 247 | | |
253 | 248 | | |
| |||
270 | 265 | | |
271 | 266 | | |
272 | 267 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 268 | + | |
276 | 269 | | |
277 | 270 | | |
278 | 271 | | |
279 | | - | |
280 | | - | |
| 272 | + | |
281 | 273 | | |
282 | 274 | | |
283 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
17 | 8 | | |
18 | 9 | | |
19 | 10 | | |
| |||
27 | 18 | | |
28 | 19 | | |
29 | 20 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 21 | + | |
37 | 22 | | |
38 | 23 | | |
39 | 24 | | |
| |||
146 | 131 | | |
147 | 132 | | |
148 | 133 | | |
149 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
150 | 137 | | |
151 | 138 | | |
152 | 139 | | |
| |||
253 | 240 | | |
254 | 241 | | |
255 | 242 | | |
256 | | - | |
257 | | - | |
258 | | - | |
| 243 | + | |
259 | 244 | | |
260 | 245 | | |
261 | 246 | | |
| |||
276 | 261 | | |
277 | 262 | | |
278 | 263 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 264 | + | |
285 | 265 | | |
286 | 266 | | |
287 | 267 | | |
| |||
324 | 304 | | |
325 | 305 | | |
326 | 306 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 307 | + | |
334 | 308 | | |
335 | | - | |
336 | | - | |
337 | | - | |
| 309 | + | |
338 | 310 | | |
339 | 311 | | |
340 | 312 | | |
| |||
349 | 321 | | |
350 | 322 | | |
351 | 323 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 324 | + | |
356 | 325 | | |
357 | 326 | | |
358 | 327 | | |
| |||
371 | 340 | | |
372 | 341 | | |
373 | 342 | | |
374 | | - | |
375 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
376 | 346 | | |
377 | 347 | | |
378 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | | - | |
74 | | - | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| |||
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
85 | | - | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
96 | | - | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | | - | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | | - | |
110 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| |||
116 | 124 | | |
117 | 125 | | |
118 | 126 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| |||
401 | 409 | | |
402 | 410 | | |
403 | 411 | | |
404 | | - | |
405 | | - | |
| 412 | + | |
| 413 | + | |
406 | 414 | | |
407 | 415 | | |
408 | 416 | | |
| |||
0 commit comments