Glide the progress indicator through blends instead of snapping - #105
Merged
sanylax0 merged 1 commit intoJul 19, 2026
Merged
Conversation
At deck promotion the displayed progress jumped from the outgoing track's fraction to the incoming track's — jarring on skips and natural transitions alike. New Player.displayProgress morphs between the two fractions weighted by the blend progress, so by the moment the decks swap the shown value already equals the incoming fraction; the Now Playing ring and mini-player line both use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
During any blend (smooth skip or natural end-of-track transition), the progress ring and mini-player line snapped from the outgoing track's percentage to the incoming track's the instant the decks swapped.
How
New
Player.displayProgress: while a transition is in flight, it interpolates between the outgoing fraction (position / duration) and the incoming fraction (incomingStartOffset + idle deck elapsed, over the incoming duration), weighted bytransitionProgress. The morph tracks the audible blend exactly — by the momentfinishTransitionpromotes the decks, the displayed value already equals the incoming fraction, so the handoff is continuous. Outside transitions it's identical to before.TrackProgressRing(Now Playing) andMiniProgressLine(mini player) both read it; the scrubber (sheet mode) intentionally keeps showing the outgoing track's real position.Hard cuts (paused skip, sub-1s-remaining skip) still jump — matching the audio, which also cuts.
Testing
On device: skip mid-song — the ring should sweep smoothly from the outgoing percentage to the incoming track's starting point over the 5 s blend, no snap at the end; same on natural transitions; normal playback and scrubbing unchanged.
🤖 Generated with Claude Code
https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP
Generated by Claude Code