Skip to content

Lyric clicks land on their line; lyrics are found for more songs; no Retry button - #9

Merged
ctimothe merged 2 commits into
dynamic-island-parityfrom
fix/lyric-seek-and-coverage
Sep 21, 2026
Merged

ctimothe merged 2 commits into
dynamic-island-parityfrom
fix/lyric-seek-and-coverage

Conversation

@ctimothe

Copy link
Copy Markdown
Owner

What the owner sent

A lock screen recording from 2026-09-21, with three notes:

  • "No lyrics found" came with a truncated "R…" button that Apple wouldn't show.
  • Clicking a lyric line made the words glitch, on the lock card and in the island.
  • Songs that do have lyrics were showing none.

Findings and fixes

The lyric-click glitch. Frame by frame, a clicked line lit up, the words fell back to the previous line, then moved forward again. Every seek left the app in whole seconds, as seek 105 for 105.72 and set player position to 105. So a line starting 0.7 s into its second was sought 0.7 s early, onto the line before it. Changes:

  • Both routes now seek to the millisecond, formatted in the POSIX locale.
  • The click target aims 0.12 s into the line, up from 0.02 s, so a player landing slightly short still lights the right line.
  • On a jump of more than one line, the lock card's lyric window cuts to the new place instead of crossfading every row, which had drawn two lyrics in one slot.

Coverage. The exact LRCLIB query needs title, artist, album and duration to agree, and Spotify's album names often differ. When it misses:

  • LRCLIB search is asked with the title and artist, then with the edition and featured artists removed.
  • A timed match is taken when the title and main artist agree and the length is within 3 s, the closest winning.
  • Misses cached from the exact query alone are asked again.

Against the real catalogue, "waltz", "We Say Goodbye" and "I Bet on Losing Dogs" now come back with lyrics. "Micalong" genuinely isn't there. "Suzanne" and "dead horse" have only untimed lyrics, which are still not shown as timed.

Retry. The lock card's Retry button is gone. A lookup that can't reach the service used to leave "Finding lyrics…" up forever. It now shows "No lyrics found." and retries on its own after 5 s, 30 s and 2 min.

Verification

  • ./scripts/check: all 11 steps pass locally, with 430 unit tests.
  • LRCLIB_LIVE=1 swift test --filter OnlineLyricsLiveTests found all three songs against the real service. This test is skipped in CI.
  • OfflineLyricsIsolationTests now holds both endpoints to lrclib.net over HTTPS.

🤖 Generated with Claude Code

Filmed on the lock card on 2026-09-21: click a line, and the words moved
to it, fell back to the line before, and moved forward again.

Every seek left the app in whole seconds — "seek 105" for a target of
105.72, and "set player position to 105" on the scripting route — so a
line starting 0.7s into its second was sought 0.7s early, onto the line
before it. The view showed the clicked line at once from the app's own
anchor, then followed the player's first reading back. Both routes now
carry the position to the millisecond, formatted in the POSIX locale so
the separator is a dot on every Mac; the helper already parsed a double.

The click target also aimed only 0.02s past the point the line lights,
enough for rounding and not for a player landing a few hundredths
short. It now aims 0.12s in, which still starts the audio ahead of the
voice, since the lyric lead already puts the jump before the line's
timestamp.

Tests: testSeekLineCarriesTheFraction, testALyricClickSurvivesAShortLanding.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ou to retry

Checked against LRCLIB on 2026-09-21: "waltz", "We Say Goodbye" and
"Spit" all have timed lyrics there, filed under albums Spotify does not
name, and each showed "No lyrics found". The exact query needs title,
artist, album and duration to agree. When it misses, LRCLIB's search is
now asked with the title and artist as the player names them, then with
the edition and the company set aside ("- 2023 Remaster", "(feat. …)",
"& The Warm Inventions"). A timed candidate is taken when its title and
main artist agree and its length is within three seconds, the closest
winning; untimed words are still never shown as timed. Against the real
catalogue, all three songs above now come back with their lyrics.
Misses remembered from the exact query alone are asked again.

The lock card's lyrics offered a Retry button that could not fit its
word ("R…", filmed). It is gone. A lookup that cannot reach the service
used to leave "Finding lyrics…" up for the whole song; it now reads as a
quiet "No lyrics found." and is asked again on its own after 5s, 30s and
2min while the song plays.

When the lock card's words jump more than a line, a seek rather than
singing, the window now cuts to the new place instead of crossfading
every row at once, which laid two lyrics over each other in the same
slot.

Tests: OnlineLyricsSearchTests, testAFailedLookupShowsAMissAndAsksAgainByItself,
OfflineLyricsIsolationTests (both endpoints on one host over TLS), and
OnlineLyricsLiveTests (LRCLIB_LIVE=1 only; never in CI).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ctimothe
ctimothe merged commit c616ca4 into dynamic-island-parity Sep 21, 2026
1 check passed
@ctimothe
ctimothe deleted the fix/lyric-seek-and-coverage branch September 21, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants