Repository navigation
fix(web): show a collection's backdrop and description on its page - #3585
Conversation
A collection page showed only the collection's name and the generic catalog subtitle, so the backdrop and description set in the collection editor never reached viewers on the web. The page now draws the backdrop behind its header, faded into the page, and shows the description under the title, clamped to three lines with a More toggle. A collection without a description keeps the generic subtitle, and one without a backdrop keeps today's plain header. Nothing shows in that line while the collection is still loading, so the subtitle never flashes before the description. A server collection is read from its library's Collections tab, the query that tab already makes. When the page has no library_id, the server-collections list says which library lists it, and past that list's per-library teaser every library with more collections is asked. A personal collection's description comes from the snapshot the page's actions already load. The detail hero's backdrop artwork moves unchanged into a shared HeroBackdropArtwork that the collection header also uses. Closes Silo-Server#3526
Collection responses resolved the backdrop to its w300 card thumbnail, the same rung as the poster. A collection page now draws the backdrop across the whole page, where 300 pixels stretched four times over looked blurry. The backdrop now resolves at w1920, the width an item detail hero uses; the poster stays a card thumbnail.
Over the backdrop the header's padding left the title too little room, so the actions wrapped under it and sat in the middle of the artwork. The title now takes the free width and the actions keep their place at the bottom right, as they do without a backdrop.
|
Warning Review limit reachedThis organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing. Next included review available in 50 minutes. View limit details
|
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:
|
…ckdrop) at c57a8de Shows a collection's backdrop and description on its web page and serves collection backdrops at w1920. Refresh or drop this carry at the next sync, once upstream merges or changes the PR.
An uploaded collection backdrop is stored at w1280 and w300 only, so the w1920 URL the last change resolved pointed at no object. Resolve the widest stored width instead, read from the same list the upload uses so the two cannot drift apart. The collection page also kept its header through a failed refetch of the server-collections list only when the first load had failed; a failed refetch now keeps the list it already has.
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:
|
Collection backdrops resolve at w1280, the widest variant an upload stores, instead of w1920, which uploads never generate.
Over a backdrop the title's flex-1 also applied below the sm breakpoint, where the header wraps, so the title and actions shared one cramped row on a phone. The title takes the free width only from sm up; on a phone the actions sit under it again.
A collection's title takes the full width on phones again.
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:
|
Edit and the collection menu sat on their own row above Shuffle and the result count, and the large count sat lower than the Shuffle label. A collection page now lays them out as one centred row, wrapping on narrow screens, with the count centred against the Shuffle button.
A collection's actions, Shuffle and count share one row.
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:
|
Quick104
left a comment
There was a problem hiding this comment.
One finding, in the server change. The web side holds up: the new Go test fails on the base and passes here, the web suites and typecheck pass, and no passed v1.0 validation case is affected.
🤖 Claude Code (claude-opus-5-5)
…ckdrop directory A collection backdrop may be any stored artwork reference. For one such as the collection's own poster key, BackdropVariantPath picked the poster ladder's w1000, which collection posters never store, so the backdrop URL pointed at a missing object. Ask for w1280 only for keys in a backdrop directory and keep the w300 card thumbnail for the rest, as before. 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:
|
Review summaryReviewed head: 39b1451 (my fix on top of a54229a). The branch merges cleanly with main. The change works, and I found one small server-side defect, now fixed on this branch. One design question is left for the maintainers to settle (below). Addressed
Checked and not changed
Left for the maintainers
Tests
Validated featuresNo passed v1.0 validation case is affected. #195 W5, #199 and #1252 C2 have no recorded results yet, and the PR body's User manual and clientsThe manual's collections page lists a backdrop under Look without saying where it appears, so it isn't wrong after this change. Apple and Android follow-ups are already filed (Silo-Server/silo-apple#1024, Silo-Server/silo-android#825). VerdictFit: 8/10 · Readiness: 8/10 — conditional (assuming CI is green)
Review method: three code-review finders, plus a cross-provider review on Codex ( 🤖 Claude Code (claude-opus-5-5) |
| if artworkkey.ImageTypeOf(path, "") != artworkkey.ImageBackdrop { | ||
| return cardThumbnailPath(path) |
There was a problem hiding this comment.
Non-backdrop artwork types can resolve to nonexistent thumbnails
Cached logo, banner, and clearart keys can produce broken collection images because their artwork ladders lack a w300 variant. Update cardThumbnailPath to select an existing variant for the detected image type.
Prompt for LLM
File internal/api/handlers/library_collections.go, lines 2750-2751:
Non-backdrop artwork types can resolve to nonexistent thumbnails
Cached logo, banner, or clearart keys are rewritten to `w300`, although their artwork ladders contain no such variant, so using one as a collection backdrop produces a broken image. Select an existing rung for the detected image type rather than assuming every type has a card thumbnail.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
Problem
Closes #3526
Related issue: N/A
Validation tasks: changes #195 W5 (a collection page now shows its assigned backdrop); reaches #199 and #1252 C2 (the item detail hero's backdrop moved into a shared component, with no visible change). None of these cases has a recorded pass yet.
A collection's page on the web shows only its name and the generic catalog subtitle ("Refine the archive by type, era, rating, or genre."). The backdrop and description an admin sets in the collection editor never reach viewers: the editor's preview is the only place they appear. This change draws the backdrop behind the collection page's header and shows the description under the title.
Thanks to @neilmc78 for the report and the root-cause notes in the issue. Their linked fork commit shaped the approach here, though this branch is written separately.
Approach
Catalog.tsxnever read the collection's own metadata. The data was already on the viewer side of the API, so the web change needs no new endpoint:GET /api/v2/library/{id}/collections), the query that tab already makes. When the page URL has nolibrary_id(home rows, the Collections page),GET /api/v2/collections/serversays which library lists it. That list holds only the first 20 collections per library, so for a collection past that cap the page asks each library whose list was cut short.HeroBackdropArtworkthat both use.One server change: collection responses resolved the backdrop to its
w300card thumbnail, the same rung as the poster, which looks blurry stretched across a page. The backdrop now resolves atw1280, the widest variant an uploaded collection backdrop is stored at (w1920and up are never generated for collections). The poster stays at card size. The field and its shape are unchanged.jellycompat already serves collection backdrops and is untouched. Apple and Android have the same gap on their collection screens: Silo-Server/silo-apple#1024 and Silo-Server/silo-android#825.
Validation
tsc -p tsconfig.app.json) and ESLint on the touched files pass. Vitest for the catalog, item detail, box set and collections suites (334 tests) passes, including a new table test for how the page finds a server collection's library (opened from a library, listed in the server-collections list, past its cap, not listed, list still loading).go test ./internal/api/handlers/ -run Collectionpasses, including a new test that a collection's backdrop resolves atw1280while its poster stays atw300.library_idin the URL, and with a collection that has neither (it keeps the generic subtitle). I didn't check a personal collection by hand.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3585/
Before and after captures of the same server collection at desktop and phone width, plus a film's detail page showing its hero is unchanged.
Surface and build: web app. Before: upstream
mainat6e8c68d03. After: this branch ata54229aec, against a server running its server change.Risks
backdrop_urlin collection responses now points at a larger image. That affects/api/v1and/api/v2responses alike, but only the image's width changes, not the field. The collection editor's backdrop preview also loads the larger image.Checklist
AI Disclosure
Note
Show backdrop and description on collection catalog pages
HeroBackdropArtworkandDetailOverviewin Catalog.tsxuseCollectionPageHeaderin useCollectionPageHeader.ts to fetch header metadata, including a library selector that finds the owning server collection even when teaser lists are truncatedBackdropURLwith backdrop-specific variant selection (widest first, 1280/300) using a new shared width ladder in library_collections.goHeroBackdropArtworkcomponent in HeroBackdropArtwork.tsx, so both pages use itMacroscope summarized 39b1451.