Skip to content

feat(catalog): show the collections a movie or series is in on its page - #4528

Merged
Quick104 merged 4 commits into
Silo-Server:mainfrom
Rhainland:feat/item-also-in-collections
Nov 19, 2026
Merged

Quick104 merged 4 commits into
Silo-Server:mainfrom
Rhainland:feat/item-also-in-collections

Conversation

@Rhainland

@Rhainland Rhainland commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none changed. The new row follows the collection access rules that #193 S1/S3 and #195 W1/W3 cover.

Other clients: Apple Silo-Server/silo-apple#1222; Android Silo-Server/silo-android#997; Roku Silo-Server/silo-roku#99

A movie or series page doesn't show which collections hold the title. Box sets show their movies on the page, but a title in a server collection or a personal one gives no sign of it, and the only way to find those collections is to browse them. Discussion #4142 asked for an "Also in" row. This adds it to the web movie and series pages, with a new /api/v2 read the Apple and Android apps can use too.

  • When one collection holds the title, the page shows up to six of that collection's other titles under its name, with Explore all opening the collection.
  • When several do, an Also in row shows a poster card for each, with no cap.

Approach

listCatalogItemCollections (GET /api/v2/catalog/items/{id}/collections?library_id=) answers both cases. getCatalogSearchCapabilities.item_collections advertises it.

  • items: the cards of the collections that store the title, server collections first, then personal ones, each by title. They come from the card builder that rows of collections on Home use, so the same viewer rules apply: hidden collections, libraries the viewer can't open, and another profile's unshared collections are left out. A title the viewer can't see answers 404, as getCatalogItemBoxSet does.
  • Smart collections are left out. They store no titles, and checking each one's rules on every page view would cost a query per collection. A server collection made smart that still holds rows from when it was manual is also left out.
  • The synced copy of the box set is left out. A server collection synced from the TMDB collection whose box set the page already shows would repeat that row.
  • preview_items: filled only when items holds exactly one collection. It is the first page listCatalogItems answers for that collection, without the title itself, so its order, Show only filter and access rules match what Explore all opens. For another profile's collection, that means only titles the owner can see too.

Personal collections needed one store method, CollectionsHolding, which lists every non-smart collection on the account that stores a title, whichever profile made it. Postgres and SQLite both implement it. The web row is ItemCollectionsRow. It refreshes when any collection changes, and shows nothing while loading, when no collection holds the title, or if the read fails.

Jellyfin compatibility needs no change: GET /Items/{id}/Collections already lists server collections. docs/catalog-api.md documents the new read. The user manual's collections page gets the change through Silo-Server/siloserver.org#411.

Validation

  • Go: build, vet, make lint-changed, make test-go and make lint-router-recovery pass.
  • Database tests: new tests cover which collections are listed and the one-collection preview, including another profile's collection limited to what its owner can see. A store conformance test covers CollectionsHolding on Postgres and SQLite. All are added to scripts/ci/db-contracts.txt.
  • Web: lint, format:check, build, budget:check and make test-web pass.
  • Contracts and hygiene: these pass.
    • verify-apiv2-openapi, -web-types, -fixtures and -contract (2 non-breaking additions)
    • TestCommittedArtifactMatchesRouter
    • verify-route-inventory, -settings-bindings-all, -playback-fixtures, -local-paths, -case-collisions, -size-ratchet, -bidi and -migrations
  • Not run: verify-actionlint, verify-shellcheck and verify-prometheus-rules. The change touches no workflows, shell scripts or Prometheus rules.
  • By hand: on a local server I checked movies in 15, 4 and 1 collections at desktop and phone width, as two profiles on one login. Hidden collections and another profile's private collection don't appear, and Explore all opens the collection.

Evidence

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

Surface and build: web app, desktop (1440 px) and mobile (390 px). Before is the merge base; after is this branch. Same server and data for both: a movie in 15 collections, one in 4, and one in 1.

Risks

  • A title page makes one more request. In the one-collection case, the server also reads one page of that collection.

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 how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Codex CLI, GitHub CLI
  • Model(s): claude-opus-5-5, claude-fable-5-2, gpt-6.2-sol, gpt-6.2-astra
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: four independent reviews of the full diff (correctness, standards, spec). Fixed from them:
    • The preview now comes from the collection's catalog read, which brings its sort, Show only filter, owner access and watch state. Before, it read stored rows in a fixed window.
    • Smart conversions are left out.
    • Server collection edits now refresh the row.
    • The preview test is in the CI database list, and its owner check is now real.
    • The fixtures use fictional titles.
    • Not changed:
      • pagination for items, since a title's collections are few;
      • a capability gate on web, which ships with the server;
      • keeping the one-card Also in row when the only collection holds just this title.

Note

Add collections row to movie and series detail pages via new item-collections API

  • Adds GET /api/v2/catalog/items/{id}/collections (operation listCatalogItemCollections) backed by an ItemCollections handler that checks title accessibility, returns server cards before personal cards, and includes a six-item preview when exactly one collection matches.
  • Adds CollectionsHolding to the Postgres user store, returning non-smart personal collections containing the title, plus a shared store-test helper and API/OpenAPI fixtures.
  • Web detail pages render a new ItemCollectionsRow component ("Also in" cards, or preview carousel for a single collection) using a useItemCollections query; collection-surface refresh now invalidates title-page collection queries.
  • The catalog capabilities response gains an item_collections flag, true only when both required dependencies are set.
  • Behavioral Change: title-page collection queries are added to invalidateLibraryCollectionQueries in collectionSurfaceRefresh.ts; capabilities fixture revision updates in get_catalog_search_capabilities_ok.json.

Macroscope summarized ec7b8c4.

@silo-triage silo-triage Bot added the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Nov 18, 2026
@silo-kody

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

@silo-triage silo-triage Bot added enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds a v2 catalog endpoint that lists visible collections containing a movie or series. It can return up to six other titles when exactly one collection is listed. Movie and series pages fetch and render collection cards or that preview.

Changes: Title-page collections

Layer / File(s) Summary
Collection membership lookup
internal/userstore/*, internal/userdb/collection_membership.go, internal/userstore/pgstore/*, internal/notifications/interest_hooks.go, internal/userstore/storetest/collection_holding.go, internal/userdb/conformance_test.go, scripts/ci/db-contracts.txt
The user-store contract and SQLite and PostgreSQL implementations provide account-wide membership reads for non-smart collections. Shared and database tests cover membership results and account boundaries.
Collection listing and previews
internal/api/handlers/collections_service.go, internal/api/handlers/item_collections.go, internal/catalog/library_collection_service.go, internal/api/handlers/item_collections_db_test.go, internal/api/router.go, scripts/ci/db-contracts.txt
The handler combines visible server and personal collections and excludes smart collections and the matching synced box-set copy. When exactly one collection is listed, it returns up to six other titles. Router wiring and database tests cover these behaviors.
V2 endpoint and contract
internal/apiv2/catalog_item_collections.go, internal/apiv2/catalog_items.go, internal/apiv2/catalog_search_capabilities.go, internal/apiv2/router.go, internal/apiv2/*fixtures_test.go, contracts/api/v2/*, internal/api/testdata/media_routes.txt, docs/catalog-api.md, web/src/api/v2/*
The v2 endpoint returns collection cards and previews, and reports the item_collections capability when its dependencies are available. The API schemas, fixtures, route classification, and documentation describe its parameters and responses.
Title-page data and rendering
.silo-translations, web/src/api/v2/catalog.ts, web/src/components/CollectionsRow.tsx, web/src/components/collections/*, web/src/hooks/queries/*, web/src/locales/*, web/src/pages/ItemDetail/*, web/src/pages/catalogSearchParams.ts
The web client fetches and caches item collections. Movie and series pages render collection cards or, when one collection has preview items, a preview carousel. The change adds the “Also in” translation and shared collection-link handling.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant MovieContent
  participant ItemCollectionsRow
  participant useItemCollections
  participant CatalogItemCollections
  participant ItemCollections
  participant CollectionMembershipReader
  participant CollectionBrowser
  MovieContent->>ItemCollectionsRow: render title ID and library ID
  ItemCollectionsRow->>useItemCollections: request title collections
  useItemCollections->>CatalogItemCollections: GET item collections
  CatalogItemCollections->>ItemCollections: request collection listing
  ItemCollections->>CollectionMembershipReader: read collections holding title
  ItemCollections->>CollectionBrowser: browse preview when one collection is returned
  CatalogItemCollections-->>useItemCollections: return cards and preview items
  useItemCollections-->>ItemCollectionsRow: provide collection data
Loading

Possibly related issues

  • [v1] Collections #192 — The endpoint lists collections using viewer visibility rules, which overlap with the issue’s collection visibility scope. The PR does not complete the parent issue’s acceptance work.

Suggested reviewers: quick104, blurbery

Merge Risk: Low · up to 13b67

This adds an "Also in" collections row and a v2 endpoint for movie and series pages. The row shows visible collections, with a preview when exactly one collection holds the title. No functional defect remains open. The translation pin is local-only until the translations release ships, so regenerating translations needs a local checkout until then.

Security architecture risk: Minimal · up to 13b67

The inspected discovery flow preserves title, library, account, and profile restrictions. Collection previews reuse the existing access-controlled listing path. No introduced or worsened security or ownership risk was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The new exposure is collection metadata, membership associations, and preview titles for a caller-selected title. Personal candidates remain within the authenticated account, while returned cards require openable server libraries or profile ownership/sharing permission.

Trust Boundaries and Controls

  • observed — Although membership candidates are broader than the acting profile, they are not serialized directly. Personal cards require VisibleTo, and previews independently recheck collection access, intersect viewer and owner permissions, and filter accessible titles. Owner-resolution failure does not fall back to viewer-only access.

Resilience and Maintainability Implications

  • observed — The new browser cache key identifies the title and library, not the viewer. It therefore inherits the existing identity-transition controls: account replacement, sign-out, impersonation, and profile changes clear the query cache. The new query also forwards its cancellation signal to the request.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(catalog): show the collections a movie or series is in on its page" matches the main change. The PR adds an "Also in" row on web movie and series pages that lists collections holding t…
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 description explains the change: a new "Also in" row on movie and series pages, a new GET /api/v2/catalog/items/{id}/collections endpoint, the rules for which collections are listed, the single-co…
Full details: Title check

Explanation

The title "feat(catalog): show the collections a movie or series is in on its page" matches the main change. The PR adds an "Also in" row on web movie and series pages that lists collections holding the title, backed by a new /api/v2 endpoint. The title is specific and descriptive, and it names the scope (catalog, movie or series page).

Full details: Description check

Explanation

The description explains the change: a new "Also in" row on movie and series pages, a new GET /api/v2/catalog/items/{id}/collections endpoint, the rules for which collections are listed, the single-collection preview, the CollectionsHolding store method, and the validation and manual checks run. It matches the changeset in the raw summary.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent 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: 214a476a-9d5c-4b6a-a538-c4323e4c2073
Commits

Reviewing files that changed from the base of the PR and between 8aca186 and 13b67ef.

Files selected for processing: 15

  • .silo-translations
  • contracts/api/v2/openapi.json
  • internal/api/handlers/item_collections.go
  • internal/api/handlers/item_collections_db_test.go
  • internal/api/router.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/router.go
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/components/collections/ItemCollectionsRow.tsx
  • web/src/locales/ar-XB.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/keys.ts
Files skipped from review as they are similar to previous changes: 3

  • web/src/locales/ar-XB.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json

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

@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: 2

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: 20fb28b8-6104-47d7-b4b4-7815358da322
Commits

Reviewing files that changed from the base of the PR and between 77832e8 and 8aca186.

Files selected for processing: 45

  • .silo-translations
  • contracts/api/v2/fixtures/get_catalog_search_capabilities_ok.json
  • contracts/api/v2/fixtures/index.json
  • contracts/api/v2/fixtures/list_catalog_item_collections_authentication_required.json
  • contracts/api/v2/fixtures/list_catalog_item_collections_not_found.json
  • contracts/api/v2/fixtures/list_catalog_item_collections_ok.json
  • contracts/api/v2/fixtures/list_catalog_item_collections_single_preview.json
  • contracts/api/v2/openapi.json
  • docs/catalog-api.md
  • internal/api/handlers/collections_service.go
  • internal/api/handlers/item_collections.go
  • internal/api/handlers/item_collections_db_test.go
  • internal/api/router.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/catalog_item_collections.go
  • internal/apiv2/catalog_item_collections_fixtures_test.go
  • internal/apiv2/catalog_items.go
  • internal/apiv2/catalog_search_capabilities.go
  • internal/apiv2/fixtures_test.go
  • internal/apiv2/router.go
  • internal/catalog/library_collection_service.go
  • internal/notifications/interest_hooks.go
  • internal/userdb/collection_membership.go
  • internal/userdb/conformance_test.go
  • internal/userstore/collection_membership.go
  • internal/userstore/pgstore/collection_membership.go
  • internal/userstore/pgstore/conformance_test.go
  • internal/userstore/storetest/collection_holding.go
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/catalog.ts
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/components/CollectionsRow.tsx
  • web/src/components/collections/CollectionPosterCard.tsx
  • web/src/components/collections/ItemCollectionsRow.tsx
  • web/src/hooks/queries/collectionSurfaceRefresh.ts
  • web/src/hooks/queries/itemCollections.ts
  • web/src/hooks/queries/keys.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/keys.ts
  • web/src/pages/ItemDetail/MovieContent.tsx
  • web/src/pages/ItemDetail/SeriesContent.tsx
  • web/src/pages/catalogSearchParams.ts

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

Comment thread .silo-translations Resolved
Adds listCatalogItemCollections (GET /api/v2/catalog/items/{id}/collections),
advertised by getCatalogSearchCapabilities.item_collections. It lists the
visible manual and synced collections, server and personal, that store the
title, with the same viewer rules as a row of collections. Smart collections
and the synced copy of the box set the page already shows are left out. When
only one collection holds the title, preview_items carries up to six of its
other titles, read as the collection's page lists them.

The web movie and series pages show that collection's titles under its name
with Explore all, or an "Also in" row of collection posters when several
collections hold the title.
@Rhainland
Rhainland force-pushed the feat/item-also-in-collections branch from 8aca186 to 13b67ef Compare November 19, 2026 09:33
@silo-kody

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

Review of 13b67ef. I found four problems in the new read, all in internal/api/handlers/item_collections.go, and I'm fixing all four in commits on this branch. The worst is cost: when one manual collection holds a title, the preview reads the entire collection on every page view. With a 3,000-member collection that took 2.26 s on local Postgres. Details are on the lines below, and a summary comment with the scores follows once the fixes are pushed.

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

…Explore all lists

The one-collection preview read the whole collection on the offset path,
which loads and checks every stored member to keep seven; it now takes the
cursor path listCatalogItems uses. With a 3,000-member collection one read
went from about 2.3 s to about 0.13 s on local Postgres.

The preview also now leaves the page's library presentation out and, for a
server collection, keeps to the library its card opens, as Explore all
does. Another profile's shared collection is listed only when its owner may
see the title, since that collection's page is read with the owner's
access. A failed preview or box set lookup keeps the cards instead of
failing the read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

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

visible, seen := checked[owner]
if !seen {
var err error
if visible, err = s.ownerSees(ctx, owners, v, userID, owner, contentID); err != nil {

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 Kody Rules high

Owner visibility checks fan out with the number of collection owners

A title in many shared collections causes s.ownerSees to perform database reads for each distinct owner. Collect owners first and resolve their access filters and title-access checks in bounded batches, preserving request scope and account and owner distinctions.

Kody rule violation: Batch scoped Go lookups and bound dependency fan-out

Prompt for LLM
File internal/api/handlers/item_collections.go, line 141:

Owner visibility checks fan out with the number of collection owners

Collect the distinct collection owners first, then resolve their access filters and title-access checks in bounded batches before filtering the cards. This loop currently performs dependency reads for every distinct owner, so a title in many shared collections causes database work to grow with the number of owners. Keep the results scoped to this request and retain the account and owner distinctions in each check.

Kody rule violation: [Batch scoped Go lookups and bound dependency fan\-out](https://kodus.siloserver.org/settings/code-review/1247142351/kody-rules/d2a64d9a-568c-46c2-9fa4-ad93c54ef90e?teamId=ba9922fc-c0ea-4cf8-87bb-9d4f42ffc73e)

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Silo-Server/silo-translations#87 merged and was released, so the web
locales now come from the published catalog instead of a local sync.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. and removed size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. labels Nov 19, 2026
@silo-kody

silo-kody Bot commented Nov 19, 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 ❌
⚠️ 4 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
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@Quick104

Copy link
Copy Markdown
Contributor

Review summary

Reviewed head: ec7b8c4 (my fixes on top of 13b67ef). I pushed two commits to this branch. Nothing was rebased.

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

Fixed on this branch

All four findings from my review are fixed in 6860b2e:

  • The preview read the whole collection. It now takes the cursor path listCatalogItems uses. With a 3,000-member collection on local Postgres, one read dropped from 2.26 s to 133 ms.
  • Another profile's shared collection showed on a title that profile can't see. It is now listed only when its owner may see the title too.
  • The preview showed titles outside its card's library. It now keeps to that library and no longer inherits the page's library_id presentation.
  • A failed preview or box set lookup erased the row. The cards now stay, with an empty preview_items.

ec7b8c4 re-pins the locales to silo-translations release 2026.11.19-36be281, which includes Silo-Server/silo-translations#87. I added its translation pass and merged it. The note about merging after #87 is gone from the description.

Verification

  • TestItemCollectionsDB, TestItemCollectionsPreviewDB and the new TestItemCollectionsPreviewLibraryDB pass against local Postgres. The owner-access expectation and the library-scope test both fail on 13b67ef.
  • make lint-changed, go vet, the apiv2 and router contract tests, the handler collection tests, and the web typecheck pass.
  • The fixes were not checked live on a sandbox. The published evidence still holds: its data (one library, no shared collection outside its owner's limits) gives the same rows before and after these fixes.
  • The PR's own new tests don't exist on main, so none of them counts as failing on the base.

Cross-provider review

I ran one Codex round (gpt-6.2-sol) on 13b67ef. Its four main findings are the four above. Two smaller ones remain:

  • After the viewer saves a new sort on the collection page, the preview can keep the old order for up to two minutes. The sort write doesn't invalidate the collections/on-title queries.
  • item_collections lives in getCatalogSearchCapabilities, which can answer 501 when the Meilisearch result window isn't supported. A client gating the row on that flag would then hide a feature that works.

Left for the maintainers

  • Response shape at the 1.0 lock. preview_items appears only when exactly one collection holds the title, and it holds up to 6. Both rules become part of the /api/v2 contract. If other clients may want a preview per card or a different size, that is easier to add now than after the lock.
  • Lithuanian heading. CodeRabbit noted on silo-translations#87 that "rinkiniuose" differs from the catalog's usual "kolekcijos". That belongs in a separate translation fix.
  • Not confirmed, and not this PR's change: the Jellyfin GET /Items/{id}/Collections route uses the same ListContainingItem without the smart filter, so it may list a server collection made smart from its old rows. I haven't traced whether conversion keeps those rows.

Checks

  • Validated features: not checked. The board couldn't be read from this review's environment, so Validation tasks: none changed is unconfirmed.
  • User manual: Docs: collections now show on movie and series pages siloserver.org#411 covers the page. I added a comment there about the owner-access rule.
  • Other clients: Apple, Android and Roku follow-ups are linked in the description. Apple and Android should read preview_items as documented in docs/catalog-api.md.
  • Jellyfin: no change needed for this feature.

Fit: the row answers a requested gap in title discovery, which discussion #4142 asked for, and reuses the Home card builder rather than adding a parallel access path. It adds a new /api/v2 operation and capability during a correctness-focused period, and the preview's shape is still open, so it scores 7.

Readiness: every defect found is fixed and covered by tests that fail on the earlier head. It stays at 8 because the fixes weren't checked live and the contract question is open.

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

@Quick104
Quick104 merged commit faa406d into Silo-Server:main Nov 19, 2026
17 checks passed
Quick104 added a commit that referenced this pull request Nov 19, 2026
Main's title page collections (#4528) reuse the row-of-collections
card, so its web adapter now carries item_count_status and its fixtures
gain the field. Translations re-pin to release 2026.11.19-36be281,
which includes Silo-Server/silo-translations#95.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104 added a commit to Rhainland/silo-android that referenced this pull request Nov 22, 2026
Silo-Server/silo-server#4528 has merged, so the fixtures come from main
instead of its branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104 added a commit to Silo-Server/silo-android that referenced this pull request Nov 22, 2026
#1007)

* feat(detail): show the collections a movie or series is in on its page

When one collection holds the title, its page shows up to six of that
collection's other titles under the collection's name, ending in an
Explore all card that opens the collection. When several hold it, an
"Also in" row shows a poster card for each, with no cap. Phone and TV.

The row reads listCatalogItemCollections (Silo-Server/silo-server#4528)
only on servers whose search capabilities advertise item_collections,
and only for movies and series. It shows nothing while loading, when no
collection holds the title, or when the first read fails; a failed
refresh keeps the row on screen, as the box set row does.

The detail.alsoIn heading comes from a local silo-translations build
(Silo-Server/silo-translations#87 on the pinned release) until that
release ships. The vendored API v2 fixtures are re-synced from the
server branch to add the capabilities and title collections bodies.

Closes #997

* fix(detail): keep book titles off the TV collections row and return focus to it

- TV leaves book titles out of a collection's preview, as other TV rows
  do, and shows the collection's card under "Also in" when none are left.
- A preview title from a personal collection opens without the page's
  library, so a title from another library is not refused.
- On TV, Back from a collection or title opened in the row lands on the
  card that opened it, and Up from a first-rail "Also in" row returns to
  the hero, as the box set and More Like This rows do.
- The phone "Also in" row reuses CollectionPosterRow, and the TV page
  places one shared collections section at both positions.

* refactor(tv-detail): name the rail a focus return belongs to

One saved TvDetailReturnRail replaces the box set and collections flags,
and one recordReturn sets up a return for the box set, collections and
More Like This rows. The collections row reports which card opened a
collection, so its click and focus use the same return key.

* refactor(detail): simplify the collections row wiring

- loadItemCollectionsRow maps the read with ApiResult.map.
- TvCollectionRow takes onDirectionUp like TvMediaRow, instead of the
  title page wrapping it in its own key handler.
- The TV page drops checks for an empty preview, which the loader and
  the TV filter already rule out, and passes the row to its collections
  section rather than reading it with !!.

* refactor(tv-detail): place the collections row from smart-cast values

The series and movie placements each hold their own nullable row, so the
section is called with a checked value instead of collectionsRow!!.

* fix(detail): open collection preview titles without a library

A collection's titles can live in other libraries, so a library-scoped
read of a preview title from another library answers 404. Open them with
no library on phone and TV, as the collection pages already open their
titles.

* fix(tv-detail): keep hidden libraries' collections off the collections row

TV Home shows a server collection only when its library is one TV shows,
so an ebook library's collection stays off TV. The title page's
collections row filtered only the preview titles, so a collection whose
card names an ebook library still showed, with its collage and count.

The row now reads the libraries TV shows when it holds a server
collection and keeps only cards from those, as Home does. The same list
gives each card's library type, so the collection page opens with that
library's sorts and filters instead of the video-only "mixed" set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(detail): give a collection preview's cards one shape

A collection's preview can mix posters and audiobook covers, so its
cards came out at different heights. The preview now shares one artwork
ratio across its cards and Explore all, as More Like This does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(api): re-sync the API v2 fixtures from server main

Silo-Server/silo-server#4528 has merged, so the fixtures come from main
instead of its branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* perf(tv-detail): read the known library list for the collections row

The row only needs to know which libraries TV shows, which the cached
list answers, as it does for the box set row. This drops a library-list
request from every movie or series page with a server collection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Quick <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants