Skip to content

fix(catalog): stop dropping mixed libraries on the floor - #111

Merged
RXWatcher merged 1 commit into
Silo-Server:mainfrom
RXWatcher:fix/mixed-library-visibility
Jul 27, 2026
Merged

RXWatcher merged 1 commit into
Silo-Server:mainfrom
RXWatcher:fix/mixed-library-visibility

Conversation

@RXWatcher

Copy link
Copy Markdown
Contributor

Problem

A server library of type mixed — movies and series in one folder — mapped to no MediaMode, so it never reached navigation, search or browse on either platform.

Not degraded: erased. Nothing indicated a library was missing, and there was no way for a user to reach its contents at all.

silo-apple hit the same thing and fixed the decode half in Silo-Server/silo-apple#93, where it was described as "silently dropped at decode". Android's version is the same failure one layer along, in videoLibraryTypes.

Change

Admit mixed as a video library type. That is the whole fix for visibility, because the rest of the path already does the right thing with it: tvCatalogMediaTypeFor returns null for an unrecognised type, which scopes browse by libraryId alone rather than forcing a mediaType — exactly what a merged library needs. That fallback exists because music libraries were once wrongly forced to "movie"; mixed libraries inherit the correct behaviour from it for free.

Deliberately not ported

Apple also added a Type facet (Movies / Series, single-select) so the merged grid narrows by filtering rather than navigation, and listed the library under both cascade dropdowns on tvOS.

That is a UX decision worth making on purpose rather than mirroring blind — and it is worth nothing while the library is invisible. Visibility first; the facet is a separate, smaller change if the project wants the same shape as Apple.

Testing

Four tests covering both platforms' mappings, server-side casing and padding (" Mixed ", "MIXED"), and — importantly — that types the client genuinely has no home for still map to nothing. Without that last one this fix would turn "unrecognised" into "video" and put a photo library in the film grid.

Full unit suites and both assembleDebug targets green, based on upstream/main.

Not exercised against a real mixed library. I do not have one configured; the mapping and its fallbacks are unit-tested, but nobody has browsed one end to end.

AI-use disclosure

Written by Claude Opus 5 (Claude Code) working with @RXWatcher, who is tracking Apple/Android parity and directed this port.

Ports the decode half of silo-apple#93. A server library of type "mixed"
— movies and series in one folder — mapped to no MediaMode, so it never
reached navigation, search or browse on either platform. Not degraded:
erased, with nothing to indicate a library was missing.

Admitting it as a video library is the whole fix for visibility. The TV
browse path already does the right thing with it: tvCatalogMediaTypeFor
returns null for an unrecognised type, which scopes the browse by
libraryId alone rather than forcing a mediaType — exactly what a merged
library needs.

Not ported: Apple also added a Type facet (Movies / Series) so the merged
grid can be narrowed by filtering rather than navigation, and lists the
library under both cascade dropdowns on tvOS. That is a UX decision worth
making deliberately rather than mirroring blind, and it is worth nothing
while the library is invisible. Visibility first.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Db4dSxN9tH8yN7uUP549tK
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@RXWatcher, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b7fec5da-5295-4767-8d0e-80362ccf443c

📥 Commits

Reviewing files that changed from the base of the PR and between 7e9fdc1 and 763653e.

📒 Files selected for processing (2)
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/navigation/MediaMode.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/navigation/MediaModeTest.kt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@RXWatcher
RXWatcher merged commit 498a07f into Silo-Server:main Jul 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant