Without a mouse the channel banner was invisible: opening a channel focused the
first video card, which scrolled the header (a grid item) off-screen. The header
is now pinned above the grid and never scrolls away. The banner is its backdrop,
darkened to black at the bottom; the avatar sits beside the title with a
"by <owner> on <platform>" byline, the subscriber/video/created stats, and the
description flowing into the black beneath (a long one grows the header down
instead of being clipped). A Subscribe button sits on the banner, reachable with
UP from the first card, wired to the same follow/unfollow as the player.
AGENTS.md: subscribing is in scope (already on the player, now the channel page
too), so drop it from the excluded list.
Thumbnails, channel banners and avatars popped in from a flat grey rectangle. A
new ShimmerAsyncImage shows the same faint shimmer as the card placeholders
while the image loads, and the sweep disposes once the image (or an error)
arrives. Used for video thumbnails and the channel banners/avatars.
The saved-list snapshot (issue #9) painted the last session's rows instantly,
then the network refresh swapped them in and the tiles jumped as newer videos
appeared — jarring. Drop the snapshot instant-paint on Home, the video lists and
the Channels screen; images stay fast because Coil already disk-caches them.
Screens now show the loading card while the first page loads instead of stale
content: one card per Home row (not a fake full row), a single card at the end
of a growing grid, and a trailing card when a Home row loads its next page.
Moving up/down between the Home rows (and the Channels rows) jumped to the
geometrically-nearest card, so the row shifted left/right and felt inconsistent.
A focusRestorer on each row now lands focus on the card that row last had, so
the rows stay put as you move between them.
Reaching the sidebar used to mean scrolling all the way left to the first card.
Back from any list view now opens it directly; from the open sidebar on Home a
double Back still exits, and Esc (keyboard/scrcpy) mirrors the same model.
The info and comments side panels showed a generic "Info"/"Comments" label,
which read as an empty black bar with no clue which video it belonged to. Both
now show the video's title instead (#24, and the same complaint in #23).
The info panel's description also could not be scrolled with the D-pad: a plain
Text in a LazyColumn takes no focus, so a long description was unreadable past
the first screenful unless it happened to contain links. It is now a focusable,
D-pad-scrollable box; Down at the bottom hands focus to the link list, Left
closes the panel (#23).
The Search screen's empty state replaced the whole grid with "Nothing
here yet" — no search field, no way back; LEFT from it went nowhere.
Both are scope rules of the issue: the screen keeps its field focused
on entry (retrying the request — the focus target attaches late in a
cold grid composition), LEFT from the field opens the sidebar like on
every other screen, and the results' auto-focus only runs when a search
is actually active (a persisted query re-entered shows its results
focused on the first card).
Search scope is a chip row below the field: Local and — when /config
allows the search index — Vidiverse. Vidiverse queries go through
search/videos with searchTarget=search-index; results may live on
other instances: their cards use the absolute thumbnailUrl, and opening
one plays it from THAT instance via an anonymous API (no history
reports for remote videos).
Closes#20Closes#21Closes#22
The placeholders only existed on the home rows; the shared list screens
(My videos, Search, Subscriptions, History, channel pages) still used a
full-screen spinner, and the Channels screen did too. All of them now
show card-shaped placeholders: the in-grid initial pass keeps the page
header and a two-row placeholder block, growing lists swap the always-
visible bottom spinner chip for a placeholder row driven by the new
loadingMore state on PagedListViewModel, and the channels screen shows
stub header bars plus placeholder rows while it starts up.
Closes#19
On TV hardware the debug build's UI thread renders at ~2fps
(dumpsys gfxinfo: 87% janky frames, 50th percentile 85ms, stalls up
to 4200ms while the GPU sits at 12ms). An R8 minified release of the
same code turns the identical interaction into 184 frames at 27ms
median with 15% jank — the artifact is the deliverable, and the debug
signature keeps install -r seamless for sideloads.
Rows that were still loading kept silent or a bare "Loading…" line.
Every list row (continue, new videos, subscriptions) now shows dummy
cards shaped like the real thing — gray rectangles with a very faint
sweeping sheen — because that says what is coming and that it is
moving; the spinner only survives where there is nothing to shape.
Fullscreen video loading shows the video's own thumbnail dimmed under
the circle loader instead of black, at least until the detail response
has the thumbnail; before that only the circle exists (issue #19).
The shimmer is a linear sheen at 8% alpha looping over 1.6s on a
near-black base, subtle per the report.
ExoPlayer flaps READY↔BUFFERING at every buffer edge and seek; each
flap tore the red spinner overlay out of composition and rebuilt it,
visibly restarting the animation from zero and flickering the covering
box — the "struggles and restarts" report. The displayed state now
follows the raw player state debounced, last value wins after 200 ms,
so quick flaps cancel out and the overlay never churns mid-playback.
The long initial buffering still shows it immediately.
Closes#17
The three home rows were capped: continue at six, subscriptions at
twelve, with no way to move past. Continue and subscriptions now page
in place — each new page fetches only its own entries (the continue
row's resume info costs one detail call per entry, so a page enriches
what it appends and never re-reads earlier ones; the "New videos" row
already paged). Rows stay lazy lists and the image cache is LRU, so a
user scrolling far does not pile up memory.
Closing the drawer without a selection (RIGHT, tap-outside, BACK) also
turned out to orphan the D-pad — the drawer's focused item left the
composition and nothing took its place; every later press died. The
closing now bumps a pulse the screens observe to re-focus the last
focused card.
Closes#18
The page knew little more than the display name. Between the identity
row and the video cards it now shows subscribers, the video count,
creation date and the owning user — all from the channel payload the
header already fetches, plus an owner/platform line and a short
description snippet. The per-channel detail response carries no video
count, so the paged list's first-page total feeds it instead of a
default zero.
Closes#14
Opening the menu landed focus on Home regardless of where the user was;
the sensible start is the item that already carries the selected state.
From there all other destinations are a D-pad step or two away.
The privacy tag sat next to the channel name — long names crowded it —
and its light-on-light colors became illegible the moment a card got
focus (white background). It moves to the last row (age · views) and
keeps a dark chip in both states. Views render as the channel card's
play icon + count instead of "1 view" text.
Closes#15
SmartTube keeps the focus in place when you press up on a list's first
row — the drawer popping was surprising ("why does the sidebar show up
when I go up"). The upToTopBar wiring that did it is removed everywhere;
the drawer stays reachable via LEFT at any row start, which is the other
half of the rule.
The adaptive grid resolves to exactly four cards on a full-width
landscape TV pane — but a portrait-mounted or otherwise narrow TV gets
fewer columns and the hardcoded row start broke there. Compute the
count with the same arithmetic Compose uses (pane padding minus card
minimum, integer division) so the drawer-from-row-start rule tracks
the real grid on every mounting.
The adaptive grid resolves to exactly four cards on the TV's fixed full-
width pane — index % 4 needs no layout probing and cannot be skewed by
spanned items. Measuring existed only to re-derive the constant.
LEFT from any card of a grid's first row opened the menu drawer. The
cells-per-row estimate read the width of the first visible grid item,
but near the top that is the page header, which spans the whole width —
so it computed one card per row and treated every card as a row start.
Skip full-span items when estimating; row starts resolve correctly even
while the header is on screen.
The 13-page listing only produced rows that were never rendered
(followed-instance groups had no UI consumer) and 12 of its pages were
spent finding locals already known. What the cards still show and the
video listing cannot carry — banners, exact subscriber counts — comes
from one per-channel call per local channel, in six parallel batches.
Zero-video local channels are no longer listed: they had nothing on
their cards anyway; the signed-in user's own channels stay complete
via the account listing.
Entering Channels walked thirteen 100-row pages of the all-channels
listing (1237 rows on this instance, most of them federated follows)
and re-sorted the rows after every page; the signed-in user's own row
only appeared at page 12, which read as "loading one channel after
another" and never kept icons visible above the fold.
The local video listing already carries what the cards show: paging its
few pages yields exact per-channel video/play counts, covers, channel
avatars and the owner accounts for the row headers — no per-channel
requests. The all-channels listing now runs behind it as a background
metadata refinement (banners, exact subscriber counts, zero-video local
channels, followed platforms) and rebuilds rows only when a group
actually changes, so the visible rows don't churn. Re-entering the
screen within five minutes repaints the kept rows untouched.
Closes#13
The action-row buttons lost their modifier in the icon-only rework and
became unfocusable, so D-pad DOWN off the paused seek bar landed nowhere
(requestFocus failed with "not initialized"). The modifier is attached
to the button again and the seek bar ↔ buttons directions are wired
explicitly, because the default focus search skips the bar.
Pill visuals use the new state language: no border, gray pill = focused,
red glyph = subscribed/rated; the sidebar panels keep the D-pad inside
their lists (consumed at the edges). BACK/Esc acts on ACTION_DOWN only —
its trailing UP saw the panel already closed and exited the video — and
panels return focus to the pill that opened them.
Playlist deletion is a requested scope addition: holding OK on a row
asks via a dialog (DELETE /video-playlists/{id}); the toggle moves to
key release so the hold cannot double-act. Holding also exposed an
activation bug: the CENTER helper consumed only ACTION_DOWN and the
release leaked into the underlying clickable — now consumed, repeats
swallowed, so Create (and the cards) fire exactly once per press.
An info panel shows the video description with clickable links: inline
(pointer) plus a focusable link row list (D-pad); PeerTube video and
channel links play/drill in-app, other links open the browser.
Closes#12
At 16dp bottom padding the glyph floated 3-4dp under the title baseline
and read as loosely attached; at 14dp the TV's bottom edge touches the
baseline so it reads as an object standing next to the text.
The overlay's spacing came out lopsided: 34dp between the seek bar and
the action row while the title/channel line sat tight, the first pill's
glyph ~50dp from the screen edge vs the 24dp-aligned text behind it, and
the time text at a different right margin than the track it belongs to.
Positioning recipe (measured on the emulator, cross-checked with a
second model): seek-row box 28dp with no horizontal padding so the track
spans the same 24dp margins as the text, action row 6dp below it, first
pill drops its start padding so the glyph aligns flush with the text
margin, time padded 3dp so its right edge tracks the rounded cap.
The stat icons now match the Channels view (Groups = subscribers,
PlayArrow = views next to the numbers), the overlay's subscribe became
Groups instead of the YouTube-notifications bell (the bell read as
notifications), and federated channels without an avatar get a
letter-circle fallback so the channel row keeps its shape.
The channels screen enumerated every channel and then fetched each
channel's stats strictly one after another, with a row rebuild and a
row re-save after every single one — with several dozen local channels,
each stat call walking up to four video pages, that took minutes.
Stats now fetch in parallel batches of six and are persisted alongside
the rows snapshot, so an existing install paints the channels screen
with full stats instantly.
Closes#9
Bell, thumbs, chat bubble and playlist icons instead of text labels —
no translutable strings in the action row; labels live on as
contentDescription for accessibility. Like/dislike get proper icons
instead of emoji text with the count as a digit next to them.
SmartTube keeps its action buttons under the seek bar — we had nothing.
The paused/controls overlay gained: subscribe (POST /users/me/
subscriptions with the channel URI, state via the bulk exist endpoint),
like/dislike with immediate count and fill feedback (PUT /videos/{uuid}/
rate), and right-sidebar panels for comments (GET /videos/{uuid}/
comment-threads, paged, read-only; the instance has comments disabled on
some videos, which surfaces as a friendly empty state) and playlists
(checkboxes add/remove the video via the playlist-elements endpoints, a
text field creates new ones). Opening a panel shrinks the video so it
stays fully visible on the left; BACK or LEFT closes again.
Two server quirks are handled: the subscription exist-check settles a
moment after the POST (optimistic update + delayed re-verify instead of
trusting an instant answer), and this emulator translates CENTER into
the platform click as well, so a single press could subscribe and
instantly unsubscribe — activation is now guarded per request.
Closes#10
Opening the app (especially the Channels screen) waited for the API and
then for every image before anything painted. JSON list snapshots now
live in cacheDir: on the next start the last loaded page paints
immediately, then the load that runs anyway silently replaces the first
page with fresh data, so stale content can never stick (issue asks
exactly for that show-cached-revalidate behavior). Logout wipes the
snapshots because they contain account-private listings; History and
Search results are never snapshotted. Thumbnails were already
disk-cached by Coil (the instance serves them with a one-year max-age).
Closes#9
The header-removal experiment went too far: the app now has a slim
persistent title bar — logo + "JTube TV" on the left (it anchors the
layout while the drawer is open), avatar + display name on the right as
a purely visual indicator so it never steals D-pad focus. LEFT from the
first card of every row opens the drawer (the subscriptions row silently
skipped it, and the grid only wired the very first item), and UP no
longer surprises by opening anything.
The channel page that the Channels screen and the player's channel icon
point at never actually rendered — ListSource.Channel, its repository
call and the header state all existed without a UI. Videos of one
channel now open as a grid with banner, avatar, name and handle; page
headers (search field, channel banner) live inside the grid so they
scroll along instead of stacking under the cards.
Closes#7
Space and Enter now toggle playback while playing (the remote OK always
did), and the native PlayerView controller is switched off completely:
hovering the video with a mouse revealed the old play UI with skip
buttons and a settings gear, which must never appear. Our SmartTube-style
overlay is the only controls surface — persistent when paused, shown
transiently for 5 s while playing — with the transport icon row dropped,
position/duration in one style right of the bar, the absolute published
date under the title and a clickable channel icon that opens the
channel's video page.
The loading indicator now tracks the player's real buffering state
(STATE_READY) instead of ending with metadata resolution, so the window
is never black without an indicator. Closes#8
The login flow stored displayName/avatar inside one swallow-all try that
serverConfig() also had to survive first, and /users/me carries both in
its nested account object on current PeerTube versions (verified live
against 8.3.1) — so stored sessions kept showing the raw username and no
avatar. The profile now refreshes after login and whenever an existing
session starts, and the relative avatar fallback no longer points into
/api/v1.
The paused state was unusable (#4): the semi-transparent info overlay
covered the seek line, and the key handler kept owning CENTER/LEFT/RIGHT
(they toggled/seeked directly), so the transport buttons could never be
selected at all.
Replace it with a SmartTube-style pause screen: a big seek bar above an
info bar (never covered again — the panel below it is near-opaque) and
focusable Back 10 s / Play / Forward 10 s buttons. While paused the
arrows pick a control and OK activates it; the bar itself scrubs ±10 s
with arrows and OK starts playback. Focus moves into the overlay on
pause (Play button) and back to the plain key handler on resume, so
while playing, OK still toggles pause and LEFT/RIGHT still seek.
Refs #4
On the TV, DOWN from "Continue watching" often skipped the row below
and landed on "New from your subscriptions": the new-videos row is
rendered as a non-focusable "Loading…" while its items are still in
flight, and every FocusScrollRow auto-focused its first card when its
items arrived, so rows loaded out of order stole focus in a race.
Start fetching new local videos eagerly with the rest of the home data,
restrict the load-time auto-focus to the first row only, and cancel it
when the user has already pressed a D-pad key meanwhile. Also rename
the row to "New local videos" to distinguish it from the federated
subscription feed.
Refs #3
Jeena wanted subscriptions to behave exactly like My videos — a single
plain video list paged on scroll — instead of the SmartTube-style
per-channel rows, which felt noisy when many channels are subscribed.
The plain grid path already existed in VideoListScreen, so switch the
Subscriptions destination over to it and drop the rows screen.
Refs #5
BACK from a video dropped the user on a random spot (often the search
screen, #2): the restore token was only bumped when it was already >= 1,
so the very first back never re-focused anything, and HomeRowsViewModel
refresh() cleared the continue-watching rows synchronously, disposing
the rows before their focus-restore effect could run. Bump the token on
every playing -> not-playing transition and keep the rows alive during
a refresh instead.
Refs #2
Pressing HOME kept the audio running, so a video started in another
app played on top of it and returning landed on the home view with an
invisible player. The player now pauses itself on ON_PAUSE, reports
the position to the server and resumes automatically when the app
comes back. The playing screen is also kept across activity
recreation now, so returning shows the video, not the home view.
Ref #6
On the HiMedia/Amlogic TV the video renders through the vendor video
plane, which scales the decoded stream to the whole panel and ignores
the letterbox geometry AspectRatioFrameLayout lays out for the
SurfaceView. Portrait videos therefore filled the screen instead of
being letterboxed; on emulators the same code was correct.
Render the video in a TextureView instead: it lives in the normal
view tree, so the aspect ratio is honored on every device. Verified
on the HiMedia box (vertical short letterboxed, landscape fills the
screen as before) and on the emulator.
Closes#1
Rewrite the README around what a user sees: what the app is for, how
the screens look and what to press. Add the logo, five screenshots
taken against a local mock PeerTube instance with placeholder content
(no private media), and a debug-only manifest that allows plain HTTP
so those mock instances work.
Replace the placeholder red play-square with the real logo (the
orange TV from https://jeena.net/jtube-logo.svg) converted to vector
drawables. The old placeholder still lives on in git history; the
launcher now matches the website branding.
Channel pages now load the channel record itself and use the newest
video's thumbnail as a banner fallback, so channels never render
without a header image. Focus cards in re-sorting rows only hand out
initial focus once per screen visit so streaming stats can't steal
focus mid-navigation.
D-pad activation now also accepts ENTER/NUMPAD_ENTER/SPACE, matching
how the Compose platform fires clickable cards; consuming in the
preview phase keeps OK from double-activating.
Compose clickable handles Enter/Space only; whether the TV's OK
(DPAD_CENTER) triggers click depends on the device's input stack -
worked on the API-36 host emulator, dead on the API-34 ATD and
possibly some TVs. A preview-tunnelled center handler now activates
drawer items, top-bar buttons, video and channel cards, and the
login/search buttons deterministically, exactly once (preview
consumption prevents the platform path from double-firing).
Focus search silently failed to move from the first content card up to
the top bar (why the menu felt unreachable); the first row's cards now
have a wired UP target (the search button) in rows and grids.
The BACK-opens-drawer behavior made navigation loops with the drawer
focus restore; replaced with the TV-standard: BACK leaves the player,
closes the drawer, leaves a channel drilldown, or goes Home; from Home
it is the double-press exit guard. Drawer opens via the account
button / LEFT on a leftmost card.
The channels screen waited for every listing page AND all per-channel
stats before showing anything - a 40s+ blank spinner. Rows now render
per page (unsorted), re-sorting as stat batches arrive. rebuildRows is
guarded; the earlier ClassCastException (Integer into a Long
comparator) surfaced via the sort call and can no longer abort the
app. All sort keys go through Long-typed helpers.
The drawer's tap-to-close scrim was focusable: LEFT/RIGHT from a
drawer item moved focus onto the invisible fullscreen scrim, and OK
mysteriously dismissed - the drawer felt un-navigable. Scrim is no
longer focusable; RIGHT (from the drawer) closes it and BACK closes
it; closing restores focus to the search button. LEFT on any row's
leftmost card opens the drawer (used to be only the first row).
Banner prefetch keys now match the render keys (480x270) so channel
banners stop reloading on focus movement.
Grid screens (My videos, History, Search, channel pages) switch from
3-column to adaptive columns sized exactly like the Home rows' cards,
with the compact single-line title, so every screen reads the same.
Channels now render as SmartTube rows and scroll vertically
(LazyColumn - the unscrollable Column hid rows 2+). Local channels
group one row per ownerAccount, sorted by total video count, with all
zero-video channels merged into a final 'No videos yet' row.
Followed-instance channels group per platform. The channel card
matches the video-card language: banner center-cropped, round avatar
bottom-left, channel name, 'owner display name - platform display
name' (instance names via /config, local cached at login; no domain
strings), and an icon stat line (videos | subscribers | plays); counts
load per channel in the background since the listing endpoint doesn't
carry them (verified on the live API).
Subscriptions destination switches to per-channel rows, matching the
Home card size.
Focus requesters were stored in snapshot-state maps and written during
composition of every list item: each write invalidated the reading
scope, which recomposed the (whole page of) items, wrote again, ...
This feedback loop is why vertical scrolling ran at ~2fps on the TV
while the same build scrolled fine in the emulator's short bursts.
Plain HashMaps kill the loop - focus handling needs no recomposition.
The top bar now mirrors SmartTube: a 44dp circle with the actual user
avatar (persisted at login alongside the display name; falls back to
the person icon) and the display name next to it.
Scrolling jank: add stable keys to grids and rows (item/channel ids)
- without keys Compose rebinds the whole list during scroll and
re-fires every AsyncImage + focus request, which is the realistic
culprit for the 2fps vertical scrolling on the TV.