Skip to content

feat(sections): open every Home and library row as a full page - #2742

Merged
Quick104 merged 2 commits into
mainfrom
feat/browse-home-section
Oct 20, 2026
Merged

Quick104 merged 2 commits into
mainfrom
feat/browse-home-section

Conversation

@Quick104

@Quick104 Quick104 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none changed. The reachable cases (#1142 C1 and C3, #1146 C5) have not been run yet.

Home and library rows are carousels capped at their item limit, so the only way to see more of a row was to scroll it. "Explore all" opened a full page for just five row types (collection, custom filter, genre, random, recently added), and only when the server reported more items than the limit. Every other type, including recommendations, Trending, Continue Watching, Next Up and the daily-mix rows like Hidden Gems, had no full page; POST /api/v2/catalog/query with source=section answered them with an empty list.

With this change every Home and library row opens as a full page. The row title links to it, and every row shows "Explore all".

Approach

  • Server. Row types the catalog already answered as a query, collection or personal list keep that path. Every other type is now answered on /api/v2 by the row's own section fetcher: the server builds the row as the profile sees it, builds it again with a limit of 200 unless the row already came back short, and pages the combined list. The page starts with exactly the items the carousel showed, in the same order, then continues with the rest without duplicates. Leading with the row matters for daily-mix rows, whose pick changes with the limit. On Home the same hide-watched filtering applies as on the row. total is exact below the 200 cap, and paging uses the normal v2 cursor.
  • /api/v1 is frozen and keeps answering these rows with an empty list.
  • "New to Library" gained a content_id tiebreak so items with the same creation time keep their order across pages.
  • Web. SectionRow links every row title to its page and shows "Explore all" on every row. A row's own counts cannot tell whether its page holds more: Home drops titles another row already shows, so a row can look complete while its page has more. The browse allowlist is removed, so library rows of every type can be pinned to the sidebar. MediaCarousel hides the small "View" label beside a linked title when the row also shows "Explore all", so section rows show one label.
  • docs/catalog-api.md describes the behavior. No schema or OpenAPI change: the source and scope values are unchanged.
  • jellycompat has no section browsing, so it needs nothing. Apple and Android clients can open these pages through the same request whenever they choose to; no client change is required for this PR.

Validation

  • Go: build, gofmt, go vet, make lint-changed and make lint-router-recovery pass. make test-go fails six tests in internal/apiv2, internal/jellycompat and internal/metadata/nfo; each fails the same way on main in this environment, and none is in code this change touches.
  • Database: the new Home and library paging test is added to scripts/ci/db-contracts.txt. Against a freshly migrated database, the full contract list (274 tests) and the query-budget list (148) pass. The other database tests in the touched packages pass except two that also fail on main here.
  • Web: lint, format check, build, bundle budget and make test-web pass. New SectionRow tests cover the title link and "Explore all" on every row type, including a row that looks complete, and pinning on every library row type.
  • Generated contracts and hygiene: every verify-* target passes except make verify-prometheus-rules, which was not run because the Prometheus image could not be pulled here. This change does not touch the alert rules.
  • Manual: on two servers built from the same test library, one on main and one on this branch, a Home "New to Library" row with an item limit of 8 lists 39 items across 4 pages with no duplicates, starting with the row's 8 in order. On main the same request returns 0 items. Checked at desktop and phone width.
  • Not covered by hand: the test library has no watch history, so Continue Watching, Trending and recommendation rows were exercised only by the Go tests, not in the browser.

Evidence

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

Surface and build: web app at desktop and phone width. Before is main at 365e3d4; after is this branch.

Risks

  • Each page of a row-backed section rebuilds the row: one fetch at the row's limit, then one at 200 unless the first already came back short. Most of these fetchers are served from the resolved-list or recommendation cache; Returning Shows and Continue Watching are built per request. Trending and Most Watched use a moving time window, so their order can shift slightly between pages.
  • Recommendation rows stop at 60 items because the recommendation engine caps them there.
  • The full page uses plain poster cards, so Continue Watching and Next Up lose their progress bars and wide stills there.
  • "Explore all" is now a link, so it no longer uses the animated page transition.
  • The full page does not apply Home's cross-row de-duplication, so a title the carousel skipped because another row already showed it can appear on the full page.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code, running in T3 Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated at the author's direction; not yet reviewed by a person
  • Adversarial review: a separate Claude Code reviewer agent (claude-opus-5-5) read the full diff against the source. It checked profile and library access, paging and cursors, error mapping, fetch cost at 200 items, and the web entry points. It found no access or paging defects. It found that total_exact stayed true when the 200 cap cut a list, and that each page looked the row up twice and ran the 200-item fetch even for a row that was already exhausted. Both are fixed. Its lower findings are listed under Risks.

🤖 Generated with Claude Code

Note

Open every Home and library section row as a full catalog browse page

  • Adds a row-backed browse path for sections that are not query-backed. SectionHandler.ResolveCatalogSection now returns a FetchItems callback, and the catalog resolver pages the fetched row with a 200-item cap, merging the row's displayed items first and de-duplicating wider results (catalog_sections.go, catalog_resolver.go).
  • SectionRow now links the title and Explore-all action to the catalog page for every Home and library row, regardless of type or item count. All library rows also get the pin button (SectionRow.tsx).
  • Adds deterministic ordering to New to Library by sorting on content ID after creation time, and documents row-backed browsing in the catalog API spec.
  • Behavioral Change: non-cursor (v1) section requests still return the empty response and never fetch the row; totals are marked inexact when a row reaches the 200-item cap; the isSectionBrowseSupported allowlist in catalogSearchParams.ts is removed, so row navigation no longer depends on section type.

Macroscope summarized 591092e.

Explore all and the row title now open a full catalog page for every
section type. Rows the catalog cannot express as a query (recommendations,
trending, Continue Watching, Next Up, daily-mix rows) are built by their
section fetcher on /api/v2: the page lists the items the row shows, then
the rest of a fetch of up to 200 items, with Home's hide-watched filter.
The frozen /api/v1 catalog keeps answering these rows with no items.

New to Library gains a content_id tiebreak so paging is stable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 254804b5-7cc6-442e-aa1a-898bb9ae6741
📥 Commits

Reviewing files that changed from the base of the PR and between e10198c and 591092e.

📒 Files selected for processing: 11
  • docs/catalog-api.md
  • internal/api/handlers/catalog_row_backed_sections_db_test.go
  • internal/api/handlers/catalog_sections.go
  • internal/catalog/catalog_resolver.go
  • internal/catalog/catalog_section_resolver_test.go
  • internal/sections/fetcher.go
  • scripts/ci/db-contracts.txt
  • web/src/components/MediaCarousel.tsx
  • web/src/components/SectionRow.test.tsx
  • web/src/components/SectionRow.tsx
  • web/src/pages/catalogSearchParams.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@silo-kody

silo-kody Bot commented Oct 20, 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 api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request go Pull requests that update go code javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Oct 20, 2026
Comment on lines +55 to +56
if rowLimit >= limit || (!hideWatched && len(shown) < rowLimit) {
return mergeSectionBrowseItems(shown, nil, limit), 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 Bug high

Premature source-exhaustion detection in internal/api/handlers/catalog_sections.go treats a short filtered row as exhausted because FetchOne calls withoutNotInterested, which removes marked titles without refilling the row. With hide-watched disabled, dismissing one title from a full Hidden Gems or Trending row makes Explore all return only that shortened row with an exact total despite more eligible titles existing; do not skip the wider fetch solely because len(shown) < rowLimit.

Prompt for LLM

File internal/api/handlers/catalog_sections.go:

Line 55 to 56:

Premature source-exhaustion detection in internal/api/handlers/catalog_sections.go treats a short filtered row as exhausted because FetchOne calls withoutNotInterested, which removes marked titles without refilling the row. With hide-watched disabled, dismissing one title from a full Hidden Gems or Trending row makes Explore all return only that shortened row with an exact total despite more eligible titles existing; do not skip the wider fetch solely because len(shown) < rowLimit.

Talk to Kody by mentioning @kody

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

​

​

Comment on lines +58 to +60
wide := row.section
wide.ItemLimit = limit
more, err := h.fetchCatalogSectionRow(ctx, row, wide, hideWatched)

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 Performance high

Duplicate fetches in internal/api/handlers/catalog_sections.go execute each full per-profile row's fetcher twice per catalog page, once at the carousel limit and again at 200, including uncached Returning Shows and Continue Watching builds. Returning Shows repeats its watch-history aggregation, documented in fetchReturningShows as approximately 0.5 seconds, despite its stable ordered limited query supporting a single wide fetch; reserve the two-fetch merge for rows whose selection changes with the limit.

Prompt for LLM

File internal/api/handlers/catalog_sections.go:

Line 58 to 60:

Duplicate fetches in internal/api/handlers/catalog_sections.go execute each full per-profile row's fetcher twice per catalog page, once at the carousel limit and again at 200, including uncached Returning Shows and Continue Watching builds. Returning Shows repeats its watch-history aggregation, documented in fetchReturningShows as approximately 0.5 seconds, despite its stable ordered limited query supporting a single wide fetch; reserve the two-fetch merge for rows whose selection changes with the limit.

Talk to Kody by mentioning @kody

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

​

​

Home drops titles another row already shows, so a row can look complete
while its full page holds more. Every row now has a full page, so link
it the same way everywhere instead of guessing from the row's counts.

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

silo-kody Bot commented Oct 20, 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 ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request go Pull requests that update go code javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant