Repository navigation
Description
What happened
If two watched toggles on the same grid card both fail, the card can end up showing the opposite of the server's state. Mark an unwatched episode watched, then mark it unwatched before the first write settles, and let both writes fail. The card stays marked watched, while the server still has it unwatched.
rememberBrowseItemCardActions (phone) and its TV counterpart snapshot previous = state when each toggle starts:
- The second toggle snapshots the first toggle's optimistic
played = true. - The first write fails, but it skips its rollback because the second write is now current.
- The second write fails and restores its snapshot,
played = true.
The wrong state lasts until the card's source item reloads.
Steps to reproduce
Not reproduced live. Traced from source on main:
- In a catalog, search, or library grid, open the card menu on an unwatched episode and choose Mark as Watched.
- Before that write settles, choose Mark as Unwatched on the same card.
- Let both writes fail, for example by going offline before the first one is sent.
- The card shows the episode as watched. The server has it unwatched.
Expected behavior
When every write fails, the card returns to the last state the server confirmed: unwatched.
Silo version / commit
silo-android main at e535ddceb.
Deployment
Not deployment-specific. Client-side state handling.
Area
Other
Clients affected
Android
Client app and device
Android phone and Android TV grid cards. Code paths: androidApp/.../ui/components/CardActionsHelpers.kt (onSetWatched) and androidTvApp/.../ui/components/TvCardActionsHelpers.kt.
Relevant logs
No logs available.
Technical notes
Roll back to the last confirmed state, not the previous optimistic one. For example, keep a confirmed baseline that only successful writes advance, and restore it when the current write fails.
The fix touches lines that #427 changes (it makes a watched change also clear resume progress). It should follow that PR. With #427's spoiler protection on, a card left wrongly watched also shows the episode's still unblurred.
AI harness
Claude Code, through T3 Code
AI tool(s)
Claude Code tools, GitHub CLI
AI model(s)
claude-opus-5-5
AI involvement
AI-found during review of #427 and confirmed from source on main. Not reproduced on a device.
Independent or adversarial review
None beyond the #427 review that found 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
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Source: found in review of #427
Activity