Skip to content

feat(catalog): include per-episode overlay summaries on season episode listings - #364

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
RXWatcher:feat/episode-card-overlays-detail
Jul 16, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
RXWatcher:feat/episode-card-overlays-detail

Conversation

@RXWatcher

Copy link
Copy Markdown
Contributor

Problem

Card overlay badges (resolution, HDR, audio, codec, etc.) render on episode cards in browse grids, home sections, Continue Watching and Next Up — but the episode grid/list on series & season detail pages shows none. The season-episodes endpoint's episodeResponse never carried overlay_summary, and SeasonEpisodeGrid/EpisodeRow never rendered CardOverlays.

Approach

Server: add overlay_summary (omitempty) to episodeResponse and build it in buildEpisodeResponses with the existing overlays.BuildSummary() over the episode's already-batch-loaded media files, access-filtered with catalog.FilterMediaFilesByAccess exactly like the browse/sections paths. No new DB queries. Like those endpoints, the summary is always included; the admin kill switch and per-user prefs are enforced client-side by useOverlayPrefs.

Web: extend EpisodeListItem, add overlayDataFromEpisodeListItem via the shared extractor, and render <CardOverlays variant="wide"> on episode stills in SeasonEpisodeGrid and EpisodeRow, following the ContinueWatchingCard pattern.

API additivity

Additive-only per v1 API rules: one new optional omitempty field on an existing response shape. Existing clients are unaffected.

Risks

Low. Marginal response-size increase on season episode listings; overlay build is in-memory over files already fetched. Episode listing payloads lack rating/studio fields, so rating-type badges simply don't render there — the same graceful degradation the extractor already handles.

Verification

go build ./..., go test ./internal/api/... ./internal/overlays/... pass; ESLint/Prettier clean; EpisodeRow vitest suite passes.

AI-use disclosure: implemented by Claude (Claude Code) under human direction and review.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Quick104, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

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).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d0594ec-4913-4d22-8962-e9066c43a102

📥 Commits

Reviewing files that changed from the base of the PR and between 02b6648 and 9430115.

📒 Files selected for processing (9)
  • internal/api/handlers/items.go
  • internal/catalog/access_filter.go
  • internal/catalog/access_filter_test.go
  • web/src/api/types.ts
  • web/src/components/EpisodeRow.test.tsx
  • web/src/components/EpisodeRow.tsx
  • web/src/lib/overlays/extractors.ts
  • web/src/lib/overlays/index.ts
  • web/src/pages/ItemDetail/components/SeasonEpisodeGrid.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13322d5c59

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +963 to +966
files := catalog.FilterMediaFilesByAccess(filesByEpisode[resp[i].ContentID], filter)
resp[i].Files = episodeFileResponses(files, filter)
resp[i].UserData = userData[resp[i].ContentID]
resp[i].OverlaySummary = overlays.BuildSummary(files)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Build overlays from fully access-filtered files

For viewers with library restrictions but no playback-quality ceiling, FilterMediaFilesByAccess returns the original slice without checking AllowedLibraryIDs/DisabledLibraryIDs, while episodeFileResponses still applies FileAllowedByAccess. In that scenario the new overlay_summary can be derived from an inaccessible episode file, e.g. showing a disabled-library 4K/HDR copy even though the files payload only exposes an allowed 1080p copy. Use the same fully filtered file set for both the response and BuildSummary.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed — FilterMediaFilesByAccess short-circuited on an empty quality ceiling and skipped the library-ID checks that FileAllowedByAccess enforces, and the same gap applied to the pre-existing browse/section overlay paths that use this helper. Fixed in 2736aa6 at the shared helper: it now short-circuits only when no access criteria are set at all, with unit tests covering library-restriction-only filters.

RXWatcher and others added 2 commits July 10, 2026 13:29
…e listings

Episode cards already render user-configurable overlay badges everywhere
except the series/season detail pages: the season-episodes endpoint never
included overlay_summary, so SeasonEpisodeGrid and EpisodeRow had nothing
to render.

Server: add overlay_summary (omitempty) to episodeResponse and populate it
in buildEpisodeResponses via overlays.BuildSummary over the episode's
already-loaded media files, access-filtered with FilterMediaFilesByAccess
to match the browse/sections paths. No extra queries; the files were
already batch-fetched for the files[] payload. Additive-only API change.

Web: extend EpisodeListItem with overlay_summary, add
overlayDataFromEpisodeListItem (shared extract helper), and render
CardOverlays (variant="wide") on the episode stills in SeasonEpisodeGrid
and EpisodeRow using useOverlayPrefs, matching the ContinueWatchingCard
pattern. The hook already honors the admin kill switch and per-user prefs.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…without a quality ceiling

FilterMediaFilesByAccess short-circuited whenever MaxPlaybackQuality was
empty, skipping the AllowedLibraryIDs/DisabledLibraryIDs checks that
FileAllowedByAccess enforces. For viewers with library restrictions but
no quality ceiling, callers (episode listings, browse/section overlay
summaries, item detail versions) received files from restricted
libraries. Short-circuit only when no access criteria are set at all.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@Quick104
Quick104 force-pushed the feat/episode-card-overlays-detail branch from 2736aa6 to 9430115 Compare July 10, 2026 17:35
@Quick104
Quick104 merged commit f377be9 into Silo-Server:main Jul 16, 2026
1 check passed
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.

2 participants