Repository navigation
fix(recommendations): size recommendation artwork like home sections - #2628
Conversation
Cached originals were downscaled to 1920px on ingest, so a 4K TV hero or a high-density tablet never got more than a 1080p backdrop. Originals now keep the source's resolution up to 3840px, and the ladder gains rungs between the old default and the original: backdrop w2560, poster w1000, still w1280 (LadderVersion 3, so the one-shot backfill regenerates existing artwork, backdrops included). Every storage backend now reads the publication manifest, so a request for a rung an older revision never generated falls back to one it did publish instead of a 404. Local and direct-S3 backends only look up the added rungs; external delivery still checks every key. Unsized defaults stop serving the 4K original where no client draws it: cast headshots in item detail use the 500px rung, and an episode still standing in for a backdrop uses the widest still rung that fits. Jellyfin-compatible MaxWidth/MaxHeight/FillWidth/FillHeight requests pick the narrowest rung covering four fifths of the requested width on the resolved image's own ladder and aspect ratio; a request is sized on every ladder it can resolve to, since Primary and fallbacks land on different image types. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One image_size per response cannot serve a TV home row, which draws each item's poster as a card and its backdrop full-screen behind the focused row, or a detail page with a full-screen hero beside small cast photos. Every v2 read that takes image_size now also takes poster_width, backdrop_width, logo_width, still_width and photo_width: the width in device pixels the client draws that response field at. The server returns the narrowest cached rung at least that wide on the image's own ladder, including rungs image_size cannot name, else the original. A slot is named for the field, so backdrop_width also governs an episode's still when it fills backdrop_url. A slot width overrides image_size for that slot; slots without one keep image_size or the per-context default. Plugin-hosted art gets the nearest semantic hint for its slot: listings resolve cached keys in one batch and plugin-hosted paths once per hint. Cursors bound to image_size are bound to the widths too, and only when widths are present, so existing cursors stay valid. The images capability lists the parameters as slot_width_params. /api/v1 is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Recommendation cards ignored image_size and always returned the featured defaults, presigning each image separately, so a 25-card For You row cost 75 lookups. TV clients had no way to ask for a hero-sized backdrop or a card-sized poster on For You, discover or Watch Tonight. Every v2 recommendation read now takes image_size and the per-slot widths. Cards resolve through the batch resolver home sections use, so a title's artwork is the same file on both surfaces and a page costs one lookup for cached artwork. The taste seed grid batches its posters the same way. Watch Tonight cards on v2 now carry each cast member's photo_url on the profile ladder (500px when unsized, like item detail). Without sizes, cards keep the artwork keys and plugin hint they had, so the frozen /api/v1 routes return the same artwork. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Evidence is incomplete for the visible API changes not represented by Recently Added. Suggested fix: No diff; add the missing response captures to the linked evidence page. Posted via Macroscope — Visible change evidence |
…twork The database fence that reopens a finished ladder backfill still checked for the v2 rungs: every poster or still published under ladder v3 lacks w780, so each newly cached image would have reset a completed backfill, and backdrops were not fenced at all. A new migration replaces it with one trigger function that takes the fenced ladder version and checks the v3 rungs on posters, stills, logos, backdrops and extra backdrops; its Down restores the v2 fence. A revision cached under an earlier ladder now serves its own widest rung that fits a request (a w780 poster for a w1000 request during the backfill), not only the current ladder's. Favorites, the watchlist and history resolved each card image on its own, which now costs a manifest lookup per image for rungs wider than medium. They resolve in one batch per hint instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ork-sizes Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Evidence does not show the newly populated Watch Tonight Cards cast-photo field. Suggested fix: No diff; add the response excerpts to the linked evidence page. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
On the evidence notes from the Visible change evidence check:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # docs/images-api.md # internal/api/handlers/artwork_widths_test.go # internal/api/handlers/sections.go
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
…d cards swipeCards resolved artwork for the whole hydration window, up to limit + 10 items, before picking the cards it returns. It now batches only the cards on the page; the rest of the window still decides whether more remain. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: Silo-Server/silo-apple#819, Silo-Server/silo-android#609
Validation tasks: none
Recommendation reads ignore
image_sizeand always return the featured defaults, and they presign each image on its own, so a 25-card row costs 75 lookups. A TV client can get a hero-sized backdrop and a card-sized poster on home but not on For You, discover or Watch Tonight. This makes recommendation cards size and batch their artwork the way home sections do.Stacked on #2627, whose width parameters this extends to recommendations.
Approach
image_sizeand the per-slot widths: discover, For You, recommendation sections, because-watched, popular, recently added, similar, similar users, the taste-seed grid, Watch Tonight and Watch Tonight cards.photo_url, which was always empty, on the profile ladder: 500px without a size, like item detail./api/v1recommendation routes, which take no new parameters, return the same artwork.Validation
largehint, and pass http(s) photos through; the v2 seam carries the artwork query and rejects out-of-range widths: pass.make verify-apiv2-contract: additions only. Top-of-stack gate as in feat(artwork): cache originals up to 4K and add wider rungs #2626.image_size=small, and Apple TV 4K widths. For You and Watch Tonight return no cards there without watch history, so unit tests cover them.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/recommendation-artwork-sizes/
Recently added responses from a
mainbuild and this stack. Onmainthe size and width parameters are rejected with422. On this stack the response without sizes is unchanged, andsmalland the TV widths return the sizes they name.Risks
Checklist
AI Disclosure
/api/v1or unsized v2 changes, cursor binding, manifest fallbacks, the backfill query, Jellyfin sizing and plugin hints. It found JellyfinPrimaryand fallback images sized on the wrong ladder, plugin-hosted artwork on list endpoints ignoring slot widths, and unsized hero logos degrading to 500px on artwork cached before revision manifests; all three are fixed with tests. It also flagged that favorites, watchlist and similar cursors ignore widths; that is unchanged on purpose, because those cursors never boundimage_sizeeither. Separately, captures from the sandboxes showed that headshot widths sent plugins a hint that returns 185px images, so headshots keep thelargehint unless they need the original.🤖 Generated with Claude Code
Note
Size recommendation artwork like home sections
image_sizeplusposter_width,backdrop_width,logo_width,still_width, andphoto_widthquery params on 12 recommendation, discovery, similarity, taste-seed, and Watch Tonight operations.ArtworkQuery, and a newrecommendationFilterhelper passes the requested size and widths into the catalog access filter for each handler.Macroscope summarized 3bb206a.