Skip to content

fix: watch screen no longer freezes UI on stalled networks - #13

Merged
ghostcoder42 merged 1 commit into
mainfrom
fix/watch-loading-freeze
Sep 27, 2026
Merged

ghostcoder42 merged 1 commit into
mainfrom
fix/watch-loading-freeze

Conversation

@ghostcoder42

Copy link
Copy Markdown
Owner

Repro: search a rare term on a weak/saturated network, open the single result, watch page spins ~48s (15s fetch timeout × initial + 2 retries), back presses appear dead during the stall, and the app crashes a few seconds after finally navigating back.

  • Gate autoplay on screen focus (ref): the detail query can resolve long after the user backed out — the screen stays mounted in the stack — and play() then starts a player never attached to a view / plays audio under the previous screen. Autoplay now only runs while the screen has focus; re-focusing still stays paused as before.
  • retry: 0 on the video detail query: one 15s timeout then the error screen with a retry button, instead of ~48s of spinner.
  • Guard onEndReached in the browse and tag lists with hasNextPage && !isFetchingNextPage: single-row result lists fire it repeatedly, walking page after page on a struggling network.

Repro: search a rare term on a weak/saturated network, open the single
result, watch page spins ~48s (15s fetch timeout × initial + 2 retries),
back presses appear dead during the stall, and the app crashes a few
seconds after finally navigating back.

- Gate autoplay on screen focus (ref): the detail query can resolve
  long after the user backed out — the screen stays mounted in the
  stack — and play() then starts a player never attached to a view /
  plays audio under the previous screen. Autoplay now only runs while
  the screen has focus; re-focusing still stays paused as before.
- retry: 0 on the video detail query: one 15s timeout then the error
  screen with a retry button, instead of ~48s of spinner.
- Guard onEndReached in the browse and tag lists with
  hasNextPage && !isFetchingNextPage: single-row result lists fire it
  repeatedly, walking page after page on a struggling network.
@ghostcoder42
ghostcoder42 merged commit 0132b20 into main Sep 27, 2026
1 check passed
@ghostcoder42
ghostcoder42 deleted the fix/watch-loading-freeze branch September 27, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant