Repository navigation
Fix resume loss (0-position clobber) + phone Continue Watching? dialog - #54
Conversation
… Watching? dialog
Two detail-screen playback fixes from Jim's QA (2026-07-10).
Resume loss (phone + TV): RoomUserItemStateRepository.recordPosition accepted a
0.0 position and blindly upserted it (fresh timestamp, no monotonic guard),
overwriting a good resume row locally AND enqueuing SET_POSITION=0 to the
server. On player teardown the final recordPosition snapshots _uiState.position,
which is 0 in the race where the player was already reset/released — so backing
out of a title and returning showed "Play" instead of "Resume". Reject
positionSeconds <= 0 (reads already treat 0 as "no resume", and real resets go
through markUnwatched, not this path). Fixes both clients via the shared store.
Phone Start Over parity: the phone detail hero had a single Resume button that
always resumed, with no way to restart — iOS offers a "Continue Watching?"
dialog (Resume / Play from Beginning). Ported it: the play label is now neutral
("Play" / "Play S·E"), and when there's resume progress tapping it opens the
dialog. Mirrors silo-apple ViewExtensions.continuumResumePlaybackAlert. (TV
already had a Start Over button.)
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change prevents zero-position resume writes and adds a resume confirmation flow to Android detail screens. Users can resume or play from the beginning, with neutral play labels and formatted stopped-at text. ChangesResume playback behavior
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ItemDetailScreen
participant MovieDetailContent
participant HeroActionStack
ItemDetailScreen->>MovieDetailContent: pass resume position and restart callback
MovieDetailContent->>HeroActionStack: configure play actions
HeroActionStack->>HeroActionStack: display Continue Watching dialog
HeroActionStack-->>ItemDetailScreen: invoke Resume or Play from Beginning
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0154d353a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| val seriesResume = nextEpisode?.let { playbackResumePosition(it) } | ||
| ?: playbackResumePosition(detail.userData) |
There was a problem hiding this comment.
Avoid falling back to series progress for the dialog
When a series has a nextEpisode but that episode has no resumable position, this fallback can still make seriesResume non-null from detail.userData. In that scenario the hero opens a "Continue Watching?" dialog and displays the series-level stopped time, but the Resume action still launches nextEpisode with playbackResumePosition(it) (null), so Resume and Play from Beginning both start the next episode at 0. Only use the detail-level fallback when there is no nextEpisode, or make the Resume action use the same progress source.
Useful? React with 👍 / 👎.
…el fallback Codex P2 on PR #54: seriesResume fell back to detail.userData when nextEpisode existed but had no resume, so the Continue Watching? dialog could show a series-level "stopped at" time while Resume launched the episode at 0 (both buttons started from the beginning). Match the Resume action's source: when nextEpisode exists, key the dialog off its own progress only. Co-Authored-By: Claude Fable 5 <[email protected]>
Two item-detail playback fixes from Jim's on-device QA (2026-07-10).
① Resume loss — phone + TV (root-cause fix)
RoomUserItemStateRepository.recordPositionaccepted a0.0position and blindly upserted it (freshclientUpdatedAtMs, no monotonic guard), overwriting a good resume row locally and enqueuingSET_POSITION=0to the server. On player teardown the finalrecordPositionsnapshots_uiState.position, which is0in the race where the player was already reset/released — so backing out of a title and returning showed "Play" instead of "Resume."Fix: reject
positionSeconds <= 0on the progress path. Reads already treat0as "no resume," and real resets go throughmarkUnwatched(a separate API), so nothing legitimate breaks. One shared-store change fixes both clients. Added a regression test that a0write can't wipe a good resume.② Phone "Continue Watching?" dialog — iOS parity
The phone detail hero had a single Resume button that always resumed, with no way to start over. iOS offers a resume-vs-restart dialog; ported it:
ViewExtensions.continuumResumePlaybackAlert+MovieDetailContent.swift.(Android TV already had a dedicated "Start Over" button — unchanged.)
Deviation from iOS: the dialog uses Material3's two-button form (Resume / Play from Beginning) with cancel via tap-outside/back, rather than an explicit Cancel button — the idiomatic Android pattern.
Verification
./gradlew :androidApp:assembleDebug :androidTvApp:assembleDebug test— BUILD SUCCESSFUL, tests pass (incl. newrecordPositionZeroDoesNotClobberAnExistingResumeand updatedDetailPlayLabelTest).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes