[TV] Wire up episode actions on the podcast, playlist and Up Next screens - #5694
[TV] Wire up episode actions on the podcast, playlist and Up Next screens#5694sztomek wants to merge 10 commits into
Conversation
|
Claude finished @sztomek's task in 6m 27s —— View job Code reviewSolid, well-scoped PR — it replaces the fake toasts with real
No blocking issues found. Details are in inline comments; summary:
Two additional notes not tied to a line: The analytics rationale in the description looks inaccurate. It says mark/archive analytics would need "EventHorizon pulled into the Test coverage sits on the wrong side of the risk. The seven VM tests cover the thin delegation layer; the logic this PR actually introduces is the context → button-set mapping in I could not run |
| fun perform(message: String, action: () -> Unit): () -> Unit = { | ||
| action() | ||
| toastHostState.show(message) | ||
| onDismissRequest() | ||
| } |
There was a problem hiding this comment.
The toast is shown unconditionally and immediately, while action() only schedules the real work on a background coroutine. If archiveBlocking / markAsPlayedBlocking throws (DB error), the user still sees "Archived" and the exception is uncaught inside viewModelScope.launch — which on Android means a crash rather than a no-op.
The mobile EpisodeFragmentViewModel has the same optimistic pattern, so this isn't a regression, but since this is new code a runCatching/try-catch + Timber.e inside the VM would make the failure path non-fatal. Not a blocker.
6d125aa to
c96195c
Compare
|
Claude finished @sztomek's task in 5m 23s —— View job Code reviewRe-reviewed at Things I verified this pass rather than assumed:
New this pass1. Actions can now delete the focused row, and nothing re-acquires focus (medium) — inline. "Remove from Up Next" disposes the focused 2. 3. Test coverage sits on the wrong side of the risk (still). The seven VM tests cover the thin delegation layer. The logic this PR actually introduces is the context → button-set mapping in 4. Analytics gap (still, follow-up). Still open from the first reviewCommit
No blockers. The correctness notes above come from reading the code — Gradle execution isn't permitted in this environment, so I could not run |
|
Claude finished @sztomek's task in 3m 16s —— View job Code reviewRe-reviewed at Previously-raised items — status
The extraction is clean. One observation, by design rather than a defect: because Still open1. Actions can now delete the focused row, and nothing re-acquires focus (medium, unchanged) — inline. Related and cheap to check on the same device pass: the overlay pattern replaces 2. 3. Analytics gap (follow-up). 4. Test nits — inline: Optional: No blockers. Nothing in this pass changes my read of the core: real |
geekygecko
left a comment
There was a problem hiding this comment.
Looks good. I only found one issue related to navigation. On Apple TV, if you open a podcast from Up Next, it opens on a new page without the navigation bar at the top. In this implementation, it opens within the Up Next tab, so you can't tap Up Next to return because you're already in that section. It might be worth following the Apple TV approach here.
Android TV
Screen_recording_20260805_110255.mp4
Apple TV
Screen.Recording.2026-08-05.at.11.04.42.am.mov
|
thanks @geekygecko for the review. |
|
Claude encountered an error after 30s —— View job I'll analyze this and get back to you. |
Generated by 🚫 Danger |
|
Claude encountered an error after 34s —— View job I'll analyze this and get back to you. |
Description
The TV episode-actions modal previously showed six buttons that were all fake toasts — tapping "Play next", "Mark as played", "Archive", etc. only showed a toast and did nothing to the episode. This PR wires those actions to the real data layer and makes the button set context-aware so appropriate actions will be displayed on the modals.
What changed
TvEpisodeActionsViewModel/TvEpisodeActions— centralises the real operations (mirroring the iOSEpisodeRowViewModel), callingEpisodeManager/PlaybackManagerthe same way the mobileEpisodeFragmentViewModeldoes:PlaybackManager.playNext/playLastEpisodeManager.markAsPlayedBlocking/markAsNotPlayedBlockingEpisodeManager.archiveBlocking/unarchiveBlockingPlaybackManager.removeEpisodeTvEpisodeActionContext), matching tvOS:.upNextcontext.Fixes PCDROID-701 https://linear.app/a8c/issue/PCDROID-701/wire-up-actions
Testing Instructions
Requires a signed-in account on an Android TV device/emulator.
Screenshots or Screencast
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...