Skip to content

fix(tv): let Down leave the search field after Back hides the keyboard - #561

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/tv-search-down-after-keyboard-back
Oct 13, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/tv-search-down-after-keyboard-back

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-server#1201
Validation tasks: unblocks #339 C4

On Android TV, after typing in Search and hiding the keyboard with Back, pressing Down does nothing: focus stays in the search field, so a remote-only user can't reach the results or the "Available to request" section without going up to the top menu and back. This change lets Down leave the field once the keyboard is gone.

Approach

The screen tracked whether the keyboard was open with a flag it set and cleared itself. Back pressed while the keyboard is up is consumed by the keyboard and never reached the screen's handler, so the flag stayed set. The flag now follows WindowInsets.isImeVisible: once the keyboard has appeared and then disappears, the field becomes read-only again, whatever closed it. Keyboards that never report insets behave as before.

Validation

  • Android TV emulator, before and after: Search, Select, type, Back, Down moves to the filter chips and then the results; typing, reopening the keyboard and submitting with the keyboard's Search key work as before.
  • :androidTvApp search and usability tests: pass, including new tests for the keyboard state.

Evidence

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

Risks

None identified.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code (Bash, file edits, subagents), GitHub CLI (gh), Playwright, Xcode xcodebuild/simctl, Maestro, Android emulator/adb
  • Model(s): Claude Opus 5.5 (claude-opus-5-5)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: A separate Claude Code review pass (medium) covered every branch of the Requests validation fixes across silo-server, silo-apple and silo-android. Its findings (a commit message that misdescribed the unfollow response, a tablet layout that hid the title) were fixed. This was an AI self-review; no independent human review is claimed.

On Android TV, typing a search query and then dismissing the on-screen
keyboard with Back left the viewer stuck on the search field: D-pad Down
did nothing, so the results and the "Available to request" row could only
be reached by going up into the top menu and back down.

The search screen tracked the keyboard with its own isKeyboardOpen flag,
set on Select and cleared only by the keyboard's Search action, by focus
leaving the field, or by the screen's BackHandler. Back pressed while the
IME is up never reaches that BackHandler: the IME consumes the key to hide
itself. The flag stayed true, the field stayed editable, and the text
field swallowed Down as a caret move before the Down-to-chips handler
(gated on the flag being false) could run.

The screen now follows WindowInsets.isImeVisible: once the IME has
appeared after Select and then goes away, the field returns to read-only
and Down moves to the filter chips and results again. The flag ignores
the frames between show() and the IME surfacing, so opening the keyboard
and typing are unchanged.
@silo-kody

silo-kody Bot commented Oct 12, 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 ❌

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4eb3e341-9897-49ec-a079-6cf5846571c3

📥 Commits

Reviewing files that changed from the base of the PR and between 726684d and e4120ee.


📒 Files selected for processing (3)
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchInputRules.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchKeyboardStateTest.kt

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@silo-triage silo-triage Bot added 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 12, 2026
@Quick104
Quick104 merged commit ca38716 into Silo-Server:main Oct 13, 2026
9 checks passed
@Rhainland Rhainland mentioned this pull request Oct 13, 2026
4 tasks done
neurekadev pushed a commit to neurekadev/silo-android that referenced this pull request Oct 14, 2026
Silo-Server#439)

* feat(requests): make requests look and behave like the rest of the app

Port the iOS and tvOS Requests redesign (silo-apple Silo-Server#558, Silo-Server#561, Silo-Server#540)
to Android phone and Android TV.

- Shared: the server's `state` decides display status; a four-step
  progress track; My Requests buckets; a session detail cache with
  prefetch; admin approve/decline/retry with a 60-second hold after a
  lost response; create, cancel and moderation are never resent.
- Phone: large-title hub with a status summary, My Requests in grouped
  rows with a filter menu and swipe to cancel, a new Approvals page,
  and request detail on the library title hero.
- TV: Requests becomes a top-bar tab in the Skyline layout, with a
  preview panel that shows status and progress, admin rows, and
  request detail on the library detail hero.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(requests): address review findings on request state and routing

- Clear request session state on every feature reset (sign-in, sign-out,
  server and profile switches) and drop reads or mutation broadcasts that
  answer after a reset.
- Approval reads: a newer read wins, and a read sent before a decision
  can't bring the decided row back.
- Unconfirmed create and cancel holds now end only when a read shows the
  result, or after 60 seconds, like admin decisions.
- A proxy's 502/503/504 without the server's problem body counts as an
  uncertain outcome.
- Request detail reuses a /requests/mine read from the last 30 seconds,
  re-reading only to settle an uncertain action; the hub counts pending
  approvals from one page; a page's own decision no longer triggers a
  second read.
- TV long-press actions are computed by the caller, so the dialog no
  longer writes parent state during composition.
- RequestRouter moves to android-shared and handles every request tap on
  phone and TV, including both search screens.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(requests): address PR review findings

- TV: each request detail opened from another one gets its own
  back-stack entry and view model, instead of reusing the current one.
- TV: a failed action's message no longer replays when the page
  returns, and an approval queue that fails to load says so.
- Request detail applies a create, cancel or decision result as soon
  as the server returns it, so a failed re-read can't bring back
  Request, Cancel or the decision buttons.
- A failed or declined title the server calls requestable offers
  Request again instead of a blocking status.
- A /requests/mine read that a create or cancel overtook keeps the
  patched list and doesn't count as fresh.
- Phone: My Requests pull-to-refresh also refreshes the approvals
  card; grouped rows are separate lazy items; the row error text comes
  from the caller.
- FEATURES.md no longer says the admin stats dashboard is exposed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants