Skip to content

fix(tv): drop voice search from the TV search screen - #181

Merged
RXWatcher merged 2 commits into
Silo-Server:mainfrom
RXWatcher:fix/tv-remove-voice-search
Aug 6, 2026
Merged

RXWatcher merged 2 commits into
Silo-Server:mainfrom
RXWatcher:fix/tv-remove-voice-search

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Removes voice search from the TV search screen.

What goes

  • the mic button beside the search field, and its TvVoiceSearchButton composable
  • TvVoiceSearch.kt entirely — the controller, its RecognizerIntent plumbing and the availability probe
  • the "Voice search isn't available on this device" notice and the state behind it
  • the button's focus wiring (voiceFocusRequester, and its right/down focusProperties)
  • five imports left orphaned by the above

The one non-obvious removal

The search field carried a DirectionLeft key handler that existed only to reach the mic:

event.key == Key.DirectionLeft && !isKeyboardOpen && voiceSearch.isAvailable -> {
    runCatching { voiceFocusRequester.requestFocus() }.getOrDefault(false)
}

A read-only text field swallows Left as caret movement, so the key had to be taken from it deliberately to get focus onto the mic. With no mic to reach, that handler was intercepting a key for nothing, so it goes too — Left now falls through to ordinary focus handling.

Verification

  • :androidTvApp:compileDebugKotlinAndroid clean (forced rerun, not cached)
  • no references to TvVoiceSearch, voiceSearch, voiceFocusRequester or Icons.Filled.Mic remain anywhere in the repo
  • installed on a Google TV Streamer and exercised the search screen: field sits at the left of its row, Down still reaches the filter chips, and the route back up to the field is intact

Summary by CodeRabbit

  • Changes
    • Removed voice search from the TV search experience.
    • Removed the voice-search button and unavailable-message handling.
    • Simplified navigation and keyboard interactions while preserving text search, filters, results, and focus restoration.

Removes the mic button beside the search field and the whole voice path: the
TvVoiceSearch controller, its RecognizerIntent plumbing and availability probe,
the "voice search isn't available" notice, and the button composable.

Also removes the LEFT-key interception on the search field. That handler existed
only to reach the mic - a read-only text field otherwise swallows Left as caret
movement, so the key had to be taken from it deliberately. With no mic to reach
it was stealing a key for nothing, so Left now falls through to ordinary focus
handling.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a322798-c0c7-4f15-be67-ae7982966598

📥 Commits

Reviewing files that changed from the base of the PR and between b52eb87 and 5300782.

📒 Files selected for processing (2)
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvVoiceSearch.kt
💤 Files with no reviewable changes (2)
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvVoiceSearch.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.kt

📝 Walkthrough

Walkthrough

The TV search screen removes voice-search integration, microphone controls, related focus navigation, and unavailable-device messaging. The dedicated TvVoiceSearch.kt controller is deleted. Text search, filters, results, and keyboard navigation remain.

Changes

TV voice search removal

Layer / File(s) Summary
Remove voice-search integration
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvVoiceSearch.kt
The screen no longer creates or passes voice-search state. The dedicated voice-search controller file is deleted.
Remove voice-search UI and navigation
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/search/TvSearchScreen.kt
The microphone button, unavailable message, related focus styling, and closed-keyboard Left navigation are removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removal of voice search from the TV search screen.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@RXWatcher
RXWatcher merged commit 064c8a7 into Silo-Server:main Aug 6, 2026
2 checks passed
Quick104 added a commit that referenced this pull request Aug 17, 2026
Phone:
- Mic in the search field launches the system speech recogniser
  (RecognizerIntent, no RECORD_AUDIO); a spoken query searches
  immediately, bypassing the debounce without a duplicate request.
  Manifest declares RECOGNIZE_SPEECH package visibility.
- Visible loading state (progress bar + "Searching…") instead of a
  blank surface; Retry button on errors; keyboard hides on scroll;
  pill field, tighter spacing, result-count restyle.

TV:
- Restore voice search (mic left of the field, reached with Left),
  reverting #181, with an empty-state hint for the route.
- IME Search action now hides the keyboard and returns the field to
  read-only; Down from the read-only field is taken in the preview
  phase so the chips/results are reachable after a search.
- Post-search focus handoff actually runs: the effect was keyed on
  pendingSearchFocus and cleared it before its first frame await,
  cancelling itself every time. It no longer waits on the request
  lookup when library results are already present, and on failure
  lands on "Try again" ahead of the request row.
- Header and "Available to request" no longer double the safe-area
  inset; the request LazyRow bleeds into the gutter so the focused
  first card is not clipped. Up from any request card routes to
  results / Try again / chips, and focusing Try again scrolls the
  header back into view.

Shared: ApiResult.errorMessage() distinguishes timeouts from
unreachable servers; TV no longer shows the raw exception + URL.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant