Repository navigation
fix(player): show one centered loading spinner on phone and TV - #696
Conversation
Loading and buffering looked different on each Android surface. The phone showed a centered spinner with no delay, which the controls covered, and showed the controls over black during the first load. The TV did the same, with a top-right "Buffering" capsule and a separate reconnect spinner. Both apps now show one unlabeled spinner, centered, for the session request, the first buffer, a rebuffer and a reconnect. It appears after 500 ms and then stays up at least 500 ms, using timing shared from android-shared. On the phone it takes the play disc's place while the controls show, and the slot still plays and pauses. On TV it stays centered beside the transport and sits below the HUD card while the HUD is open. Up Next draws it in its video frame on both apps. A new item's first load shows only the spinner over black, and the controls arrive with its first frame (or first play, for audio). On TV the remote does nothing but Back until then, and the auto-hide timer starts at the first frame. The state is keyed on the content id, so a retry, renewal, reconnect or replan of the same item never brings it back. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Walkthrough
Merge Risk:
|
|
The private evidence link covers the phone and Android TV emulator builds, but the phone-app changes also reach tablets and foldables through the shared player screen; tabletop placement specifically applies on foldables. The PR says tablet and foldable captures were not made. Please add before/after captures for an Android tablet and a foldable both folded and open, or explain why the changed code cannot reach a particular device. The first-frame handoff was refined in the latest commit, so a short recording would show that transition; the PR explains the recorder produced empty files, and this evidence remains unavailable for reviewer consideration. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence Posted via Macroscope — Visible change evidence |
There was a problem hiding this comment.
Actionable comments posted: 4
🔇 Additional comments: 1
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt-4463-4463: 1
4463-4463:Minor · Functional Correctness · Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Move the TalkBack description to a string resource.
The literal
"Loading"cannot follow the device’s language. UsestringResourcefor the spinner’scontentDescription. Based on learnings, Android UI content descriptions should use string resources so they can be localized.Source: Learnings

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
33fbf834-1804-4388-bec5-fa4420d9b9ed
Files selected for processing: 10-
android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlayerSpinnerVisibility.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerChrome.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerControls.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerNextUpScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerOverlay.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.ktandroidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerVisibilityPolicyTest.kt
Files with no reviewable changes: 1-
- androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerVisibilityPolicyTest.kt
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
-
Any isPlaying callback ended a new item's first load. Audio can start before the video's first frame, so the controls could appear over black. A late callback from the outgoing mount could also mark the incoming item started. Video now ends the first load only through the mount-checked first-frame callback. A mount with audio and no video ends it when it plays, and the callback is checked against the same mount generation (phone) or nonce (TV). The phone spinner also covered only session requests without a stream. A version switch or Next Up keeps the previous stream URL while it requests the next session, so it showed nothing. It now follows isLoading, as the TV does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: #79 (replan loading state; this PR shows the spinner during a replan but adds no copy)
Validation tasks: not checked. The v1.0 board needs a token scope this session didn't have; a reviewer should check player loading and stall cases.
Loading and buffering looked different on each Android surface:
Apple and Roku are moving to the same behavior in companion PRs, so every client shows loading the same way.
Approach
rememberPlayerSpinnerVisiblein android-shared.Validation
assembleDebugbuilds for both apps. With the default 2 GB heap, compilingTvPlayerScreen.ktruns out of memory, onmaintoo; it builds with a 6 GB Kotlin daemon heap.TvPlayerVisibilityPolicyTestis removed because it only covered the deleted reconnect-spinner helper.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-696/
Surface and build: debug builds of
mainand this branch on API 36 emulators: phone (landscape), tablet, foldable (open and folded) and Android TV (1080p). Before and after: first load, and a stall with the controls hidden and shown. After-only recordings on phone and TV show the first load, the controls arriving with the first frame, and a stall. Not captured:Risks
Companion changes: Silo-Server/silo-apple#918, Silo-Server/silo-roku#41.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Unify phone and TV player loading into one centered delayed spinner
Replaces the separate phone and TV loading indicators with a single spinner policy. A new
rememberPlayerSpinnerVisiblecomposable delays the spinner 500ms after loading starts and keeps it visible at least 500ms once shown.TvLoadingScreen, the TV top-right buffering capsule, and theshouldShowReconnectSpinnerhelper along with its unit test.startedContentIdandawaitingFirstFrameto both view models. Audio-only playback now marks an item as started via newonAudioOnlyPlaybackStartedhandlers, so it no longer waits for a video-frame callback. Transport controls, gestures, and remote input are blocked until the first frame or audio start.PlayerOverlaynow takes aspinnerVisibleparameter instead ofshowBufferingIndicator; TV suppresses the spinner during picture-in-picture; loading state combines session loading, buffering, and reconnecting.Macroscope summarized 51d03aa.