Commit d2f4527
committed
fix(frontend): NaN errors and AnimatePresence warnings (#154)
Bug fixes:
1. NaN/division by zero - Added safe value guards in IndexingProgress
- safePercent, safeFilesProcessed, safeFilesTotal, safeFunctionsFound
- Shows 'Starting...' when filesTotal is 0
- Stats show '—' instead of NaN/0/0
2. AnimatePresence warnings - Moved error state inside AnimatePresence
- Error state now has proper key and exit animation
- Visibility conditions properly exclude simultaneous renders
- Changed error styling from red to amber (friendlier)
3. Session state - Error states now properly clear other states
- showUrlInput excludes error state
- showValidation excludes error state
- showIndexing excludes wsHasError
Closes #1541 parent 6bf8439 commit d2f4527
2 files changed
Lines changed: 66 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | | - | |
174 | | - | |
175 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
176 | 177 | | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
353 | 383 | | |
354 | 384 | | |
355 | 385 | | |
| |||
407 | 437 | | |
408 | 438 | | |
409 | 439 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | 440 | | |
431 | 441 | | |
432 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
271 | 280 | | |
272 | | - | |
273 | | - | |
| 281 | + | |
| 282 | + | |
274 | 283 | | |
275 | 284 | | |
276 | 285 | | |
| |||
287 | 296 | | |
288 | 297 | | |
289 | 298 | | |
290 | | - | |
| 299 | + | |
291 | 300 | | |
292 | 301 | | |
293 | 302 | | |
| |||
308 | 317 | | |
309 | 318 | | |
310 | 319 | | |
311 | | - | |
| 320 | + | |
312 | 321 | | |
313 | 322 | | |
314 | 323 | | |
315 | 324 | | |
316 | | - | |
| 325 | + | |
317 | 326 | | |
318 | 327 | | |
319 | 328 | | |
| |||
323 | 332 | | |
324 | 333 | | |
325 | 334 | | |
326 | | - | |
| 335 | + | |
327 | 336 | | |
328 | 337 | | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
336 | 358 | | |
337 | 359 | | |
338 | 360 | | |
| |||
0 commit comments