Skip to content

fix(tv): close the audiobook Speed panel with Back - #705

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/1253-tv-speed-panel-back
Nov 6, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/1253-tv-speed-panel-back

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

  • No unit test: the change is key and focus handling only.
  • TV unit tests and lint for the touched module, debug build: pass.
  • Android TV emulator (Android 14), remote only, twice: before, Back, Back ×2 and Escape left the panel open, and only 1.75× was fully visible. After, Back and Escape close it, focus scrolls down to 3×, Back still closes Chapters, and Back with no panel open still leaves the player. Android 16 behaviour was not checked (no Android 16 TV image).

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/pr-705/

Surface and build: Android TV, audiobook player → Speed; before on origin/main e9c410096, 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

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (T3 Code)
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Gradle, Android Emulator, adb
  • Model(s): claude-opus-5-5; gpt-6.1-sol (review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: Independent Claude Opus 5.5 and GPT 6.1 Sol reviews of the branch diff (correctness, repo standards, the bug as described). Neither found anything.

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.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

This 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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: be39d5a2-4dac-40b5-92f2-7f66377e9ae3
Commits

Reviewing files that changed from the base of the PR and between 548617c and a6aa66c.

Files selected for processing: 2
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/audiobook/TvAudiobookOverlay.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/audiobook/TvAudiobookSpeedPanel.kt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Validate download ownership before publishing subtitle bytes
  • Bind playback markers to the actual playing file
  • Share route-aware audio decisions and preserve original-format decoder fallback
  • Apply playback route eligibility consistently at admission and media loading

@silo-triage silo-triage Bot added size/M 50–199 added + deleted lines (all files); change volume, not priority. bug Something isn't working impact: usability Core flow broken or severely blocked priority: P1 Core-path bug; painful workaround — next after P0 labels Oct 27, 2026
@Quick104
Quick104 merged commit ee178d8 into Silo-Server:main Nov 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: usability Core flow broken or severely blocked priority: P1 Core-path bug; painful workaround — next after P0 size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants