Skip to content

feat(catalog): carry series artwork, dates and ratings on episode cards - #3197

Merged
Quick104 merged 6 commits into
mainfrom
feat/episode-parent-artwork
Oct 28, 2026
Merged

Quick104 merged 6 commits into
mainfrom
feat/episode-parent-artwork

Conversation

@Quick104

@Quick104 Quick104 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none (additive fields; existing card and detail fields are unchanged)

An episode card's backdrop_url is usually the episode still, because the card prefers the still over the series backdrop. A client that draws a large hero from the focused card, such as the Roku Home screen for a Continue Watching or Next Up episode, ends up stretching a low-resolution still. tvOS works around this by fetching the episode's detail for every focused card, since episode detail's backdrop_url is the series backdrop.

This adds the episode's series and season artwork to v2 episode cards so clients can pick the right image without that extra request: series_poster_url, series_backdrop_url and season_poster_url, each with a *_thumbhash. poster_url, backdrop_url and the *_is_episode_still flags keep their current meaning, so existing clients see no change. Seasons store no backdrop, so there is no season backdrop field.

Section cards also say less than listing cards: they carry no release_date or last_air_date, and episode section cards read only rating_imdb, so episodes whose provider gives only a TMDB rating arrive unrated. The second commit, ported from draft #1982 by Oliver Walton, fills those in: section, Watch Tonight and recommendation cards carry both dates, and episode section cards carry the air date as release_date and both ratings.

This supersedes #1982. Its series backdrop used the same field names, and its dates and ratings are the second commit here.

Approach

The fields appear on episode cards in Home and library sections (Continue Watching and Next Up included), catalog browse and search, Watch Tonight, and episode detail (getCatalogItem). Poster fields follow poster_width and the backdrop field follows backdrop_width, signed in each surface's existing image batch.

  • The section episode query already joins the series and season, so it reads the extra columns there. The paths travel on the cached MediaItem as transient ParentArtwork, next to the still provenance, so a cached card never pairs old paths with new URLs.
  • Section episodes that come from other queries (custom filters, collections) get the artwork from the episode metadata lookup the handler already runs. Those cards pay one more signing batch after that lookup; other cards add nothing.
  • Browse and search replace their two episode lookups (episodes, then series titles) with one joined query that also returns the artwork.
  • Episode detail reuses the series context's series row and loads each season's poster once per detail batch.
  • Dates and ratings: the section card renderer maps release_date and last_air_date from the item, as the listing renderer does; most section queries already load them. The episode query also reads e.rating_tmdb and passes it and the air date it already reads on the section metadata, which only the v2 card renders: /api/v1 section cards keep their rating_tmdb, and the v1 admin section preview, which serializes the item whole, is unchanged.

getImageCapabilities advertises episode_parent_artwork: true. Every new field on the shared v1/v2 structs is json:"-", so /api/v1 output does not change. The OpenAPI artifact, web types and the capabilities fixture are regenerated, and docs/images-api.md describes the fields.

Validation

  • go build ./..., gofmt -l ., go vet ./..., make lint-changed, make lint-router-recovery: clean.
  • make test-go: passes except two jellycompat Dolby Vision tests (TestPlaybackInfoWithoutStripOrToneMapStillHasNoRoute, TestPlaybackInfoSkipsStripWhenRPUCannotBeStripped) that fail the same way on unmodified main in the local environment.
  • New Postgres contract (in scripts/ci/db-contracts.txt): the section episode query and the listing query return the series and season artwork, and an episode with no season row has no season poster; an aired, rated episode carries its air date and both ratings while an unaired one carries none. make test-db-contracts passes on a freshly migrated database.
  • Unit tests: parent artwork signs in the card's batch at the same size the card's own poster and backdrop slots give those files, on sections and listings; section cards take it from their own row or the metadata fallback; v1 JSON carries none of it, nor the section dates.
  • make verify-apiv2-openapi, verify-apiv2-contract, verify-apiv2-fixtures, verify-apiv2-web-types, verify-route-inventory, verify-v1-route-freeze, verify-local-paths: pass.
  • Deployed to a development server: a Next Up episode card and the same episode's detail carry all three URLs, the series backdrop differs from the still in backdrop_url, and every URL returns an image. Search returns the same fields.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3197/

The page has before-and-after home/sections excerpts for the dates and ratings (same server, profile and request), and after excerpts for the artwork on a Next Up card, episode detail and search, with every image URL checked. No artwork baseline was captured on the same data before the first deploy; the base schema has no such fields.

Risks

  • Additive on /api/v2, no migration. Each section, listing and detail response signs up to three more images per episode card, deduplicated with the card's own artwork (the season poster is often already the card's poster).
  • Episode detail localizes the season poster like season detail does; section and listing cards read the stored season and series rows, as their own artwork does today.
  • Follow-up: silo-apple and silo-android can drop their per-card detail fetch for hero art once they read series_backdrop_url; nothing breaks if they don't. jellycompat already exposes parent backdrops through its own fields.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • 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, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-10-28T02:23:54.761163Z a9708dc New commits
🔒 Security Review ✅ Completed 2026-10-28T02:26:30.891214Z a9708dc New commits
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

Episode cards now carry series poster, series backdrop, and season poster artwork through data loading and response construction. V2 responses expose the artwork URLs and ThumbHashes, and image capability metadata documents the supported surfaces. Frozen v1 JSON responses remain unchanged.

Changes: Episode parent artwork

Layer / File(s) Summary
Load episode artwork and metadata
internal/models/media.go, internal/sections/fetcher.go, internal/catalog/episode_repo.go, internal/catalog/detail.go, internal/sections/episode_parent_artwork_db_test.go, scripts/ci/db-contracts.txt
Episode data now carries series and season artwork. Section queries and card-context lookups retrieve the artwork, while episode detail construction resolves series and season images.
Resolve artwork for cards
internal/api/handlers/catalog.go, internal/api/handlers/items.go, internal/api/handlers/sections.go, internal/api/handlers/recommendations.go, internal/api/handlers/watch_tonight.go, internal/api/handlers/*_test.go
Card handlers resolve parent artwork URLs in artwork batches, use episode metadata when item artwork is absent, and map URLs and ThumbHashes into response objects. Tests cover artwork mapping, URL sizing, and v1 JSON exclusions.
Expose artwork in v2 contracts
internal/apiv2/catalog_types.go, internal/apiv2/catalog_items.go, internal/apiv2/operational_discovery.go, contracts/api/v2/*, web/src/api/v2/schema.ts, docs/images-api.md
V2 catalog schemas and API documentation add the parent artwork fields and capability flag. The OpenAPI contract, TypeScript schema, fixture, and image API documentation describe the fields, supported surfaces, and width parameters.

Priority: Normal

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SectionFetcher
  participant sectionItemImageURLs
  participant resolveFallbackParentArtwork
  participant toSectionItemResponse
  SectionFetcher->>sectionItemImageURLs: provide episode artwork paths
  sectionItemImageURLs->>resolveFallbackParentArtwork: resolve artwork missing from item data
  resolveFallbackParentArtwork->>toSectionItemResponse: provide signed artwork URLs
  toSectionItemResponse->>toSectionItemResponse: combine URLs with ThumbHashes
Loading

Possibly related issues

Possibly related PRs

  • Silo-Server/silo-server#1982 — That PR adds series backdrop, release dates, and episode ratings to section cards; this change extends episode-card artwork across more response surfaces.

Suggested labels: javascript, impact: usability

Suggested reviewers: rhainland, coffeeknyte

Merge Risk: Low · up to a2c40

Some v1 admin previews now return populated episode dates and ratings where they previously returned null. This is a narrow compatibility change to resolve or explicitly accept before merging.

Security architecture risk: Low · up to a2c40

The added artwork fields use the existing catalog access checks and image-resolution controls in the reviewed flows. No introduced security bypass was identified. The change is additive, but complete downstream compatibility and production behavior were not established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — In the inspected flows, the expanded exposure is parent artwork associated with viewer-accessible episodes. The new repository enrichment method has no independent access-filter parameter, so its safety depends on current callers continuing to supply already-authorized episode IDs.

Trust Boundaries and Controls

  • observed — Direct v2 episode-detail requests carry the viewer access filter into detail resolution, which checks parent-series access before attaching artwork. New parent paths then use the existing artwork resolution and presigning boundaries rather than being emitted directly as raw paths.

Resilience and Maintainability Implications

  • observed — The section cache uses access-scoped keys and shares raw MediaItem pointers under a read-only ownership invariant. The inspected additions preserve that invariant: viewer-specific artwork URLs remain outside cached rows, and failed metadata enrichment leaves local results empty rather than writing another viewer’s state into shared data.
Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: adding series artwork, dates, and ratings to episode cards.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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 The pull request description directly explains the added episode parent artwork, section dates, ratings, API surfaces, compatibility behavior, implementation approach, validation, and risks. It matche…
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 10 functions across 16 files. (5 skipped: 4 unsupported, 1 too large.)

Full details: Description check

Explanation

The pull request description directly explains the added episode parent artwork, section dates, ratings, API surfaces, compatibility behavior, implementation approach, validation, and risks. It matches the changeset.

Finishing Touches
📝 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

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

@silo-kody

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

Copy link
Copy Markdown

The PR adds rendered parent-artwork fields to /api/v2 episode cards and episode detail responses, so Evidence: none, no user-visible change does not cover this change.

  • Episode cards in Home/library sections (including Continue Watching and Next Up), catalog browse/search, and Watch Tonight lack before-and-after response excerpts for the same requests showing the new artwork fields; include the affected surface and build or commit.
  • Episode detail (getCatalogItem) lacks before-and-after response excerpts for the same episode showing the new artwork fields; include the surface and build or commit.

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 api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request go Pull requests that update go code priority: P2 Limited scope, workaround exists, or polish triaged High-confidence review completed; does not mean fixed, validated, or accepted for release. labels Oct 28, 2026
Comment thread internal/catalog/detail.go Resolved
Comment thread internal/catalog/episode_repo.go Resolved
Quick104 and others added 2 commits October 27, 2026 21:50
Episode cards on /api/v2 now carry series_poster_url, series_backdrop_url
and season_poster_url with their thumbhashes, next to the unchanged
poster_url and backdrop_url. An episode card's backdrop_url is usually the
episode still, so a client drawing a hero from it had to fetch the
episode's detail to get the series backdrop.

The section episode query and the listing card context read the artwork
from the series and season joins they already make; listings swap two
lookups for one. Home and library sections (Continue Watching and Next Up
included), catalog browse and search, Watch Tonight and episode detail
carry the fields, signed in each surface's existing batch at the poster
and backdrop slot sizes. Seasons store no backdrop, so there is no season
backdrop field. getImageCapabilities advertises episode_parent_artwork.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section cards now carry release_date and last_air_date on /api/v2, as
listing cards do. Episode section cards carry the episode's air date as
release_date and its TMDB rating beside the IMDb one, so a Continue
Watching or Next Up card can say when the episode aired and show a score.
Watch Tonight and recommendation cards carry the dates too. /api/v1 is
unchanged.

Ported from #1982 by Oliver Walton.

Co-authored-by: Oliver Walton <oliverharrison03@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Quick104
Quick104 force-pushed the feat/episode-parent-artwork branch from e111dba to b972d72 Compare October 28, 2026 01:55
@silo-kody

silo-kody Bot commented Oct 28, 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 ❌

@Quick104 Quick104 changed the title feat(catalog): carry series and season artwork on episode cards feat(catalog): carry series artwork, dates and ratings on episode cards Oct 28, 2026
Episode detail signed the stored season row, so a viewer whose language
has a translated season poster saw the default one there while season
detail showed the translation. Localize the season first, as season
detail does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread internal/catalog/detail.go Resolved
A series-wide episode detail batch read each distinct season's poster
with its own query. Load and localize the series' seasons in one batch up
front; single episode details and episodes of another series keep the
per-season read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

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

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime

@coderabbitai coderabbitai Bot added impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code labels Oct 28, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
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: e2acbaa8-27f2-4df4-b552-0930e559968f
Commits

Reviewing files that changed from the base of the PR and between ae0c022 and a2c40d7.

Files selected for processing: 21
  • contracts/api/v2/fixtures/get_image_capabilities_ok.json
  • contracts/api/v2/openapi.json
  • docs/images-api.md
  • internal/api/handlers/artwork_widths_test.go
  • internal/api/handlers/catalog.go
  • internal/api/handlers/episode_image_provenance_test.go
  • internal/api/handlers/items.go
  • internal/api/handlers/recommendations.go
  • internal/api/handlers/sections.go
  • internal/api/handlers/watch_tonight.go
  • internal/apiv2/catalog_items.go
  • internal/apiv2/catalog_types.go
  • internal/apiv2/operational_discovery.go
  • internal/catalog/detail.go
  • internal/catalog/episode_repo.go
  • internal/models/media.go
  • internal/models/media_item_json_test.go
  • internal/sections/episode_parent_artwork_db_test.go
  • internal/sections/fetcher.go
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/schema.ts

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

Comment thread internal/sections/fetcher.go Resolved
The episode query set the air date and TMDB rating on the item, which
the frozen /api/v1 admin section preview serializes whole and whose
rating_tmdb the v1 section card emits. Carry both on the section
metadata and a v2-only card field instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

silo-kody Bot commented Oct 28, 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 ❌

⚠️ Note: some checks couldn't be completed in this run, so auto-approval (when enabled) was skipped. Check the details at https://kodus.siloserver.org/pull-requests and then comment @kody review on this PR to retry once the issue is resolved.

Comment thread internal/sections/fetcher.go Resolved
…ch Tonight swipe cards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

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

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request go Pull requests that update go code impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/XL 500–999 added + deleted lines (all files); change volume, not priority. triaged High-confidence review completed; does not mean fixed, validated, or accepted for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant