Skip to content

fix(phone): block stale pause progress writes during content reload - #241

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-management-0bcd
Draft

fix(phone): block stale pause progress writes during content reload#241
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-management-0bcd

Conversation

@cursor

@cursor cursor Bot commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Fixes a watch-progress corruption bug on the phone player during in-place content reloads (auto-advance, On Deck, version switch, subtitle recovery restart).

onPositionChanged already ignores samples while positionReportsBlockedForPendingLoad is set at the start of loadContent, but onPlayingChanged still called maybeRecordPosition(force=true) on every isPlaying=false edge without that guard.

After publishLoadingState retargets contentId to the next item, the previous Media3 item can still pause/stop and persist the old episode's position under the new item's (contentId, fileId) key.

Fix

Apply the same load-transition guard used by onPositionChanged before forcing a Track B progress write from onPlayingChanged.

Test plan

  • Auto-advance to next episode; pause or let the old player stop during the loading spinner; verify the next episode does not resume near the previous episode's timestamp
  • Switch versions in-place; repeat pause-during-load check
  • Normal pause/resume during stable playback still persists progress
Open in Web View Automation 

cursoragent and others added 2 commits August 22, 2026 11:08
onPositionChanged already ignores samples while a load transition has
positionReportsBlockedForPendingLoad set, but onPlayingChanged still
forced maybeRecordPosition on every isPlaying=false edge. After
publishLoadingState retargets contentId (auto-advance, On Deck, version
switch) the old Media3 item can still pause, writing the previous
episode's position under the next item's id/fileId.

Co-authored-by: Quick <Quick104@users.noreply.github.com>
Compose throws IllegalArgumentException when a LazyRow/Grid reuses a
key. TV already deduplicated contentId in #188 after a production crash
(Key "series-tvdb-280619" was already used); phone home rows, browse,
search, collections, and More Like This still keyed on contentId with
no guard.

Deduplicate by identity before keying (first occurrence wins) and stall
paginated load-more when a page adds only duplicates so hasMore cannot
spin. Home/library/TV skyline section lists also unique-by-id so a
repeated section cannot take the app down.

Co-authored-by: Quick <Quick104@users.noreply.github.com>
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.

1 participant