Skip to content

feat(tvos): paint an ambient backdrop wash from the artwork's colors - #829

Merged
Quick104 merged 6 commits into
mainfrom
feat/tvos-ambient-backdrop
Oct 18, 2026
Merged

Quick104 merged 6 commits into
mainfrom
feat/tvos-ambient-backdrop

Conversation

@Quick104

@Quick104 Quick104 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On Apple TV, the page around the Home and library landing backdrop is washed with one averaged color, and item detail pages use a flat tint. Neither carries much of the artwork's own character into the rest of the page.

Solution

  • Colors: HeroBackdropPalette now samples three tints from the 64 px palette thumbnail:

    • base: the mean color, as before
    • accent: the strongest hue, weighted so a small vivid area beats a large muted one
    • shadow: the mean of the darkest quarter

    Each is scaled for the dark theme as before.

  • Shared wash: TVBackdropTintWash paints the base gradient (unchanged from main), an accent glow rising from the bottom edge under the right of the rows, and the shadow tone in the bottom-left corner.

    • The root landings (TVRootHeroBackdrop) use all three.
    • Detail surfaces (TVDetailPageSurface: movie, series, loading, request) keep main's dim base tint and add the accent and shadow washes.
  • Art: unchanged. The backdrop keeps main's box, position, and fade, and nothing new is drawn over or behind it. The accent and shadow washes stop below and beside where the art ends.

iPhone, iPad, and Mac only read the base tint (PhoneDetailHero). It is still the mean color of the same thumbnail with the same scaling, now computed from a 24 × 24 redraw instead of CIAreaAverage.

Verification

  • Apple TV simulator (tvOS 27.0, Xcode 27.0), signed in to shared dev. Before (main 9f8f7ca) and after (9441a11) were captured on one simulator with the same data: Home with a series focused, a movie detail page, and a series episode detail page. Inside the art, the pairs match: 57–72 dB PSNR on a face, the opaque art, and the art's fade.
  • Compile: tvOS compiles on the final commit (MacDev job b4ec3d04). iOS and macOS compiled unsigned with Xcode 27.0 before the later tvOS-only commits.
  • Tests: HeroBackdropPaletteTests (new, 4) pass on the tvOS simulator, along with ArtworkSizingRequestTests and ImageSizeCapabilityTests, 36 tests in all. That run was at an earlier commit of this PR; later commits only changed tvOS backdrop views.
  • Base tint on iPhone, iPad, and Mac: I compared the old and new samplers on 141 images. For sRGB art, which is what servers send, the base tint differs by at most 0.98/255. For Display P3-tagged images it differs by up to 52/255: the new sampler converts them to sRGB, where the old one read P3 values as sRGB. I didn't capture those devices.

Evidence: https://evidence.siloserver.org/r/silo-apple/tvos-ambient-bleed/

AI disclosure

This change was written with Claude Code (model claude-opus-5-5) running in T3 Code. No other AI tools were used.

🤖 Generated with Claude Code

Note

Render ambient base, accent, and shadow backdrop washes from artwork colors on tvOS

  • HeroBackdropPalette now samples artwork into a Tints bundle (base, accent, shadow) via a 24x24 pixel redraw, a 12-bin hue histogram for the accent, and darkest-quarter averaging for the shadow; near-grayscale art falls back to a flat base (HeroBackdropPalette.swift)
  • New TVBackdropTintWash view layers a base gradient, a bottom-right accent ellipse, and a bottom-left shadow ellipse; TVRootHeroBackdrop and TVDetailHero use it, with tint changes animated as one value (TVRootHeroBackdrop.swift)
  • Existing single-color APIs (tintColor(for:), cachedTint(for:)) remain as wrappers returning the base component
  • Base and accent target luminance 0.22, shadow 0.07; new test suite covers vivid-hue selection, grayscale fallback, shadow darkness, and bright-art dimming (HeroBackdropPaletteTests.swift)
  • Risk: TVFocusMarqueeModel.tintColor was replaced by a tints property and CalendarView now passes a Tints value, so out-of-tree callers of the old single-color API surface must migrate

Macroscope summarized 9441a11.

- Sample base, accent, and shadow tints from each backdrop instead of one average color
- Share the tint wash and grain between the root landings and item details
- Enlarge the backdrop to an uncropped 16:9 box with a smoother elliptical fade
- Request hero backdrops at the larger box's 1479 pt fill width
- Add a slow push-in on the backdrop art that stops when Reduce Motion is on
- Add HeroBackdropPalette tests for accent, shadow, and dimming

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Oct 18, 2026
@silo-kody

silo-kody Bot commented Oct 18, 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 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6335afc1-fa51-483a-bc8b-be63eeb8f5f9
📥 Commits

Reviewing files that changed from the base of the PR and between 4d650df and 9441a11.

📒 Files selected for processing: 2
  • iosApp/iosApp/tvOS/Components/TVRootHeroBackdrop.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVDetailHero.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Hero backdrop sampling now produces base, accent, and shadow tints from image pixels. tvOS marquee and backdrop views pass and render the palette, with fallback tints when artwork is unavailable.

Changes: Hero Backdrop Palette and Rendering

Layer / File(s) Summary
Multi-tint sampling and caching
iosApp/iosApp/Components/HeroBackdropPalette.swift, iosApp/Tests/HeroBackdropPaletteTests.swift, iosApp/iosApp/Components/Images/PosterImageCache.swift
The sampler derives base, accent, and shadow tints from a 24×24 image redraw and caches successful results by URL. Tests cover accent selection, grayscale fallback, shadow luminance, and base luminance. Image warming requests the full palette.
Palette state and backdrop inputs
iosApp/iosApp/tvOS/Components/TVFocusMarquee.swift, iosApp/iosApp/Screens/Calendar/CalendarView.swift, iosApp/iosApp/tvOS/Components/TVSkylineSectionFeed.swift, iosApp/iosApp/tvOS/Screens/Detail/TVDetailHero.swift
The marquee and detail surface apply cached or sampled palettes and reset to fallback palettes when needed. Calendar and skyline backdrops pass palettes to the root backdrop.
Tint wash rendering
iosApp/iosApp/tvOS/Components/TVRootHeroBackdrop.swift
The root backdrop renders separate base, accent, and shadow gradients. Visibility and base-gradient options control the wash.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant TVFocusMarqueeModel
  participant HeroBackdropPalette
  participant TVRootHeroBackdrop
  TVFocusMarqueeModel->>HeroBackdropPalette: Request cached or sampled tints
  HeroBackdropPalette-->>TVFocusMarqueeModel: Return Tints
  TVFocusMarqueeModel->>TVRootHeroBackdrop: Pass tints
Loading

Suggested reviewers: zzebrahz, blurbery

Merge Risk: ⚪ Minimal · up to 9441a

The backdrop’s hidden states retain only the page-background tint, so the reviewed visibility concern does not present a remaining merge risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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.
Title check Passed The title clearly and concisely describes the main change: adding an artwork-derived ambient backdrop wash on tvOS.
Description check Passed The description is detailed and directly explains the problem, multi-tint sampling solution, affected tvOS surfaces, compatibility, and verification results.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

@macroscopeapp

macroscopeapp Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Apple TV — The shared backdrop changes reach Home, library Browse/For You, the Requests landing, and movie, series, and request details. The description identifies before-and-after captures for Home and movie/series details, but not the library Browse/For You screens, Requests landing, or request details. Please add before-and-after screenshot pairs for those surfaces.

iPhone, iPhone Duo folded and open, iPad, and Mac — The shared sampler changes the base tint on phone and Mac detail pages. The description says iPhone, iPad, and Mac captures were not taken and gives no reason for excluding them; the Duo configurations are not covered. Please add before-and-after detail screenshots for each device/configuration.

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 impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Oct 18, 2026
The slow scale on the backdrop art drew the eye away from the page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added size/L 200–499 added + deleted lines (all files); change volume, not priority. and removed size/XL 500–999 added + deleted lines (all files); change volume, not priority. labels Oct 18, 2026
@silo-kody

silo-kody Bot commented Oct 18, 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 ❌
⚠️ 3 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:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

The 16:9 box moved the art's center left and down. Go back to the
64% × 70% box and its 1344 pt request width; the new fade and colors stay.

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

silo-kody Bot commented Oct 18, 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 ❌
⚠️ 3 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:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

The elliptical fade left the middle of the art at about 30% opacity.
Restore the two crossed fades from main so the art shows as before; the
sampled-color wash and grain still fill the page around it.

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

silo-kody Bot commented Oct 18, 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 ❌
⚠️ 3 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:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

The grain was drawn over the art on Home, and the accent glow reached up
into the art's fade. Draw the grain under the art, as the detail page
already does, and anchor the glow to the bottom edge so it stops below
where the art ends.

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

silo-kody Bot commented Oct 18, 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 ❌
⚠️ 3 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:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

@macroscopeapp

macroscopeapp Bot commented Oct 18, 2026

Copy link
Copy Markdown

The evidence link is present, but the described Apple TV “after” captures are from 4d650df, not current HEAD 46eb330. The final commit changes the visible wash and grain placement. The evidence page should show final-head before-and-after screenshots on Apple TV for Home, library Browse/For You, the Requests landing, Calendar, and movie, series, and request details; add a short recording of the focus-driven wash transition.

HeroBackdropPalette.swift also changes the base tint used by PhoneDetailPageSurface on the shared iOS and macOS targets. The description says these devices were not captured without giving a reason. The evidence page should show before-and-after detail captures for iPhone, iPhone Duo folded and open, iPad, and Mac.

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

Posted via Macroscope — Visible change evidence

The grain only adds light, so even under the art it brightened the wash
that shows through the art's fade, lightening faces on Home. Item details
also lightened the art by putting Home's stronger base gradient behind it.
Drop the grain, and keep the detail page's dim base tint behind the art
while its accent and shadow washes carry Home's colors around it.

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

silo-kody Bot commented Oct 18, 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 ❌
⚠️ 3 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:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

@Quick104
Quick104 merged commit d19afe8 into main Oct 18, 2026
9 checks passed
@Quick104
Quick104 deleted the feat/tvos-ambient-backdrop branch October 18, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have 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