#85

fix(ui): only offer retry when lyrics lookup can recover

OpenJustMarkDevwants to merge intofrom

Fixes #81.

A definitive provider miss (lrc.red returned nothing and the miss was cached as mode "missing") rendered a Try again button even though retrying returns the same miss. The missing state now shows "No lyrics found." plus guidance (check the song title, or clear saved lyrics in Settings) with no button.

Untouched: transient-error mode keeps the Try again button, automatic backoff retries, and restart/seek recovery for both modes.

The miss-vs-error distinction is reliable: the cache returns null for a cached miss vs undefined for unknown, invoke returning null maps to missing, and only an invoke throw maps to error.

Validation: vp test run (87 passed) and vp check (format + lint/type clean).

Activity

9
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]1mo ago

Review · c576655

⚠️ 1 open findings

Removes the Try again button for definitive provider misses and shows guidance instead, while keeping retry for transient errors. The biggest risk is the new hint names a recovery that does not refetch on its own.

Confidence: 3/5 — The miss-vs-error split is sound and covered, but the hint misdirects the recovery path.

FindingLocation
🆕 🟡 MediumMissing-state hint promises a re-search that clearing never triggerssrc/lyrics.ts:94
Prompt for all open findings
  • In src/lyrics.ts around lines 92-95, fix the missing-state hint so it names a recovery that actually refetches: restarting/seeking calls retryLyricsForCurrentSong (forget plus loadLyrics), while clearing saved lyrics alone only calls lyricCache.clear() with no loadLyrics (see src/main.ts clearLyricsCache, the #clear-lyrics-cache handler, and pollMedia which only refetches on a new variant or restart/seek); update the hint string and the lyrics.test.ts assertion matching /clear saved lyrics/i.
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]1mo ago

Review · 2cb1586

✅ No blocking issues

Removes Try again for definitive provider misses while keeping it for transient errors. The remaining risk was the hint misdirecting recovery, now fixed to name restart/seek.

Confidence: 5/5 — The miss-vs-error split matches the backend and cache semantics and is covered by tests.

FindingLocation
✅ FixedMissing-state hint promised a re-search that clearing never triggerssrc/lyrics.ts:94