Repository navigation
fix(tv): close the audiobook Speed panel with Back - #705
Conversation
Before Android 16, Back reaches the app as a key event, and Compose turns an unconsumed Back KeyDown into a focus-exit search. The audiobook panel scaffold contains focus with exit = Cancel. For panels whose rows sit directly in that column, such as Speed, the cancelled search consumed the KeyDown, so the activity never tracked the press and the player's BackHandler never ran: Back and Escape could not close the panel, and it was still open after Home and relaunch. (Chapters, whose rows sit in a lazy list, already closed.) The scaffold now takes both halves of Back/Escape and hands the press to the back dispatcher, ignoring the canceled KeyUp that Android 16 forwards after its own back callback. The Speed panel also scrolls, so every preset down to 3x is reachable instead of clipped at the screen edge.
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 59 minutes. View limit details
Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: Silo-Server/silo-server#1253
Validation tasks: unblocks #350 C9 and C12
On Android TV, the audiobook player's Speed panel can't be closed with the remote: Back and Escape do nothing, and only Home or force-stopping the app gets out. The panel also cuts off its last rows, so 2.5× and 3× can't be reached.
Approach
On Android versions before 16, Compose turns Back into a "leave this focus group" move. The panel's container blocks focus from leaving, so the move is cancelled and the key is swallowed before the panel's Back handler can run. Panels whose rows sit in a lazy list, like Chapters, weren't affected. The shared panel container now handles Back/Escape itself and hands it to the normal back handling. It ignores the cancelled key-up Android 16 sends after its own back callback, so one press closes only one layer. The Speed list now scrolls.
Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-705/
Surface and build: Android TV, audiobook player → Speed; before on
origin/maine9c410096, after on this branch; same synthetic book. Phone and tablet don't use this panel.Risks
The container handles Back for every TV audiobook panel, so any panel that relied on swallowing Back would now close. None was found.
Checklist
AI Disclosure