Skip to content

feat(for-you): add an Audiobooks filter to Watchlist and Favorites - #1202

Merged
Quick104 merged 2 commits into
mainfrom
feat/for-you-audiobook-support
Nov 16, 2026
Merged

Quick104 merged 2 commits into
mainfrom
feat/for-you-audiobook-support

Conversation

@Quick104

@Quick104 Quick104 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1018 (the All / Movies / TV Shows switch; this PR adds Audiobooks to the same switches and does not close it)
Validation tasks: changes #324 C2, #325 C2 (Favorites and Watchlist offer an Audiobooks option while Show Audiobooks is on; with it off they are unchanged)

Other clients: Android Silo-Server/silo-android#966; Roku N/A (no audiobook support); Web N/A (its Watchlist and Favorites type filter already includes Audiobooks)

Watchlist and Favorites split saved titles into Movies and TV Shows only. On iPad, on the iPhone Duo's cover screen and in tvOS Favorites, a saved audiobook matched neither option, so it never appeared. On the iPhone For You tab it showed only under All. The server already accepts and returns audiobooks in both lists (type: "audiobook").

Approach

  • PersonalMediaSection and PersonalMediaFilter gain audiobooks. The option appears only while Show Audiobooks is on (off by default, stored per profile on the device), in:
    • the iPad and iPhone Duo cover screen's segmented control on Watchlist and Favorites
    • the iPhone For You dock's type menu
    • the tvOS Favorites pills
  • If someone picked Audiobooks and then turns Show Audiobooks off, the screen falls back to Movies (segmented control and pills) or All (dock). The pick is kept, so it returns when they turn audiobooks back on.
  • Each type has its own empty-state icon and title ("No Favorite Audiobooks", "No Watchlist Audiobooks"). The dock header counts "N books".
  • A saved list draws square covers when every title it shows is an audiobook. A mixed list keeps 2:3 posters, so each row keeps one card height and its titles line up.
  • Strings come from silo-translations 2026.11.16-29ecbf0 (feat: add Apple audiobook filter strings for Favorites and Watchlist silo-translations#61), translated into all 21 languages.

For You recommendations stay movie and series only. The server limits every Discover row to those two types (internal/recommendations/repo.go in silo-server), so the For You page shows its existing "No recommendations yet" state under the Audiobooks filter. Audiobook recommendations would need a server change and are out of scope here.

Validation

  • Built on MacDev with Xcode 27.2 and checked on iPhone 17 Pro and iPad Pro 13-inch simulators, signed in to a Silo dev deployment. The test profile had three audiobooks in Favorites and two in Watchlist.
  • iPhone, Show Audiobooks off: the dock's type menu still reads All / Movies / TV Shows. Turned on, it adds Audiobooks. Under Audiobooks, Favorites shows "3 books" and Watchlist shows "2 books", with square covers. With both lists empty of audiobooks, they show the new empty-state titles.
  • iPhone, Watchlist under All: the two audiobooks sit beside movies and shows as 2:3 posters, and row titles line up. An earlier build that drew audiobooks square in mixed rows left the titles uneven, which is why mixed lists keep posters.
  • iPad Favorites: the segmented control reads Movies / TV Shows / Audiobooks. Audiobooks shows the three saved books, which no option showed before.
  • PersonalMediaFilterTests pass, 6 of 6. Two are new: the Audiobooks filter keeps only audiobooks, and the option appears only while audiobooks are on and falls back when they're turned off.
  • SiloTV and SiloMac build (compile only).
  • After the review fix in 78a69cc8 (the cover shape is now worked out once per grid instead of per card): PersonalMediaFilterTests 6 of 6, SiloMac builds, and the iPhone Duo and Apple TV builds install and launch. Both include fix(tvos): return to the previous screen on Back from Switch Profile #1200, which this branch is rebased onto.

Evidence: https://evidence.siloserver.org/r/silo-apple/pr-1202/

Evidence

Same account and saved lists on each device. iPhone and iPad come from the build before the rebase. iPhone Duo and Apple TV come from 78a69cc8.

  • iPhone 17 Pro: the dock's type menu with Show Audiobooks off and on; Favorites and Watchlist under Audiobooks, empty and with saved books; Watchlist under All with audiobooks mixed in.
  • iPad Pro 13-inch: Favorites with the new segmented control, under Audiobooks.
  • iPhone Duo folded (cover screen): Favorites with Movies / TV Shows / Audiobooks, under Audiobooks.
  • iPhone Duo open: Favorites under Audiobooks in the wide-phone grid. The open Duo uses the shortcut layout, which has no For You type filter, so the dock menu doesn't apply there.
  • Apple TV 4K: Favorites with the new Audiobooks pill, under Audiobooks, with square covers.
  • Mac: not captured. Its Watchlist and Favorites have no type switch and already list every type. The only change there is the cover shape of an all-audiobook list, which uses the same rule as the other screens. There's no way to capture Mac screenshots remotely from the build host, and SiloMac compiles.

Risks

A profile with Show Audiobooks on and Audiobooks picked sees an empty For You page, because the server sends no audiobook recommendations. The dock's type menu shows the pick, so it's clear why.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code, GitHub CLI, agent-device (simulator control), silo-evidence; silo-translations make translate (Claude Code, claude-opus-5-5) for the strings
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated; not yet verified by a human
  • Adversarial review: none run. A simplify pass moved the dock filter's type mapping into PersonalMediaFilter.section instead of repeating it in both list views.

🤖 Generated with Claude Code

Watchlist and Favorites offered only Movies and TV Shows, so a saved
audiobook never appeared on iPad, the iPhone Duo's cover screen or tvOS
Favorites, and the iPhone For You dock showed it only under All.

Add Audiobooks to PersonalMediaSection and PersonalMediaFilter, offered
only while Show Audiobooks is on. A pick of Audiobooks falls back to
Movies (pickers) or All (dock) if audiobooks are later turned off, and
returns when they are turned back on. Each type gets its own empty-state
icon and title, and the dock header counts books. A saved list draws
square covers when every title it shows is an audiobook, and keeps 2:3
posters otherwise so mixed rows line up.

Strings come from silo-translations 2026.11.16-29ecbf0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Nov 16, 2026
@silo-kody

silo-kody Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 3 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Centralize server-relative authentication path validation
  • Enforce latest-link-wins centrally across deferred deep links
  • Rank subtitles using container capabilities and one stable cross-client policy

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T03:35:51.388645Z 78a69cc New commits
🔒 Security Review ✅ Completed 2026-11-16T03:36:38.256246Z 78a69cc New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The PR adds Audiobooks to personal media sections and the For You dock filter. It applies preference-based availability and fallback behavior, updates saved-list filtering, empty states, labels, and cover aspect ratios, and adds localization entries and tests.

Changes: Audiobook media filtering

Layer / File(s) Summary
Audiobook filter and section rules
iosApp/iosApp/Screens/Personal/FavoritesView.swift, iosApp/Tests/PersonalMediaFilterTests.swift, iosApp/iosApp/Localizable.xcstrings, .silo-translations
Personal media sections and filters add Audiobooks, including matching, labels, icons, and count text. Audiobooks are omitted from available options when disabled, with selected values resolving to Movies or All. Tests cover matching, exclusions, availability, and fallback behavior.
Favorites and Watchlist behavior
iosApp/iosApp/Screens/Personal/FavoritesView.swift, iosApp/iosApp/Screens/Personal/WatchlistView.swift, iosApp/iosApp/Localizable.xcstrings
Favorites and Watchlist filter by the resolved section and show section-specific empty states. Cards use square covers when all displayed items are audiobooks. Localization entries add audiobook labels and empty-state titles.
For You dock filter and consumers
iosApp/iosApp/iOS/ForYouDock.swift
The dock exposes available filters and resolves a stored Audiobooks selection to All when audiobooks are disabled. The menu, accessibility labels, saved-list pages, recommendations, empty-state icon, and count captions use the resolved filter.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AppNavPreferences
  participant ForYouDockModel
  participant ForYouDockMenu
  participant SavedListPages
  participant RecommendationSections
  AppNavPreferences->>ForYouDockModel: audiobook availability
  ForYouDockModel->>ForYouDockMenu: available filters and active filter
  ForYouDockModel->>SavedListPages: active filter
  ForYouDockModel->>RecommendationSections: active filter
Loading

Possibly related issues

  • Silo-Server/silo-apple#1018: This issue asks for Movies, TV Shows, and All on Favorites and Watchlist. The PR changes the same controls and adds Audiobooks, but does not add the requested All option.
  • Silo-Server/silo-apple#324: This validation checklist covers Favorites and Watchlist behavior, including the switch also changed by this PR. The PR does not establish checklist acceptance.

Suggested reviewers: blurbery, rhainland

Merge Risk: Minimal · up to ad600

This adds an Audiobooks filter to Watchlist, Favorites and the For You dock, gated by the Show Audiobooks preference with fallback to Movies or All. No merge-blocking defect was found. A small optional performance cleanup was noted for the tvOS card grid.

Security architecture risk: Minimal · up to ad600

The inspected change adds client-side filtering of existing saved media. Disabled selections fall back without overwriting the saved choice. No introduced material risk to permissions, data ownership, or failure containment was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated expansion is presentation reachability for audiobook items already present in saved-list responses or caches. The inspected changes introduce no new identity selector, credential, endpoint, or privilege; backend enforcement is not independently established by this review.

Trust Boundaries and Controls

  • observed — Response type text is classified by the existing normalized type predicate. Newly displayed saved audiobooks use the existing content-ID detail and tvOS playback routing; the playback eligibility predicate already includes audiobooks.

Resilience and Maintainability Implications

  • inferred — For either preference value, the resolved selection belongs to the offered options. Repeated disable/enable cycles require no compensating writes, and asynchronous list completion cannot overwrite this derived selection. Existing load-generation checks continue to reject responses overtaken by a newer load.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: adding an Audiobooks filter to the Watchlist and Favorites screens. It is short, specific, and matches the changeset (PersonalMediaSection/PersonalMediaFilter, Favorit…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific and on-topic. It explains the Audiobooks option added to Watchlist and Favorites, the Show Audiobooks gating and fallback behavior, the empty-state and cover-shape changes,…
Full details: Title check

Explanation

The title names the main change: adding an Audiobooks filter to the Watchlist and Favorites screens. It is short, specific, and matches the changeset (PersonalMediaSection/PersonalMediaFilter, FavoritesView, WatchlistView, ForYouDock). The conventional-commit prefix 'feat(for-you)' is slightly off, since the Watchlist and Favorites screens are not all under the For You scope, but the title still describes the primary change accurately.

Full details: Description check

Explanation

The description is specific and on-topic. It explains the Audiobooks option added to Watchlist and Favorites, the Show Audiobooks gating and fallback behavior, the empty-state and cover-shape changes, the For You limitation, and the validation done on simulators. It matches the changeset, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added enhancement New feature or request needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish labels Nov 16, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 16, 2026

Copy link
Copy Markdown

The private evidence page should include captures for these visible changes that are not fully covered:

  • Saved-list filtering, audiobook empty states, and cover shapes (FavoritesView.swift, WatchlistView.swift): the description names iPhone and iPad captures, but not iPhone Duo folded or open captures. Add both Duo modes; the open display uses the wide-phone grid. Add Apple TV captures of Favorites filtering and audiobook covers in Favorites/Watchlist, and Mac captures of audiobook-only covers in Favorites/Watchlist. The code changes cover shape on Mac even though there is no type switch there; a compile alone does not show this UI change.
  • For You Audiobooks filtering (ForYouDock.swift): the description names iPhone dock-menu captures but not the Audiobooks-filtered recommendations page and its empty state. Include that page on iPhone and iPhone Duo open; the Duo open display is outside the cover-screen layout.

For changes that alter which saved items appear, include before-and-after views of the same screen with the same data.

Suggested fix: Add the missing device and screen captures to the evidence page so it covers each affected layout.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick comments: 1

iosApp/iosApp/Screens/Personal/FavoritesView.swift: 1

632-632: Trivial · Performance & Scalability · Quick win

Compute the cover aspect once per displayed list.

Each tvOS card recomputes filteredItems, allocates another filtered array, and scans that array for its aspect. With N favorites and M evaluated cards, filtering alone costs O(N*M).

Compute the aspect beside visibleItems in tvGridContent and pass it to favoriteCard. Apply the same approach to the other changed card builders, which repeat the aspect scan.

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7d287a20-86eb-4f49-b664-f7ee0c8b7540
Commits

Reviewing files that changed from the base of the PR and between 7bb8fe3 and ad6003f.

Files selected for processing: 6

  • .silo-translations
  • iosApp/Tests/PersonalMediaFilterTests.swift
  • iosApp/iosApp/Localizable.xcstrings
  • iosApp/iosApp/Screens/Personal/FavoritesView.swift
  • iosApp/iosApp/Screens/Personal/WatchlistView.swift
  • iosApp/iosApp/iOS/ForYouDock.swift

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Each card asked the whole list whether every title is an audiobook, and
tvOS Favorites also refiltered the list per card, so rendering grew with
the square of the list's length. Compute the shape once per grid and
pass it to each card.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104

Copy link
Copy Markdown
Contributor Author

Evidence updated (https://evidence.siloserver.org/r/silo-apple/pr-1202/):

  • iPhone Duo folded and open: Favorites under Audiobooks on both displays, including the wide-phone grid on the open display.
  • Apple TV: Favorites with the new Audiobooks pill and square covers.
  • Audiobooks-filtered For You page on iPhone: already on the page (03-ios-foryou-audiobooks). It keeps the existing "No recommendations yet" state.
  • Same page on the open Duo: doesn't exist there. The open Duo uses the shortcut layout, which has no type filter.
  • Before and after for the saved lists: with Show Audiobooks off (the default), the lists are unchanged. The before-and-after pair is the type menu with it off and on. Before this change, iPad and Duo had no option that showed saved audiobooks, so there was no "before" view of those titles to capture.
  • Mac: not captured. Its lists have no type switch, so the only change there is the cover shape rule shown on the other devices. There's no way to capture Mac screenshots remotely from the build host. SiloMac compiles.

🤖 Claude Code (claude-opus-5-5)

@Quick104
Quick104 merged commit e033759 into main Nov 16, 2026
5 checks passed
@Quick104
Quick104 deleted the feat/for-you-audiobook-support branch November 16, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish size/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant