Repository navigation
Description
What happened
The Android TV Watch Next sync downloads and decodes every Home row to fill the launcher's Continue Watching tiles. It keeps only the continue_watching and next_up rows and throws the rest away.
The sync runs every hour in the app's process, including while a video plays. With a large Home (dozens of rows of up to 100 items) one read builds the whole response as a single string of several megabytes and then decodes it. On a device with a 192 MB Java heap, where the player can hold up to half the heap in buffers, that read can run the app out of memory. This is the same kind of read behind silo-android#623.
Steps to reproduce
Not reproduced live. Found from source while fixing silo-android#623.
- On Android TV, sign in to a profile whose Home has many rows with high item limits.
- Play an episode or movie for more than an hour, so the hourly Watch Next sync runs during playback.
- The sync calls
GET /api/v2/home/sectionsand decodes every row (androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/watchnext/WatchNextHomeSync.kt:42) before filtering by section type (line 48).
Expected behavior
The sync reads only what Watch Next shows. GET /api/v2/home/layout (no include_items) lists the sections with their id and section_type. The sync can then read just the continue_watching and next_up rows through GET /api/v2/home/sections/{id}/items. Both endpoints exist on every v2 server.
Silo version / commit
silo-android origin/main at 33945a0. Server origin/main (the layout endpoint has been there since the API v2 migration).
Deployment
Any.
Clients affected
Android TV only. The phone app has no Watch Next sync.
Relevant logs
No logs available.
Technical notes
- Raised in the plan review for silo-android#623 and listed as a follow-up in silo-android#551 ("the TV Watch Next sync still downloads all of Home just to get Continue Watching").
- The fix for silo-android#623 stops Home's own realtime refreshes while the player covers Home. It does not cover this worker.
AI harness
Claude Code, running in T3 Code
AI tool(s)
Claude Code; Codex (cross-provider plan review)
AI model(s)
claude-opus-5-5; gpt-6.1-sol (review)
AI involvement
AI-found from source; not reproduced on a device.
Independent or adversarial review
A Codex review of the silo-android#623 fix plan raised it. The source lines above confirm it.
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment
Source: found in review of the fix for silo-android#623
Activity
feardubin commentedon Nov 1, 2026
I've opened #775 for this. I haven't had a PR merged in a Silo repository and wasn't asked first, so please close it if you'd rather implement the fix yourselves.
The issue says this wasn't reproduced on a device. Here's a live occurrence:
GET /api/v2/home/sectionsof about 1.02 MB to the device. About 1 s later the app crashed withjava.lang.OutOfMemoryErrorinStringFactory.newStringFromChars. The failed 2,033,584-byte allocation is that body as a UTF-16 string.The server log doesn't name the caller. One of the two reads came just before a new playback started, which also fits the player's On Deck load (
TvPlayerViewModelreads all of Home at playback start), so that path may need its own fix.#775 makes the sync read
GET /api/v2/home/layout, then only thecontinue_watchingandnext_uprows (capped at 20 cards, as Home draws them), and neverGET /api/v2/home/sections.AI disclosure: written with Claude Code (
claude-opus-5-5), reviewed with Codex (gpt-6.1-sol). Involvement: fully AI-generated.fix(tv): read only the Watch Next rows instead of all of Home (Silo-S…