Skip to content

feat(tv): bring back the voice search button on Android TV search - #830

Merged
Quick104 merged 2 commits into
mainfrom
fix/tv-voice-search-button
Nov 6, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/tv-voice-search-button

Conversation

@Quick104

@Quick104 Quick104 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Users report that voice search on Android TV only works through Gboard. Silo's TV search has no mic of its own: it relies on the keyboard's mic key, so a TV whose keyboard has no mic key gets no voice search in Silo. The remote's mic button can't fill the gap, because Android TV sends it to the system assistant before any app sees it.

Approach

Restore the on-screen mic removed in #286 (originally added in 07df233, with the Google TV Streamer recogniser fix from 9c9c869). Selecting it opens the system speech recogniser with a "Speak a title" prompt, and the recognised text is submitted like a typed query, with focus moving to the results.

#286 removed the mic partly because it sat left of the field and pushed the field off the page gutter. It now sits to the right, so the field stays in line with the chips and cards. The row reads field, mic, clear. Right from the field focuses the mic, Left walks back, and Down from the mic goes to the filter chips. The mic is hidden when the device has no recogniser.

Silo still never records audio: the system recogniser listens, so no RECORD_AUDIO permission is needed. The manifest gets back the <queries> entry that lets Android 11+ see the recogniser. The typed and spoken paths now share one submit function. TV-only; the phone search bar already has a mic.

Validation

  • :androidTvApp:assembleDebug builds; :androidTvApp:testDebugUnitTest passes.
  • Android TV emulator (Android 16, 1080p) against the shared dev server: the mic appears beside the field, Select opens Google's recogniser with "Speak a title", Back from the recogniser returns focus to the mic, Left/Right/Down move between field, mic, clear and chips as described, and with Google's speech package disabled the mic is hidden.
  • Not tested: a real spoken result, because the emulator has no microphone input. That result path is the one the earlier TV mic shipped with.

Evidence

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

Surface and build: Android TV debug builds of main (before) and this branch (after) on the same emulator, server, and query. Phone, tablet, and foldable are unaffected: the change is in the TV app only.

Risks

This reverses the product call in #286 and #181, which removed the TV mic. On a TV whose keyboard has a mic key there are now two ways to start voice search.

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 (in T3 Code)
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, not yet human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Add voice search button to Android TV search screen

  • Adds TvVoiceSearchController and rememberTvVoiceSearch in TvVoiceSearch.kt, which launch a speech-recognition activity and return the first non-empty recognized result. Recognizer availability is checked via the package manager; with multiple recognizers, the configured voice-interaction or assistant package is preferred.
  • Adds a microphone button next to the query field in SearchStage and shows a message when voice search cannot start.
  • In TvSearchScreen.kt, recognized text is capped at the typing limit and submitted through a shared callback that trims the query and runs both library search and request search (when enabled and at least two characters).
  • Behavioral Change: a matching in-flight request search is no longer restarted by the query effect; a matching query with no error counts as answered even while loading.

Macroscope summarized b37c2db.

TV users could only search by voice through a keyboard mic key, so anyone
whose TV keyboard lacks one had no voice search in Silo. The remote's own mic
button goes to the system assistant before any app sees it, so an on-screen
button is the only entry point an app can offer.

Restore the mic removed in #286, recogniser selection included, and place it
right of the field so the field stays on the page gutter. Right walks
field, mic, clear; the mic is hidden when no recogniser is installed. Silo
hands listening to the system recogniser and still needs no RECORD_AUDIO.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 87 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

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: cc04d09b-c622-4025-9f81-ce907eaacd75
Commits

Reviewing files that changed from the base of the PR and between e9861fa and b37c2db.

Files selected for processing: 3

  • androidTvApp/src/androidMain/AndroidManifest.xml
  • 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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Nov 6, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T02:07:27.259676Z 46c8dd2 PR opened
🔒 Security Review ✅ Completed 2026-11-06T02:09:06.818957Z 46c8dd2 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-kody

silo-kody Bot commented Nov 6, 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 ❌

@macroscopeapp

macroscopeapp Bot commented Nov 6, 2026

Copy link
Copy Markdown

Evidence is missing: Evidence: EVIDENCE_LINK is a placeholder, and no screenshots or recording are attached.

  • Search UI changes—the mic beside the field, the unavailable-state message, and hiding the mic without a recognizer—are on Android TV only. Please provide before/after screenshots of the same search screen, plus a capture of the no-recognizer state; identify the device and build or commit.
  • Voice-search interaction—opening the recognizer, focus movement/return, and submitting a spoken query—is on Android TV only. Please provide a recording of the flow. The validation notes say real spoken input was not tested because the emulator has no microphone, but they do not provide evidence of the interaction.

Phone, tablet, and foldables are correctly excluded because the changed code is in the TV app.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@silo-triage silo-triage Bot added enhancement New feature or request needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish labels Nov 6, 2026
…uery

A spoken query is set and submitted at once, so the query-change effect
started while that request search was in flight and, past its 300 ms delay,
cancelled and restarted it. Treat a search loading for the same query and
media type as answered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 6, 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

@Quick104

Quick104 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

The evidence placeholder was replaced after this check ran. The PR body now links https://evidence.siloserver.org/r/silo-android/pr-830/, which has before/after captures of the same TV search screen with and without a query, the recogniser opening, and the mic hidden when no recogniser is present.

🤖 Claude Code (claude-opus-5-5)

@Quick104
Quick104 merged commit 4fb8f1b into main Nov 6, 2026
9 checks passed
@Quick104
Quick104 deleted the fix/tv-voice-search-button branch November 6, 2026 02:26
Albinoman887 added a commit to SiloraOSS/silora-android that referenced this pull request Nov 7, 2026
Audit the upstream voice helper, result/submission callback, activity, ViewModel and manifest against PR Silo-Server#830: no omitted upstream voice code or permission was found. The reported Shield session still returned no text; its runtime cause remains unconfirmed.

Restore the prior speech controller, overlay, permission flow and eight session tests. Retain upstream in-flight request-search deduplication. Reactivate tv-voice and defer the activity-based replacement until an official build is confirmed to complete a spoken search on the affected device.

Validation: all 1,434 TV host tests, full TV release lint and release Kotlin compilation passed. Physical-device capture/result return remains unverified.
Albinoman887 added a commit to SiloraOSS/silora-android that referenced this pull request Nov 7, 2026
Restore the prior speech controller, overlay, permission flow and eight session tests. Retain upstream in-flight request-search deduplication. Reactivate tv-voice and defer the activity-based replacement until an official build is confirmed to complete a spoken search on the affected device.

Source and packaged-manifest comparison against PR Silo-Server#830 found no omitted upstream voice code or permission. Follow-up device testing by Matt reproduced the missing search text on an onn 4K Pro running Android 14 with unchanged upstream source at f13a265. Matt reports that the microphone works in other apps and with the prior Silora implementation. The failure therefore reproduces without Silora patches; it is not dependent on our merge or keyboard integration. The exact recognizer/provider failure has not been traced.

Original validation: all 1,434 TV host tests, full TV release lint and release Kotlin compilation passed. The restored controller, overlay and session tests match the prior implementation byte for byte. Matt's working-device report covers that prior implementation; the final rebuilt restoration still needs its own device check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish size/L 200–499 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant