Repository navigation
fix(tv): keep focus reachable after scrolling Search results - #736
Conversation
Up from an "Available to request" card was pinned to the first result card. Once the grid scrolled, that card left composition, the move failed, and the shell parked focus on the top bar. The search icon and Down from the bar then tried to focus the search field, which had also scrolled out of composition, so focus bounced back to the bar until the app restarted. Leave Up from the request row to spatial search when results exist. Pressing the search icon while on Search now scrolls to the top and focuses the field, the same path Back uses. Down from the bar falls back to the content group when the field is not composed. Fixes #730 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Findings
|
| Layer / File(s) | Summary |
|---|---|
Search focus handling androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.kt |
Request-result cards defer UP focus to spatial search when catalog items exist. Otherwise, UP targets the error action, people row, or first filter chip, in that order. Search focus claims fall back to the content group if the search field cannot take focus. When Search is already active, its button closes the profile menu and requests focus on the search field. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested labels: bug, impact: usability, priority: P2, evidence-required, size/M
Suggested reviewers: rxwatcher, rhainland
Merge Risk: 
Moderate · up to 4492a
-
Search focus can land outside the intended field or results, including when moving Up from a request card. Resolve these navigation paths before merging.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Issue
#730requires Android TV Search focus to move up from the “Available to request” row through the results instead of to the top-bar search icon. InTvSearchScreen.kt, the request-cardfocusPropertiesno longer pinsupto the first result when catalog results exist, so spatial navigation handles the move to the card above. The same Android TV change also handles the issue’s reported search-icon path: inTvMainShell.kt, pressing Search while already on Search incrementssearchBackToInputRequest, and Search focus falls back to the content group when the input is not composed. No additional automated-test requirement appears in issue#730.
Full details: Out of Scope Changes check
-
Explanation
The pull request changes only Android TV Search focus routing in
TvSearchScreen.ktandTvMainShell.kt. The request-row Up behavior, the search-icon return path, and the content-focus fallback all support issue#730and the stated Android TV focus flow. No phone, Apple client, unrelated feature, or unrelated refactor is shown in the reviewed changes.
Full details: Description check
-
Explanation
The pull request description directly explains the Android TV Search focus-routing changes, their purpose, implementation approach, validation status, and scope. It matches the files and objectives in the changeset.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Evidence is missing for the Android TV focus change. Please add before-and-after captures of Search with the same data and a short recording showing Up from the request row, the search-icon and top-bar Down paths, and returning from a request item with Back. Identify the TV device or emulator and builds. The stated phone exclusion is sufficient; build and unit-test results do not show the focus behavior. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4492a0300c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The shell keeps its back-to-field counter raised, and the Search effect keyed on it relaunched whenever the screen re-entered composition. A Back out of a result then scrolled to the top and focused the field, competing with the return restoration. Remember the handled request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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:
|
|
The Validation section explains that TV device automation failed, but the visible focus changes still lack the required evidence; the new commit also adds a distinct return-from-result focus fix.
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
The Search screen saves the last request it handled, but the shell kept its counter in plain remember. After recreation, or after an outer detail route removed the shell, the counter reset while the record survived and read as a new request. Save both with the same lifetime. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
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:
1d86a331-2aab-44a6-8065-01659cf0edd8
Files selected for processing: 2-
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.kt
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
-
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:
|
|
The latest commit adds a visible Android TV lifecycle case: saving the shell counter prevents Search from replaying its focus request after recreation or return from an outer detail route. The Validation section explains that device automation could not run; I accept that as unavailable evidence. For this new case, evidence is still absent: a short recording of the return and resulting focus on Android TV, with the device and build or commit identified, would let reviewers verify it. Suggested fix: Add the recording if it becomes possible to capture; otherwise keep the reason evidence is unavailable in the PR description. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
Entering Search from another tab, the field is not composed yet and the content group still holds the outgoing screen. The fallback focused that and ended the retries that wait for the field. Fall back only when Search was already on screen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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:
|
Brings in the three Silo commits the published Zidoo APKs already include (Silo-Server#736, Silo-Server#737, Silo-Server#745), so a build without the newest Silo code matches the APK in use. The merge had no conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qpc8JM4yNwzvTEA5WihWh
Problem
Closes #730
Related issue: N/A
Validation tasks: none
On Android TV, scrolling down a Search page to the "Available to request" row can trap focus. Pressing Up from a request card jumps to the search icon in the top bar instead of moving back up through the results. From there, the search icon and Down both fail to return to the search field, and the viewer has to restart the app. Opening a request item from that row and pressing Back leads into the same trap.
This change keeps Up moving through the results and makes the search icon and Down from the top bar return to the page.
Approach
The search field, the results, and the request row all scroll in one lazy grid, and anything far off screen leaves composition. Three paths aimed focus at targets that had left composition. Each move failed, and the shell parked focus on the top bar:
Android TV only. The phone app and Apple clients are not affected.
Validation
:androidTvApp:assembleDebugand:androidTvApp:testDebugUnitTest: pass.Risks
Focus routing on the TV Search screen and on the shell's Search entry points only. If spatial search picks an unexpected card above the request row, Up could land on a different result than the first one. It still stays within the results.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Fix Search focus on TV: track handled focus requests and saveable back-counter
claimContentFocusin TvMainShell.kt can now fall back to a content-focus request when the search input claim fails on the Search route, changing the return value of that branch.Macroscope summarized 0418051.