Repository navigation
fix(home): leave rows with nothing to show out of the v2 section lists - #2894
Conversation
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:
|
|
The evidence shows before-and-after results for
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
Server/API #1140 C4 is ready for a human re-test after merge: the issue's AI sandbox note reports zero-accessible rows in the main v2 response, and this change filters those rows from the v2 aggregate list. The Results cell remains Suggested follow-up: After merge, rerun C4 against a published build and record the human result in #1140. Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
Quick104
left a comment
There was a problem hiding this comment.
Review of 5e282e3. Three findings, none blocking. I'm fixing the first two in a commit on this branch, so there's no need to change them yourself.
Low: a comment still describes the old v2 behaviour (internal/api/handlers/home_views_service.go:106, outside the diff). The comment in homeSectionItems says the aggregate read "keeps the page up with an empty row" when a row fails. After this PR only the frozen v1 aggregate read does that; the v2 lists leave the failed row out. A later change that trusts the comment could put empty-on-failure back into v2. I'm updating the comment.
5e282e3 to
5448e4b
Compare
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: d0a9f43. Main had moved and the branch conflicted again, so I rebased it onto 4018816 and force-pushed with a lease. Only The approach still holds on current main. Addressed
Maintainer decision (settled)
Clients and parity
Validated features Other checks
Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green) Fit: the v2 contract now meets the curated home sections criterion that rows with zero accessible items are omitted, before the API locks, with a small change at the right boundary and v1 untouched. Readiness: a test that fails on main proves the behaviour, no open finding remains, and the scope decision is settled. This round ran no new live API or device check; the published sandbox evidence predates the rebase, which changed no code in this PR. 🤖 Claude Code (claude-opus-5-5) |
|
Correction: #1140 C4 is still Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
Quick104
left a comment
There was a problem hiding this comment.
Review of 5448e4b, rerun after main moved. The branch conflicted with current main, so I'm rebasing it onto 81ae2ce; only two doc comments conflicted. One new finding, low severity. I'm fixing it in a commit on this branch, so there's no need to change it yourself.
Low: the migration ledger still says v2 answers the same rows as v1. api-contract.md says each deliberate v2 difference from v1 is recorded on the ledger rows. The listHomeSections row in contracts/api/v2/migration.json still reads "Same body as v1", and neither ledger row nor the catalog-libraries and catalog-home "Deliberate differences" lists mention the empty rows the v2 lists now leave out. Someone porting a v1 client, or checking v1 retirement (#886), would expect v2 to return the same rows as v1. I'm adding the difference to both ledger rows and both lists. The same commit corrects the v1 Home handler comment, which didn't mention the rows that hiding watched titles empties.
The cross-provider round found one more case of the open Apple scoped-tab question, which I've added to that thread.
🤖 Claude Code (claude-opus-5-5)
5448e4b to
5d96f63
Compare
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:
|
The v2 Home and library section lists answered every resolved row, even one whose titles all sit in libraries or above rating limits the viewer cannot open. Such a row reached clients with a title and no cards, and each client had to hide it on its own. Both lists now leave out every row with no items, as they already did for an off-season seasonal row. A row asked for by ID still answers empty, and the frozen v1 lists keep their old answers.
The comment on the single-section read still said the aggregate read answers a failed row empty, which is now only true of v1. The contract paragraph also left out rows the cross-row duplicate filter empties, which the per-row read answers with items. Co-Authored-By: Claude Opus 5.5 <[email protected]>
api-contract.md says every deliberate v2 difference from v1 is recorded on the migration ledger rows, but the listHomeSections row still said "Same body as v1" and neither ledger row nor either "Deliberate differences" list named the rows the v2 lists now leave out. Also say in the v1 Home handler comment that v1 drops a row hiding watched titles emptied. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5d96f63 to
5fe40c6
Compare
The contract paragraph promised every client the same rows, but a web-only hero row and the item_limit a client asks for can change which rows a request resolves or which the duplicate filter empties. 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:
|
Quick104
left a comment
There was a problem hiding this comment.
Review of 5fe40c6, rerun after main moved again. The branch conflicted with main, so I rebased it onto 4018816 and force-pushed with a lease. Only scripts/ci/db-contracts.txt conflicted (main's new web-only hero test sits next to this PR's entry; both are kept), and git range-diff shows the code commits otherwise unchanged. One new finding, low severity, already fixed in d0a9f43 on this branch, so there's no need to change it yourself.
🤖 Claude Code (claude-opus-5-5)
Problem
Related issue: #1137
Validation tasks: unblocks #1140 C4
GET /api/v2/home/sectionsandGET /api/v2/library/{id}/sectionsreturn every row on the page, including rows whose titles all sit in libraries the viewer can't open or above their rating limit. Those rows arrive with a title and no cards. Every first-party client hides them on its own, but a third-party client shows an empty titled row, and the server response does not meet the curated home sections criterion that "rows with zero accessible items are omitted" (#1137 AC5), which the Server validation task checks directly.This change makes both v2 lists leave out every row that has no items for the viewer.
Approach
The v2 Home and library section lists now drop a row with no items after access filtering, as they already did for an off-season seasonal row. Two reads keep their current behaviour on purpose:
getHomeSectionItemsstill answers an empty row requested by ID.getHomeLayoutstill lists every resolved row, because it is built before any row is fetched. The web app reads Home this way and already hides empty rows.A row whose fetch fails is now left out of the v2 lists rather than answered empty; per-row reads still return the 500. The frozen
/api/v1lists keep their current answers.api-contract.mdandrecommendations.mddescribe the new behaviour, the migration ledger rows for both operations record it as a deliberate difference from v1, and the OpenAPI operation descriptions are updated.Validation
scripts/ci/db-contracts.txt): a viewer limited to one library gets the home and library lists without a row whose titles are all in the other library, while the by-ID read still answers that row empty.make lint-changed: 0 issues.verify-apiv2-openapi,verify-apiv2-web-typesandverify-migration-ledger: current./api/v2/home/sectionshad zero items. Granting library access added the restricted row on the next request and revoking it removed the row again. Per-profile order and the admin override behaved as before, and/api/v1/home/sectionsstill returned the empty rows.Evidence
GET /api/v2/home/sectionsfor a profile restricted to a kids library, same server data, before and after (row title and item count):8ab0e8e19)Surface and build: native API v2, server built from this branch on a sandbox with synthetic media. Home and unscoped library views already hide empty rows; the scoped Apple tab differences are described under Risks. The library section list results are on the evidence page.
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2894/
Risks
A client that expects
listHomeSectionsorlistLibrarySectionsto return a row with no items, for example to draw its own empty state for Continue Watching, no longer gets it. This is a v2 contract change made before the 1.0 lock and is recorded inapi-contract.md.Apple refills short rows on a mixed library's Movies or Series tab from
catalog?source=section. A row left out here is not refilled. One case reaches this: a personalized row the cross-row duplicate filter emptied. A second case, an unsorted collection row whose firstitem_limitmembers are hidden from the viewer, was a fetcher bug that #3500 fixed on main (#3384).Maintainer decision: keep empty v2 rows omitted and repair the collection fetcher separately (done in #3500). The scoped-tab limitation for personalized rows emptied by the duplicate filter is accepted for this PR.
Follow-ups: none open. #3384 (unsorted collection rows) and #3301 (curated rows ignoring
item_limiton the list reads) both predated this change and are fixed on main by #3500 and #3419.Checklist
AI Disclosure
Decision follow-up: Codex in T3 Code (
gpt-6-astra) recorded the maintainer’s scope decision.Harness: Claude Code
Tool(s): Claude Code; OpenAI Codex CLI (review only)
Model(s): claude-opus-5-5; gpt-6.1-sol (review only)
Involvement: Fully AI-generated, human verified
Adversarial review: independent reviews by claude-opus-5-5 and gpt-6.1-sol of the diff for correctness, repository standards, and the [v1] Curated home sections #1137 criteria. Both found that the first version stopped the frozen v1 list from leaving out rows emptied by hiding watched titles; that was restored, and a v1 behaviour assertion that CONTRIBUTING.md rules out was removed. No other findings.
Maintainer review: claude-opus-5-5 (Claude Code) reviewed 5e282e3 and, after main moved, 5448e4b rebased onto main, each with one gpt-6.1-sol (Codex) round. A third round rebased the branch onto main again and reviewed it with one more gpt-6.1-sol round. Fixes: two stale comments and the contract paragraph (5448e4b), the migration ledger rows and v1 differences lists (5d96f63), and the contract paragraph's claim that every client gets the same rows (d0a9f43). The unsorted collection case went to [bug] Unsorted collection rows come back empty when their first members are hidden from the viewer #3384; the maintainer accepted keeping this PR scoped and repairing [bug] Unsorted collection rows come back empty when their first members are hidden from the viewer #3384 separately.
Note
Omit empty rows from v2 home and library section lists
HomeSectionsandLibrarySectionsnow drop every row that has no items after access, seasonal, fetch, watched-title, and duplicate filtering; v1 keeps its existing behavior of returning those rows emptykeepEmptyRowsoption, and the v1 handlers route through them with the option enabledTestAggregateSectionsOmitRowsWithNoAccessibleItemsDBand registers it in the CI contract test listMacroscope summarized d0a9f43.