Skip to content

fix(tv): announce the on/off state of profile form switches - #1041

Open
Quick104 wants to merge 1 commit into
mainfrom
fix/tv-switch-row-toggle-semantics
Open

Quick104 wants to merge 1 commit into
mainfrom
fix/tv-switch-row-toggle-semantics

Conversation

@Quick104

@Quick104 Quick104 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On Android TV, TalkBack reads switch rows in the profile form (Child Profile in Add a profile and Edit profile) by title and subtitle, but never says whether the switch is on or off. TvSwitchRow in TvProfileForm.kt shows the state only through the track color and thumb position. The row's accessibility node has no switch role and no checked state, so the tree reads "Child Profile, Fills in kid-friendly limits below" whichever way the switch is set.

Related issue: N/A (found in review of #610, which adds a second TvSwitchRow with the same gap).

Solution

Add role = Role.Switch and toggleableState = ToggleableState(isOn) semantics to the modifier passed to the row's Surface. The Surface still owns the click, so D-pad select toggles once, and focus and visuals don't change. Every TvSwitchRow, including the one #610 adds, picks this up.

Validation

  • Tested on an Android TV emulator (API 36) against a Silo dev deployment, on base bbbfdeeb5 and on this branch, via profile menu → Add Profile → Child Profile row.
  • Base: the accessibility tree shows the row with no checked state, both off and after select turns it on.
  • This branch: the row reads [unchecked], then [checked] after one select, then [unchecked] after a second. Each press flips it exactly once.
  • Base and branch screenshots are pixel-identical in both states. Focus moves Profile name → PIN → Child Profile the same way on both builds.
  • Not heard live: the emulator image has no TalkBack, so the "Switch" role announcement follows from how Compose maps Role.Switch. The checked state was confirmed in the tree.
  • ./gradlew :androidTvApp:assembleDebug passes. No test added; this is a UI change, per AGENTS.md.

Validation tasks: none

Evidence: https://evidence.siloserver.org/r/silo-android/tv-switch-row-semantics/

Risks

Low. The change adds semantics only. If tv-material's Surface sets its own role, the outer modifier's Role.Switch takes precedence on the same node.

Other clients

Other clients: Apple N/A (SwiftUI Toggle reports its state natively); Roku N/A (ProfileFormRow already speaks On/Off in its audio text); Web N/A (no TV client, no shared component). The Android phone form uses Material Switch and is unaffected.

User manual: unaffected (accessibility fix, no setting or screen change).

Council review

Ran as a follow-up of the #610 review: no plan round (small fix, one file), and one background reviewer.

Rounds: 1, last reviewed 062cd6c

Member Round 1
Sol (gpt-6.2-sol, medium) 9/10, no findings

Visual review: skipped, since base and branch captures are pixel-identical.

AI Disclosure

  • Harness: Claude Code (T3 Code)
  • Tool(s): Claude Code, agent-device (Android TV emulator), silo code-review finder
  • Model(s): claude-opus-5-5 (investigation, implementation, verification, code review); gpt-6.2-sol (background adversarial review)
  • Involvement: AI-generated, directed by the maintainer's review workflow
  • Adversarial review: medium-effort code review found nothing. The plan round was skipped as a small one-file fix. See Council review for the background review.

🤖 Generated with Claude Code

TvSwitchRow drew its on/off state only through colors and thumb position, so
TalkBack read the row's title and subtitle but never whether the switch was on.
Give the row the Switch role and its toggleable state. The Surface still handles
the click, so select toggles once and focus and visuals are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 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 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 90 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: 771591c2-34ea-4372-af09-157a9c8a22bc
Commits

Reviewing files that changed from the base of the PR and between bbbfdee and 062cd6c.

Files selected for processing: 1

  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/profiles/TvProfileForm.kt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 23, 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 ❌
⚠️ 5 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
  • Serialize cache read-modify-write operations

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T04:45:32.061887Z 062cd6c PR opened
🔒 Security Review ✅ Completed 2026-11-23T04:46:22.796233Z 062cd6c 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.

@macroscopeapp

macroscopeapp Bot commented Nov 23, 2026

Copy link
Copy Markdown

The new Switch-role and on/off announcement is not demonstrated live; the PR explains that the emulator lacked TalkBack. For Android TV, add a short recording of the profile row being focused and toggled with TalkBack, or leave this evidence gap for reviewer consideration. The evidence page should show the Android TV profile row and its off/on announcements.

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 bug Something isn't working impact: usability Core flow broken or severely blocked priority: P2 Limited scope, workaround exists, or polish labels Nov 23, 2026
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: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant