Andrew Beveridge ☄️ and Claude Opus 4.6
bcbbb7865f
fix: prevent false 'No audio sources found' on search failure ( #620 )
...
## Summary
- Fix misleading "No audio sources found" message that appeared when
audio search failed (timeout, network error, 5xx) instead of showing an
error
- Replace scattered boolean/string state with explicit `SearchStatus`
state machine so the no-results message can only appear after a
confirmed successful search
- Add automatic retry (up to 3 attempts with backoff) for transient
failures
## Changes
- **State machine:** Replace `isSearching`, `error`, `isCreditError`
with single `SearchStatus` discriminated union (`searching | succeeded |
failed`)
- **Retry logic:** Auto-retry network errors, timeouts, and 5xx up to 3
times with 2s/4s backoff delays. 4xx errors (auth, credits) fail
immediately
- **Spinner feedback:** Show "Retry 1 of 2" / "Retry 2 of 2" during
retries
- **Fuzzy accept:** Route through `doSearch` via useEffect instead of
inline API call, so corrected searches also get retry protection
- **Tests:** 5 new tests covering the core bug fix, retry behavior, and
error classification
- **Docs:** Added lesson learned about state conflation pattern
## Testing
- [x] 20/20 unit tests pass (15 existing + 5 new)
- [x] 712/712 full suite tests pass
- [x] TypeScript compiles cleanly
- [x] Production flacfetch verified healthy (v0.19.5, all providers up)
## Review
- [x] Local CodeRabbit review completed (no findings)
- [x] Two-stage review (spec compliance + code quality) during
implementation
@coderabbitai ignore
---
🤖 Generated with [Claude Code](https://claude.com/claude-code )
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-27 14:44:27 -04:00
..
2025-12-29 23:22:05 -05:00
2025-12-31 14:15:51 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 04:06:05 -05:00
2025-12-28 12:05:27 -05:00
2025-12-29 15:25:50 -05:00
2025-12-29 13:32:00 -05:00
2025-12-29 23:31:27 -05:00
2025-12-30 00:36:25 -05:00
2025-12-30 01:39:30 -05:00
2025-12-30 15:00:42 -05:00
2025-12-30 20:05:28 -05:00
2025-12-30 22:50:16 -05:00
2025-12-30 17:24:52 -05:00
2025-12-31 16:13:46 -05:00
2025-12-31 00:06:57 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2026-01-19 16:53:34 +00:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2026-01-19 16:53:34 +00:00
2026-01-19 16:53:34 +00:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2026-01-19 16:53:34 +00:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2025-12-28 02:43:02 -05:00
2026-01-01 15:42:24 -05:00
2026-01-04 11:07:16 -05:00
2026-01-07 23:10:35 -05:00
2026-01-08 15:30:53 -05:00
2026-01-08 00:53:17 -05:00
2026-01-08 16:39:56 -05:00
2026-01-19 00:29:10 -08:00
2026-01-09 19:11:50 -05:00
2026-01-19 00:29:10 -08:00
2026-01-21 20:42:26 -08:00
2026-01-23 03:25:35 +00:00
2026-01-26 18:45:04 -08:00
2026-02-02 22:48:57 -08:00
2026-02-10 14:21:14 -05:00
2026-02-24 18:07:57 -05:00
2026-02-28 21:43:18 +00:00
2026-03-01 02:58:50 -05:00
2026-03-01 02:58:50 -05:00
2026-03-01 02:58:50 -05:00
2026-03-01 02:58:50 -05:00
2026-03-01 02:58:50 -05:00
2026-03-01 02:58:50 -05:00
2026-03-01 23:35:54 -05:00
2026-03-02 18:54:38 -05:00
2026-03-03 14:31:26 -05:00
2026-03-03 20:19:26 +00:00
2026-03-04 15:16:28 -05:00
2026-03-04 11:44:23 -05:00
2026-03-04 21:04:36 -05:00
2026-03-04 18:47:08 -05:00
2026-03-05 00:40:09 -05:00
2026-03-05 13:12:04 -05:00
2026-03-06 19:06:51 -05:00
2026-03-07 02:23:38 -05:00
2026-03-08 00:23:42 -05:00
2026-03-09 11:59:04 -04:00
2026-03-08 20:31:13 -04:00
2026-03-08 20:31:13 -04:00
2026-03-08 20:31:13 -04:00
2026-03-08 20:31:13 -04:00
2026-03-09 11:59:04 -04:00
2026-03-08 22:57:03 -04:00
2026-03-08 04:40:35 -04:00
2026-03-08 04:40:35 -04:00
2026-03-08 04:40:35 -04:00
2026-03-09 18:04:13 -04:00
2026-03-10 01:16:43 -04:00
2026-03-15 16:19:59 -04:00
2026-03-19 16:15:01 -04:00
2026-03-21 00:04:26 -04:00
2026-03-21 01:51:44 -04:00
2026-03-21 16:15:52 +00:00
2026-03-21 16:15:52 +00:00
2026-03-21 16:15:52 +00:00
2026-03-22 22:20:55 -04:00
2026-03-26 17:37:59 +00:00
2026-03-25 14:36:03 -04:00
2026-03-25 22:36:31 +00:00
2026-03-26 15:13:51 -04:00
2026-03-26 15:13:51 -04:00
2026-03-27 14:44:27 -04:00
2026-03-27 14:44:27 -04:00
2026-03-27 12:14:32 -04:00