Repository navigation
fix(tv): show mixed libraries in movie and series tabs - #441
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughMixed libraries now appear under Movies and Series. TV library sections can filter and refill catalog items by media scope. Collection navigation passes media scope and collection source to detail requests. Catalog items include series, episode, and playback-progress fields. ChangesTV media scoping
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant TvLibraryTabType
participant TvMainShell
participant TvLibraryDetailViewModel
participant SectionRepository
participant SectionApi
TvLibraryTabType->>TvMainShell: provide movie or series media scope
TvMainShell->>TvLibraryDetailViewModel: pass media scope
TvLibraryDetailViewModel->>SectionRepository: request section catalog pages
SectionRepository->>SectionApi: forward library, section, and continuation
SectionApi-->>SectionRepository: return catalog page result
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Mixed TV libraries now show scoped content under Movies and Series, and collection routes carry the selected scope and source. No outstanding defect was established for the reviewed changes, so the change appears ready to merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes preserve library scope and prevent superseded loads from replacing current results. No introduced authorization bypass was established. Server-side ownership checks and media-filtering behavior remain unverified, so the assessment is qualified rather than minimal. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This comment has been minimized.
This comment has been minimized.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This comment has been minimized.
This comment has been minimized.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This comment has been minimized.
This comment has been minimized.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
a748b6b to
28ea863
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:
|
Quick104
left a comment
There was a problem hiding this comment.
One new finding verified against the current server implementation and a focused JVM reproduction of the production helper.
AI-assisted review by gpt-6.1-sol in T3 Code using the Codex provider.
| val target = (section.itemLimit.takeIf { it > 0 } ?: section.items.size.coerceAtLeast(20)).coerceAtMost(100) | ||
| fun result(items: List<SectionItem>, incomplete: Boolean = false) = | ||
| ScopedTvSection(section.copy(items = items.take(target), totalCount = items.size.coerceAtMost(target)), incomplete) | ||
| if (initial.size >= target || section.totalCount <= section.items.size) return result(initial) |
There was a problem hiding this comment.
[P2] Refill scoped shelves despite bounded inline counts
The inline total_count is not an exhaustion signal for these server shelves. In the current server, an unfiltered mixed library uses the bounded recently-added query, and fetchRecentlyAdded returns len(items) after its limit. With 20 movies inline and older series still available, this condition returns an empty Series shelf without ever calling the catalog refill. I reproduced that with the unchanged production helper: zero refill calls, zero series, and incomplete=false; changing only the reported count to 21 triggers the refill. This can make Recommended say the mixed library is empty while Browse contains series. Attempt the supported refill when the scoped slice is short instead of treating the bounded inline count as proof that nothing remains.
There was a problem hiding this comment.
Agreed. fetchRecentlyAdded (and several other fetchers) return len(items) after the limit, so the inline total_count can't prove a scoped shelf is exhausted. 6ac81de drops the totalCount <= items.size shortcut. A scoped shelf now skips the refill only when its filtered inline slice already fills the shelf; otherwise it refills through the section catalog, and only has_more/the continuation ends paging. boundedInlineCountStillRefillsScopedShelf reproduces your case (20 inline movies, total_count 20, series further down the source). It fails before the change and passes after.
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:
|
|
Silo's pull request guidance changed today (#490). A PR that changes what a user sees now needs before-and-after evidence in its Evidence section, and a PR with no visible change says Missing here: Before-and-after TV screenshots of the Movies and Series tabs with a mixed library, and of the partial-load warning. The body also has no Evidence section or AI disclosure yet. The rules are in Show visible changes, and the PR template shows the Evidence section layout. I've converted this PR to draft for now. Mark it ready for review once the Evidence section is filled in. Generated by Claude Code |
|
@Quick104 ready for another look. The P2 shelf-refill finding is fixed in |
The inline total_count on library shelves is not an exhaustion signal. Recently added (and several other server shelves) report len(items) after the item limit, so 20 inline movies with total_count 20 hid the older series from the Series tab: no refill ran and Recommended showed an empty shelf while Browse had series. Refill whenever the scoped slice is short of the shelf target and let the catalog continuation (has_more / empty page) decide exhaustion. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rseded shelf loads A mixed library opens personal collections through the library collection screen, which always started shuffles in the library-collection scope; pick the scope from the collection source instead. Retrying Recommended now cancels the running load, so its refill cursor chains stop rather than paging until the final publish check. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
6ac81de to
f3f3149
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:
|
|
@Quick104 heads-up: I rebased this onto main and force-pushed |
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:
|
A shuffle request carries only the collection kind and id, so from a scoped view of a mixed library's collection it would draw from both types. Hide shuffle there until the request can carry the scope. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
5388dcb to
e1b216e
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:
|
…cope Library shuffle is not offered in a Movies- or Series-scoped view, since a shuffle request carries no media type. Customized and profile-added shelves keep their profile-resolved inline items instead of refilling from the stored definition, which would drop the profile's overrides. Co-Authored-By: Claude Opus 5.5 (1M context) <[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: changes #6 C1 (mixed-library collection routes on TV now carry the selected Movies/Series scope); its cases are all Not run, so no recorded result changes.
Android TV excludes mixed libraries from its Movies and Series tabs. A viewer with only a mixed library cannot use either tab to browse the corresponding titles.
Approach
Include mixed libraries in both video tabs and carry the selected movie/series scope through Recommended, Browse and collection routes. Scope state and requests stay separate. Recommendation refills use bounded paging and concurrency, retain matching items after a partial failure, and expose Retry.
Validation
On head
e0762c74, rebased on main:./gradlew testDebugUnitTest: 5,552 tests, zero failures, errors or skips (812 phone, 1,226 TV, 1,818 shared, 1,694 Android shared, 2 libass bridge).:androidApp:assembleDebugand:androidTvApp:assembleDebug: passed.lintDebugfor shared, phone and TV, plus phone and TVlintVitalRelease: no new issues beyond the baseline.user_collectionscope, Movies- or Series-scoped library and collection views offer no shuffle, and customized or profile-added shelves never refill from the stored definition.6ac81ded(Evidence below) confirm separate movie and series shelves, retained items during an injected catalog failure, and recovery after Retry.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-441/
Before:
9518b262305a3137949b90720ce263617d1e46a3, before the mixed-library changes. After:6ac81ded623d419f738f9f5823893c06c4ce6c5f. The later rebase onto mainf3f3149e(shuffle scope, Retry cancellation)e1b216e5ande0762c74(no shuffle in scoped views; customized shelves keep their resolved items) do not change these screens. Both use the same native Android TV emulator, Reviewer profile and synthetic API dataset: one Mixed Library containing Movie One, Movie Two, Series One and Series Two.The fixture serves API responses to unmodified native builds. This verifies client presentation and scoping; production backend and playback behavior are outside this capture.
Before, the mixed-only profile has no Movies or Series tab. That missing navigation prevents a before capture of either destination; the same Home view shows the difference in available tabs. After, both tabs are available and their shelves contain only matching titles.
Movies — only Movie One and Movie Two:
Series — only Series One and Series Two:
Partial-load warning: with the fixture catalog returning HTTP 503 during a fresh Series load, both inline series remain visible and Retry appears. The warning reads “Some shelves could not be fully loaded for this media type. Retry or open Browse.” Restoring the fixture and activating Retry clears the warning without losing the titles.
After Retry:
Risks
Refill work is bounded, so shelves can still be incomplete. Customized or profile-added shelves are not refilled, because the catalog section source reads only the stored definition; they show their profile-resolved items and report incomplete when short. Shuffle is hidden in Movies/Series-scoped views until a shuffle request can carry the scope. The warning and Retry make that state visible. Client evidence uses a synthetic server fixture.
Checklist
AI Disclosure
gpt-6-astra(original implementation) andgpt-6.1-sol(this follow-up). Later commits credit Claude Opus 5.5; its exact API identifier is not present in the available metadata.f3f3149e: Claude Code, modelclaude-opus-5-5[1m], rebased on main, fixed the Kody findings raised on fix(mobile): separate movies and series in mixed libraries #447 against this code, and reran the gates above. No independent agent reviewed this change.Note
Show mixed libraries in TV Movies and Series tabs with media-scoped browse
TvLibraryTabType, and the tab supplies a movie or series scope to library detail, browse, and collection routesBrowseItemand extendsSectionApi.getLibraryCollectionItemswith media type, library ID, and sourcescopeTvLibrarySectionin TvLibraryMediaScope.ktMacroscope summarized e0762c7.