Repository navigation
Conversation
Server PR Silo-Server/silo-server#117 changed the watch-progress model: watched items now report position_seconds = 0 and a rewatch in flight reports played = true WITH a live nonzero position (one-way watched latch, Jellyfin-style). Two detail-screen spots still assumed the old model where played implied position == duration: - computePlayLabel gated the "Resume H:MM" label on !played, so a rewatch showed "Play" while playback actually resumed mid-stream. Any nonzero position is now a live resume point, so the gate goes. - EpisodeRow suppressed the episode progress bar on played episodes (needed before, when played rows carried a stale 100% position). Gate on position > 0 instead so a rewatched episode shows its bar and watched episodes (position 0) stay clean. Everything else (resume seek, watched badges, progress fractions, next-unwatched selection, TV app) was audited and already keys on position/played correctly under the new model. Co-Authored-By: Claude Fable 5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR shows resume UI (label and progress) whenever the server supplies a nonzero resume position (with bounds/duration checks), removing played-status guards and adjusting label ordering so resume can take precedence for in-progress episodes. ChangesResume state handling for watched episodes
sequenceDiagram
participant ClientUI as Client UI
participant Server as Server (userData)
participant computePlayLabel as computePlayLabel
participant EpisodeRow as EpisodeRow
ClientUI->>Server: request userData (positionSeconds, durationSeconds)
Server-->>ClientUI: userData
ClientUI->>computePlayLabel: computePlayLabel(userData)
computePlayLabel-->>ClientUI: label ("Resume …" or "Play …")
ClientUI->>EpisodeRow: render row with pos/dur
EpisodeRow-->>ClientUI: progress bar visible when 0 < pos < dur
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1547772ed
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val pos = detail.userData?.positionSeconds | ||
| val played = detail.userData?.played == true | ||
| if (pos != null && pos > 30 && !played) { | ||
| if (pos != null && pos > 30) { |
There was a problem hiding this comment.
Check resume position before episode label
For episode detail pages, this new resume condition is still unreachable because the detail.type == "episode" branch above returns Play S…·E… before looking at userData.positionSeconds. In the rewatch state this commit is handling (played == true with a live nonzero position), tapping the primary button will resume via the player, but the label remains Play Sx·Ey instead of surfacing the resume time; move the position-based label ahead of the episode label (or explicitly handle episode resume first).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 5dbadc2 — the position check now runs before the episode-label branch, so an episode with a live resume point reads "Resume H:MM" (matching what tapping the button actually does) and falls back to "Play Sx·Ey" otherwise.
| val progress = if (pos != null && dur != null && dur > 0 && pos > 0) { | ||
| (pos / dur).toFloat().coerceIn(0f, 1f) |
There was a problem hiding this comment.
Hide bars for completed positions
When the app is pointed at a pre-migration server or stale cached/detail data where a watched episode still carries positionSeconds == durationSeconds, this condition now treats that completed position as in-progress and draws a full progress bar on every watched episode. Adding the same upper-bound check used by the TV detail rail (pos < dur) would still show active rewatches while preserving the clean watched-row state for completed items.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 5dbadc2 — added the pos < dur upper bound (same as the TV detail rail), so stale pre-migration rows with position pinned to the duration render clean watched rows instead of full bars.
| val pos = detail.userData?.positionSeconds | ||
| val played = detail.userData?.played == true | ||
| if (pos != null && pos > 30 && !played) { | ||
| if (pos != null && pos > 30) { |
There was a problem hiding this comment.
Reject completed positions in the resume label
For movie/detail data that still contains the old watched representation (played == true with positionSeconds pinned at the duration), removing the !played guard makes the primary CTA show Resume <duration> even though there is no live resume point. Since LeafItemUserData includes durationSeconds, gate this label the way the TV detail screen does (pos < dur - 5) so completed/stale positions still render as Play while active rewatches continue to show Resume.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 5dbadc2 — the label is now gated with pos < dur - 5 (matching TvItemDetailScreen.resumePositionSeconds), so stale completed positions render "Play" while live rewatches keep "Resume". When the duration is unknown the position-only check still applies.
… bounds - Check the resume position before the episode-label branch in computePlayLabel: it returned "Play Sx·Ey" first, making the "Resume H:MM" label unreachable on episode pages even though tapping the button resumes. - Bound both the resume label (pos < dur - 5, matching the TV detail screen) and the episode progress bar (pos < dur, matching the TV rail) so stale pre-migration data — watched rows with the position still pinned to the duration — renders as Play with no bar instead of "Resume <duration>" and a full bar. Co-Authored-By: Claude Fable 5 <[email protected]>
Context
Server PR silo-server#117 changes the watch-progress model:
completed/playedbecomes a one-way watched latch and watched items now reportposition_seconds: 0instead of position pinned to the duration. A rewatch of a watched item reportsplayed: truewith a live nonzero position, and such items now appear in the Continue Watching source (GET /progress, home sections), which keys onposition > 0.A full audit of this repo found the client almost entirely position-driven already — resume seek targets read
positionSecondsdirectly, watched badges key onplayed, progress fractions guard on0 < position < duration, and next-unwatched selection filters onplayed != true. Two detail-screen spots still assumed the oldplayed ⇒ position == durationcoupling:Changes
computePlayLabel(DetailSharedComponents.kt): the "Resume H:MM" label was gated on!played, so during a rewatch the button said "Play" while tapping it actually resumed mid-stream (the player seeks touserData.positionSecondsunconditionally). Any nonzero position is now a live resume point, so the gate is removed.EpisodeRow(EpisodeList.kt): the episode progress bar was suppressed for played episodes — necessary under the old model where played rows carried a stale 100% position, but it hid the bar for a rewatch in flight. The condition is nowposition > 0: rewatched episodes show their bar (alongside the watched checkmark, matching the web app and Jellyfin/Plex), and watched episodes (position 0) stay clean.Audited and unchanged because already compatible: phone/TV player resume seek,
TvItemDetailScreen.resumePositionSeconds()(position-gated),TvMediaCard/MediaRow/FeaturedCarousel/TvDetailEpisodeRailprogress fractions, next-unwatched episode selection, watched badge rendering, andPlaybackSessionLifecycle(reports position only, never derives played locally).Behavior notes
Testing
./gradlew :androidApp:compileDebugKotlinclean. UI-level change only; no unit tests cover these composables today.AI-use disclosure: implemented with Claude (Claude Code), reviewed by the maintainer.
🤖 Generated with Claude Code
Summary by CodeRabbit