Repository navigation
feat(sections): open every Home and library row as a full page - #2742
Conversation
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]>
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
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:
|
| if rowLimit >= limit || (!hideWatched && len(shown) < rowLimit) { | ||
| return mergeSectionBrowseItems(shown, nil, limit), nil |
There was a problem hiding this comment.
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.
| wide := row.section | ||
| wide.ItemLimit = limit | ||
| more, err := h.fetchCatalogSectionRow(ctx, row, wide, hideWatched) |
There was a problem hiding this comment.
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 — 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: 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/querywithsource=sectionanswered 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
/api/v2by 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.totalis exact below the 200 cap, and paging uses the normal v2 cursor./api/v1is frozen and keeps answering these rows with an empty list.content_idtiebreak so items with the same creation time keep their order across pages.SectionRowlinks 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.MediaCarouselhides the small "View" label beside a linked title when the row also shows "Explore all", so section rows show one label.docs/catalog-api.mddescribes the behavior. No schema or OpenAPI change: thesourceandscopevalues are unchanged.Validation
gofmt,go vet,make lint-changedandmake lint-router-recoverypass.make test-gofails six tests ininternal/apiv2,internal/jellycompatandinternal/metadata/nfo; each fails the same way onmainin this environment, and none is in code this change touches.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 onmainhere.make test-webpass. NewSectionRowtests cover the title link and "Explore all" on every row type, including a row that looks complete, and pinning on every library row type.verify-*target passes exceptmake verify-prometheus-rules, which was not run because the Prometheus image could not be pulled here. This change does not touch the alert rules.mainand 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. Onmainthe same request returns 0 items. Checked at desktop and phone width.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2742/
Surface and build: web app at desktop and phone width. Before is
mainat 365e3d4; after is this branch.Risks
Checklist
AI Disclosure
total_exactstayed 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
SectionHandler.ResolveCatalogSectionnow returns aFetchItemscallback, 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).SectionRownow 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).isSectionBrowseSupportedallowlist in catalogSearchParams.ts is removed, so row navigation no longer depends on section type.Macroscope summarized 591092e.