Skip to content

fix: refresh Continue Watching after playback and make player focus visible on TV - #3153

Open
JohanJarlefalk wants to merge 2 commits into
edde746:mainfrom
JohanJarlefalk:fix/cw-refresh-and-player-focus
Open

JohanJarlefalk wants to merge 2 commits into
edde746:mainfrom
JohanJarlefalk:fix/cw-refresh-and-player-focus

Conversation

@JohanJarlefalk

Copy link
Copy Markdown

Two small TV fixes, one commit each.

1. Continue Watching on Recommended didn't update after playback

After watching an episode and pressing Back to a library's Recommended tab, Continue Watching kept showing the old state for that series. It only caught up after switching tabs or pressing refresh. The tab patched the view offset of items it already showed, so a newly started show, the next episode or a finished episode never moved. The server's final "stopped" progress also arrived while the player still covered the tab.

  • Recommended now listens for watch-state events from its own library and marks itself stale.
  • While covered, it only records that. When it is shown again (the player or a detail route pops, or the tab becomes active), it reloads its hubs in place after a short debounce, without a spinner. It holds off while a player is still open.
  • Progress updates still patch the visible item's offset immediately.
  • BaseLibraryTab gains an isSurfaceVisible getter and an onSurfaceShown() hook (no-op by default) for this.
  • New test in libraries_screen_test.dart: progress posted while an opaque route covers Recommended causes exactly one refetch after the route pops.

2. Focused Skip Intro / timeline were hard to see with the D-pad

On TV, especially on dark (OLED) frames, it was hard to tell whether the Skip Intro / Skip Credits / Next Episode button, the timeline or the transport row had focus. The skip pill was already solid white, so the translucent focus fill didn't show. The timeline knob was a white disc on the white played track.

  • Skip pill (D-pad mode only): dark with a thin outline when unfocused. Solid white with a white ring, shadow and 1.08× scale when focused. Pointer and touch keep the existing solid white pill.
  • Timeline knob: a dark edge plus a white halo ring when focused.
  • Content strip (chapters/queue): focused thumbnails get a white outline and 1.05× scale instead of the translucent fill.

Testing

  • flutter analyze lib test: no issues. dart format is clean.
  • flutter test on Windows: everything passes except 18 tests that fail the same way on main on Windows (upload_symbols_test, downloaded_video_source_test, one download_manager_service_test case, one cycling_media_backdrop_test case). Those are path or environment issues and unrelated to this change.
  • Tested by hand on an NVIDIA Shield (Android TV) release build. The Windows release build also launches and runs.

AI disclosure

Written with Claude Opus 5.5 (Claude Code), then tested by hand on the Shield.

🤖 Generated with Claude Code

JohanJarlefalk and others added 2 commits November 23, 2026 23:08
Leaving the player and returning to a library's Recommended tab left
Continue Watching showing the old state for that series until the user
switched tabs or pressed refresh. The tab only patched the view offset
of an item it already showed, so a newly started show, the next episode
of a series or a finished episode never moved, and the server's final
"stopped" progress landed while the player still covered the tab.

Recommended now listens for watch-state events from its own library
and marks itself stale. While covered it only records that; when the
surface is shown again (the player or a detail route pops, or the tab
becomes active) it reloads the hubs in place after a short debounce,
waiting while a player is still open. Progress updates still patch the
visible item's offset straight away.

BaseLibraryTab gains an isSurfaceVisible getter and an onSurfaceShown
hook so tabs can consume their own staleness on visibility changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the D-pad, a focused Skip Intro / Skip Credits / Next Episode pill
looked the same as an unfocused one: it was already solid white, and
the translucent focus fill behind it was invisible, so on dark (OLED)
frames it was hard to tell whether the button, the timeline or the
transport row held focus. The timeline knob had the same problem, a
white disc on the white played track.

In D-pad mode the skip pill is now dark with a thin outline while
unfocused and turns solid white with a white ring, a shadow and a
slight scale when focused. Pointer and touch users keep the solid white
pill. The focused timeline knob gets a dark edge and a white halo ring,
and focused chapter/queue thumbnails in the content strip get a white
outline and a small scale instead of the translucent fill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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