Skip to content

Fix system subtitle appearance matching - #122

Merged
Quick104 merged 2 commits into
mainfrom
agent/fix-system-subtitle-settings
Aug 6, 2026
Merged

Quick104 merged 2 commits into
mainfrom
agent/fix-system-subtitle-settings

Conversation

@Quick104

@Quick104 Quick104 commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • treat MediaAccessibility's useContentIfAvailable behavior as a usable system fallback when Match Device Settings is enabled
  • map Apple's caption-window color and opacity to Silo's full-caption background box, while retaining glyph background as the fallback
  • preserve authored native ASS styling at the existing downstream boundary
  • add regression coverage for fallback behavior and caption-window precedence

Root cause

Apple returns caption preferences with either useValue or useContentIfAvailable. The latter still supplies the value to use when content has no competing appearance. Silo discarded every useContentIfAvailable result, so common device profiles such as Outline Text collapsed back to Silo defaults for plain text subtitles.

Apple also exposes two distinct background layers: a background behind each glyph and a window behind the full caption. Silo only read the glyph background. A tvOS profile with a transparent glyph background and a visible magenta window therefore rendered no background at all.

Validation

  • Before the fallback fix, an iOS simulator probe with the system Outline Text profile failed: MediaAccessibility returned .uniform with useContentIfAvailable, while Silo's snapshot stored nil.
  • After the fallback fix, the same iOS simulator probe passed and stored .uniform.
  • The active tvOS simulator profile was reproduced with green foreground, glyph background opacity 0, and magenta caption window opacity 0.5; the pre-fix preview showed green text with no magenta box.
  • After the caption-window fix, the same normally signed tvOS simulator build visibly rendered green text over the magenta box in the live Settings preview.
  • Focused iOS SystemCaptionAppearanceTests: 12 passed, 0 failed.
  • Normal simulator-signed SiloTV build and launch succeeded on tvOS 26.4.

Summary by CodeRabbit

  • Bug Fixes

    • Improved system caption preference handling when content-provided settings are available.
    • Ensured caption colors, opacity, edge styles, sizes, and fonts consistently respect device preferences and content fallback behavior.
    • Caption window settings now take precedence over glyph background settings, with transparent backgrounds handled correctly.
    • Unknown caption behaviors safely produce no preference value.
  • Documentation

    • Clarified caption preference precedence and snapshot behavior.
  • Tests

    • Added coverage for caption color, opacity, and preference precedence mappings.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

System caption snapshot extraction now retains direct and content-fallback values. Appearance mapping now includes window background precedence and transparent-opacity handling. Tests cover window mapping, precedence, and matching-device content fallback.

Changes

System caption appearance

Layer / File(s) Summary
Caption snapshot resolution
iosApp/iosApp/Screens/Player/Subtitles/SystemCaptionAppearance.swift
The snapshot captures window color and opacity. The resolver retains values for .useValue and .useContentIfAvailable and returns nil for unknown behaviors.
Background precedence and validation
iosApp/iosApp/Screens/Player/Subtitles/SystemCaptionAppearance.swift, iosApp/Tests/SystemCaptionAppearanceTests.swift
Visible window settings take precedence over glyph background settings. Glyph settings provide a fallback when the window is transparent. Transparent opacities clear the background style. Tests cover these mappings and the .uniform edge style fallback.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change to system subtitle appearance matching.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-system-subtitle-settings

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

@Quick104
Quick104 marked this pull request as ready for review August 6, 2026 00:28
@Quick104
Quick104 force-pushed the agent/fix-system-subtitle-settings branch from 8349670 to b3f26b3 Compare August 6, 2026 13:30
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@Quick104
Quick104 merged commit 671d4f1 into main Aug 6, 2026
1 check passed
@Quick104
Quick104 deleted the agent/fix-system-subtitle-settings branch August 6, 2026 14:22
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