Skip to content

fix(web): show a collection's backdrop and description on its page - #3585

Merged
Quick104 merged 7 commits into
Silo-Server:mainfrom
blurbery:fix/collection-page-backdrop
Nov 9, 2026
Merged

Quick104 merged 7 commits into
Silo-Server:mainfrom
blurbery:fix/collection-page-backdrop

Conversation

@blurbery

@blurbery blurbery commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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.tsx never 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:

  • A server collection is read from its library's Collections tab (GET /api/v2/library/{id}/collections), the query that tab already makes. When the page URL has no library_id (home rows, the Collections page), GET /api/v2/collections/server says 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.
  • A personal collection's description comes from the snapshot the page's actions already load. Personal collections have no backdrop.
  • The description reuses the item detail overview: three lines, with a More toggle when it runs longer, keeping its line breaks. A collection with no description keeps the generic subtitle. Nothing shows in that line while the lookup is loading, so the subtitle never flashes before the description.
  • The backdrop is faded into the page so the title and actions stay readable. Edit, the collection menu, Shuffle and the result count now share one centred row at the bottom right (under the title on a phone), with or without a backdrop. Before, Edit and the menu sat on their own row above Shuffle, and the large count sat lower than the Shuffle label. The detail hero's backdrop artwork (thumbhash placeholder, then the image fading in) moves unchanged into a shared HeroBackdropArtwork that both use.

One server change: collection responses resolved the backdrop to its w300 card thumbnail, the same rung as the poster, which looks blurry stretched across a page. The backdrop now resolves at w1280, the widest variant an uploaded collection backdrop is stored at (w1920 and 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

  • Web: typecheck (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).
  • Server: go test ./internal/api/handlers/ -run Collection passes, including a new test that a collection's backdrop resolves at w1280 while its poster stays at w300.
  • Manual: checked on a real deployment with a server collection that has a backdrop and a description, at desktop and phone width, opened with and without library_id in the URL, and with a collection that has neither (it keeps the generic subtitle). I didn't check a personal collection by hand.
  • The full lint and test gate runs in CI on this PR.

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 main at 6e8c68d03. After: this branch at a54229aec, against a server running its server change.

Risks

  • backdrop_url in collection responses now points at a larger image. That affects /api/v1 and /api/v2 responses alike, but only the image's width changes, not the field. The collection editor's backdrop preview also loads the larger image.
  • The item detail hero's backdrop markup moved into a shared component without changing its DOM or classes.

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 (Claude desktop app)
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted. AI-assisted with Claude Opus. I directed the task and designed the work.
  • Adversarial review: n/a

Note

Show backdrop and description on collection catalog pages

  • Collection pages now render a hero-style header with the collection's backdrop image, thumbhash placeholder, and description via HeroBackdropArtwork and DetailOverview in Catalog.tsx
  • Adds useCollectionPageHeader in useCollectionPageHeader.ts to fetch header metadata, including a library selector that finds the owning server collection even when teaser lists are truncated
  • The API now resolves collection BackdropURL with backdrop-specific variant selection (widest first, 1280/300) using a new shared width ladder in library_collections.go
  • Extracts the item-detail backdrop markup into the shared HeroBackdropArtwork component in HeroBackdropArtwork.tsx, so both pages use it
  • Behavioral Change: catalog headers omit the generic subtitle while header metadata is pending, and collection actions/Shuffle/result count use a shared flex-row layout

Macroscope summarized 39b1451.

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.
@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 17a35a5f-3525-4db3-9ae6-83c65dcaf7e5
Commits

Reviewing files that changed from the base of the PR and between 6e8c68d and 39b1451.

Files selected for processing: 9

  • internal/api/handlers/collection_artwork.go
  • internal/api/handlers/library_collections.go
  • internal/api/handlers/library_collections_test.go
  • web/src/components/HeroBackdropArtwork.tsx
  • web/src/hooks/queries/collections.ts
  • web/src/hooks/useCollectionPageHeader.test.ts
  • web/src/hooks/useCollectionPageHeader.ts
  • web/src/pages/Catalog.tsx
  • web/src/pages/ItemDetail/DetailHero.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 5, 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 ❌

blurbery added a commit to blurbery/silo-server that referenced this pull request Nov 5, 2026
…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.
@silo-triage silo-triage Bot added bug Something isn't working go Pull requests that update go code impact: polish Annoyance, cosmetic, or nice-to-have javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Nov 5, 2026
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

silo-kody Bot commented Nov 5, 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 ❌

blurbery added a commit to blurbery/silo-server that referenced this pull request Nov 5, 2026
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.
blurbery added a commit to blurbery/silo-server that referenced this pull request Nov 5, 2026
A collection's title takes the full width on phones again.
@silo-kody

silo-kody Bot commented Nov 5, 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 ❌

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.
blurbery added a commit to blurbery/silo-server that referenced this pull request Nov 5, 2026
A collection's actions, Shuffle and count share one row.
@silo-kody

silo-kody Bot commented Nov 5, 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 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.

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

silo-kody Bot commented Nov 9, 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 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Review summary

Reviewed 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

  • A backdrop set to another stored key could resolve to a variant that doesn't exist (low). For a collection poster key, the backdrop asked for w1000, which collection posters never store. Fixed in 39b1451: only keys in a backdrop directory get w1280, and every other key keeps the card thumbnail it had before. The test row for it failed on a54229a.

Checked and not changed

  • Description "More" state carrying over to another collection. The overview's expanded state lives in the component, but nothing on a collection page links to another collection inside the same catalog view, so I found no path that reaches it.
  • Hidden collections. The Collections tab doesn't list a hidden collection, so its page would get no header data. But the catalog already answers 404 for a hidden collection, so that page never renders.
  • Larger backdrop_url in list and admin responses. On the web, only the editor's small preview reads it from those responses. The Apple and Android apps don't show a collection backdrop yet ([feature] Show a collection's backdrop and description on its screen silo-apple#1024, [feature] Show a collection's backdrop and description on its screen silo-android#825). jellycompat resolves collection artwork separately and is unaffected.
  • The earlier bot threads (missing w1920, a failed refetch, the fan-out) are settled as the threads describe.

Left for the maintainers

  • Where the collection page's header data comes from. The web reads a collection's description and backdrop out of its library's full Collections tab response, which counts items and builds posters for every collection in that library. Opened without library_id and past the 20-per-library teaser, the page loads every truncated library's tab. The usual path, a page opened from the Collections tab, reuses that tab's cached response. An additive collection object on the v2 catalog response for collection sources would cost one read and give Apple and Android the same data for their follow-ups. Keeping the web approach is reasonable for now. Moving the data to the server would make sense before the native clients copy the lookup.
  • /api/v1 also gets the larger backdrop. Every response built by libraryCollectionResponseOf now points backdrop_url at w1280, v1 included. The field's shape and meaning don't change, only the image size, and the PR body says so under Risks.

Tests

  • TestLibraryCollectionResponseArtworkWidths fails on the base (w300) and passes on the head. Its new poster-key row failed on a54229a.
  • The web test covers only the new library-lookup helper, which doesn't exist on the base, so it doesn't count as proof of the page change. The page change rests on the author's before-and-after evidence. I didn't re-run it live.
  • Catalog and item detail vitest suites (264 tests) and tsc pass locally.

Validated features

No passed v1.0 validation case is affected. #195 W5, #199 and #1252 C2 have no recorded results yet, and the PR body's Validation tasks: line matches.

User manual and clients

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

Verdict

Fit: 8/10 · Readiness: 8/10 — conditional (assuming CI is green)

  • Fit: it closes a real gap, since a backdrop and description an admin sets never reached viewers, and it uses endpoints the web already calls. It is held down by the per-page cost of loading a whole library's Collections tab, and by a lookup the native clients would have to repeat.
  • Readiness: no defect remains. The condition is that the page change was shown only by the author's evidence. No test here fails on the base for it.

Review method: three code-review finders, plus a cross-provider review on Codex (gpt-6.1-sol, one round). That round raised the backdrop-key defect, fixed above, and the "More" state question, answered above.

🤖 Claude Code (claude-opus-5-5)

Comment on lines +2750 to +2751
if artworkkey.ImageTypeOf(path, "") != artworkkey.ImageBackdrop {
return cardThumbnailPath(path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug medium

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.

​

​

@Quick104
Quick104 merged commit 347c31e into Silo-Server:main Nov 9, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code impact: polish Annoyance, cosmetic, or nice-to-have javascript Pull requests that update javascript code 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.

[bug] Collection pages ignore the collection's backdrop and description

2 participants