Two SPA list loads requested EXACTLY the server's pageSize cap (100), truncating
identically to #634/#644's over-cap defect but invisible to that fix's manual
"pageSize above the cap" grep:
- TraktListsScreen requested pageSize:100 and rendered BOTH the truncated page
AND the real totalCount, so 101 lists showed as "101 lists" over a 100-row
table. Trakt lists are bounded-by-construction (Class A), so this now pages
to completeness via the shared loadAllPages helper, surfaces an "incomplete"
badge if a page ever comes back short of totalCount, and passes an
AbortSignal from the effect cleanup.
- ChannelBuilder's loadCollections (fanning out per collection kind) reported
the truncated merged.length as totalCount, so canLoadMore's
`items.length < totalCount` comparison was permanently false and "load more"
could never fire. It now sums the real per-kind totalCount, mirroring the
existing loadLibraryItems pattern in the same file, and canLoadMore is no
longer gated to the 'library' source only.
Also found and fixed a third at-cap site not named in #650: ChannelBuilder's
SeasonsDialog (TelevisionSeason browse scoped to one show) reads pageSize:100
but never read the response's totalCount. No real show has 100+ seasons, so
this stays a single bounded page (Class B) rather than paging to completeness,
but now surfaces a "Showing the first N of M seasons" hint instead of silently
truncating if a show somehow exceeds the cap.
Codifies the missing completeness guard as an enumerating allow-list vitest
test (web/src/api/pageSizeCallSites.guard.test.ts): scans every `pageSize:`
call site in the SPA and diffs it against a hand-reviewed registry in both
directions (unregistered site = new defect risk, stale entry = registry rot),
with anti-vacuity floors on files-scanned and sites-discovered. Verified the
guard actually fails on a planted defect and a planted stale entry before
finalizing it.
No server-side change: the client pages, the server stays bounded
(api.search-allitems-paging precedent).