Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
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 |
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:
|
| let loading = self.currentPhaseIsLoading() | ||
| guard loading != self.isLoading else { continue } | ||
| self.isLoading = loading | ||
| self.syncIntroSkipPrompt() |
There was a problem hiding this comment.
Premature loading-state reset occurs when the stall watcher clears isLoading during a Protocol V3 replan: the outgoing stalled load still has buffered playback, and its epoch remains active while attemptProtocolV3Replan awaits sessionBridge.replanProtocolV3, removing the loading presentation and resuming the intro prompt before preparation finishes. Preserve the replan's loading state separately from the engine stall judgment, or prevent the watcher from overriding it while preparation is in flight.
Prompt for LLM
File iosApp/iosApp/Screens/Player/PlayerViewModel.swift:
Line 1252 to 1255:
Premature loading-state reset occurs when the stall watcher clears `isLoading` during a Protocol V3 replan: the outgoing stalled load still has buffered playback, and its epoch remains active while `attemptProtocolV3Replan` awaits `sessionBridge.replanProtocolV3`, removing the loading presentation and resuming the intro prompt before preparation finishes. Preserve the replan's loading state separately from the engine stall judgment, or prevent the watcher from overriding it while preparation is in flight.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
Fixed in 974a73c: while a replan, credential reload or fresh start is being prepared, a .stalled phase from the outgoing load now stays loading, so the stall watcher no longer clears the capsule or resumes the intro prompt before the replacement load reports its own phase. Other phases are judged as before. Covered in PlayerStallPresentationTests.
There was a problem hiding this comment.
Thanks—the fix described in 974a73c8 addresses the reported race: the outgoing load’s .stalled phase can no longer clear loading or resume the intro prompt while replacement preparation is in flight.
Keeping other phase handling unchanged preserves this PR’s intended buffered-playback behavior. The added PlayerStallPresentationTests cover the reported fix; I haven’t independently inspected the commit or run those tests.
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:
|
974a73c to
34cedf4
Compare
Rebase status
Rebased onto
mainat34cedf4dbf5e4f320a01fcad810b9865bdb4cd19. Both commits in this PR already shipped in #620 (ba16529c3c73c0669ec0a058b346fc7affe78fa4), so the rebased branch has no remaining diff againstmain.Verified that
PlayerStallPresentation.swiftand its tests match the original PR exactly, and thatmainretains the view model integration, including the replacement preparation guard and stall watcher.git diff --checkandscripts/ci/check-no-api-v1.shpass. No new build or runtime verification was run because the rebase leaves no code changes. The validation below describes the original implementation.Problem
Related issue: N/A
Validation tasks: changes #337 C5
When the server stops during direct play, video keeps playing from the read-ahead buffer for several minutes, but the "Loading…" capsule showed the whole time and the player controls stayed hidden. Aether reports a reconnecting source as
PlaybackPhase.stalledeven while frames keep advancing, and the player mapped.stalledstraight to loading. This shows Loading only when playback has actually stopped.Approach
PlayerStallPresentationdecidesisLoadingfrom the phase. Over a stalled source the player counts as loading only while it means to play and, for at least one second, either the playhead has not moved or the engine has held no media ahead of its clock..stalled, the view model checks again every 250 ms, so the capsule appears once the buffer runs out and clears when frames move again.isBuffering;.loadingand.rebufferingare unchanged.isLoadingalso hides the controls and pauses the intro-skip and credits logic, so those now keep running while frames play.Validation
scripts/ci/check-no-api-v1.sh: pass.main(6242652): the full iOS unit suite ran 2,691 tests. The only failures areArtworkURLTests.testDeliveryCapabilityOnIOSUsesV2RouteAndResetsandImageSizeCapabilityTests.testResetClearsCapability, which fail the same way onmain. tvOSbuild-for-testingand the macOS build succeed.Simulator screenshots (iOS 26.5, tvOS 26.5):
Risks
None identified. The capsule still appears for a real stall, after one second instead of immediately.
Checklist
AI Disclosure
Rebase and PR update: Codex harness in T3 Code, model
gpt-6.1-sol; tooling: Git, GitHub CLI, Python.Harness: Claude Code, running in T3 Code
Tool(s): Claude Code subagents, xcodebuild, Xcode Simulator (simctl, Maestro), GitHub CLI
Model(s): claude-opus-5-5
Involvement: Fully AI-generated, human verified
Adversarial review: A separate Claude Code reviewer agent (claude-opus-5-5) read this branch's diff against
mainat medium effort, checking behaviour, platform guards (iOS, tvOS, macOS), tests and commit hygiene. It found that after a seek past the buffer with the server down, Aether's clock keeps running, so the first version would have shown a frozen frame with no capsule for about 80 s. The player now also treats an empty buffer ahead of the clock as a stall, with tests for that case.Note
Show Loading in player only when stalled playback actually stops
PlayerStallPresentation.isLoading, which classifies a stalled phase as loading only when a replacement is being prepared, the playhead has been frozen for 1 second, or the buffer ahead of the engine clock has been empty for 1 second in PlayerStallPresentation.swiftPlayerViewModelnow tracks the last finite playhead sample and first buffer-empty time, and a 250 ms polling task re-evaluates loading while a load stays stalled in PlayerViewModel.swiftMacroscope summarized 974a73c.