Skip to content

Refine tvOS playback selection and direct navigation - #83

Merged
Quick104 merged 7 commits into
mainfrom
tvos-ui-fixes-july-9-2026
Jul 10, 2026
Merged

Quick104 merged 7 commits into
mainfrom
tvos-ui-fixes-july-9-2026

Conversation

@zZebrahz

@zZebrahz zZebrahz commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR collects a set of focused tvOS UI and playback-flow fixes made during device testing:

  • improves entry focus in the in-player subtitle HUD
  • makes version, audio, and subtitle selectors clearer and preserves local overrides across navigation
  • restores native spatial focus between season and episode selectors
  • lets episode cards and the remote Play/Pause button start playback directly
  • adds direct Play/Pause shortcuts to focused playable cards throughout tvOS browsing
  • preserves subtitle rendering when returning from the pre-end Next Up screen

Playback selector presentation

  • The Version selector now explicitly shows Auto: when selection is automatic.
  • Replaces the resolution-specific 4k.tv icon with the generic tv icon so non-4K content is represented correctly.
  • Version summaries include available resolution, video codec, HDR, and audio codec information.
  • Audio summaries prioritize language and then show codec and channel layout.
  • Subtitle summaries prioritize language/title and include format plus Forced/SDH indicators where applicable.
  • Normalizes SubRip labels to the familiar SRT name.
  • Updates selector formatting tests for the richer summaries and auto-selection labels.
  • Moves tvOS pre-play Version/Audio/Subtitle choices onto the cached item-detail view model, keeping manual choices intact after playback or temporary navigation away from an item.

Focus and episode navigation

  • Pressing Down from the top-level Subtitles HUD tab now enters the leftmost Tracks column at Off instead of landing in the Options column.
  • Removes forced first/current-episode focus when moving down from the season selector. The tvOS focus engine can now choose the episode card spatially aligned with the selected season.
  • Episode rails still scroll the current episode into view, but do not override directional focus.
  • Selecting an episode card starts that episode immediately.
  • The hidden detail route is updated only after playback actually starts, avoiding a visible “Now Viewing” change before the player appears.
  • Exiting playback returns to the detail page for the episode that was played.
  • On an episode detail page, the Siri Remote Play/Pause button plays the current episode from anywhere, except when another episode card is focused; in that case it plays the focused episode.

Direct playback from browsing surfaces

Focused playable cards now handle the Siri Remote Play/Pause command independently from Select:

  • Select continues to open item details.
  • Play/Pause starts movies, episodes, and audiobooks immediately.
  • Series and other container types continue opening their detail pages because they are not direct playback targets.
  • This behavior is wired through Home rows, catalog/search grids, collections, Favorites, and Watchlist.

Subtitle continuity through Next Up

The pre-end Next Up UI swaps the full-screen player surface for a mini-player and then mounts a new full-screen surface when Keep Watching is selected.

Device launch logs showed that playback and the selected subtitle track remained active, but the outgoing mini-player could remain the last writer to a single weak subtitle-overlay reference. Once that surface deallocated, the subtitle pump had no overlay and stopped rendering.

This PR replaces that single weak reference with a small weak attachment registry:

  • every live player surface registers its subtitle overlay
  • dismantled surfaces unregister explicitly
  • when overlapping transition surfaces disappear, the backend falls back to the newest remaining live overlay
  • the same lifecycle is used by both AVPlayer and CoreMedia routes

This fixes the ownership problem directly without restarting the video session or changing the selected subtitle track.

Validation

  • git diff --check
  • Compile-only generic tvOS build:
    xcodebuild build -project Silo.xcodeproj -scheme SiloTV -destination 'generic/platform=tvOS' -derivedDataPath /tmp/silo-apple-subtitle-fix CODE_SIGNING_ALLOWED=NO
  • Build succeeded. Runtime behavior remains ready for final Apple TV validation.

Summary by CodeRabbit

  • New Features

    • Added Play/Pause remote shortcuts for focused playable media and episodes on tvOS.
    • Playback can now return to the relevant detail page after starting.
    • Preserved version, audio, and subtitle selections while navigating.
    • Improved episode focus tracking and playback behavior.
  • Improvements

    • Updated audio, subtitle, and version labels with clearer, consistent formatting.
    • Enhanced subtitle selector focus behavior on tvOS.
    • Improved subtitle overlay handling during player transitions and view updates.
  • Bug Fixes

    • Corrected Auto subtitle and audio previews, including “Auto: Off” states and track details.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 9 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: a56ab5c0-4f6b-4cad-870a-65ee748a1495

📥 Commits

Reviewing files that changed from the base of the PR and between 084d441 and f0250f6.

📒 Files selected for processing (7)
  • iosApp/Tests/DetailVersionSelectionTests.swift
  • iosApp/iosApp/Screens/Detail/DetailPlaybackFormatting.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerSurface.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/PlayerSurface.swift
  • iosApp/iosApp/macOS/AVPlayerSurface.swift
  • iosApp/iosApp/macOS/PlayerSurface.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVItemDetailView.swift
📝 Walkthrough

Walkthrough

The PR revises playback label formatting, adds tvOS focused-card direct playback and selector persistence, routes episode playback destinations, improves subtitle focus handling, and replaces single subtitle overlay references with owned attachment registries.

Changes

Playback label formatting

Layer / File(s) Summary
Version, audio, and subtitle label construction
iosApp/iosApp/Screens/Detail/DetailPlaybackFormatting.swift
Version, audio, and subtitle labels now use middle-dot summaries, Auto: prefixes, normalized SRT naming, and accessibility markers.
Formatting expectations and coverage
iosApp/Tests/DetailVersionSelectionTests.swift
Tests cover the revised version, audio, subtitle, external subtitle, and Auto label outputs.

tvOS direct playback and navigation

Layer / File(s) Summary
Focused-card direct playback
iosApp/iosApp/Components/*, iosApp/iosApp/Screens/{Browse,Collections,Home,Personal}/..., iosApp/iosApp/tvOS/Screens/Components/*, iosApp/iosApp/Navigation/AppRouter.swift, iosApp/iosApp/Networking/Models.swift
Focused tvOS cards invoke optional Play/Pause callbacks for directly playable media and present the player with item metadata.
Selection persistence and episode playback
iosApp/iosApp/Screens/Detail/ItemDetailViewModel.swift, iosApp/iosApp/tvOS/Screens/Detail/*, iosApp/iosApp/Screens/Player/PlayerView.swift, iosApp/iosApp/tvOS/Navigation/TVMainTabView.swift
Preferred playback selections persist through detail reloads, episode playback includes resume and return destinations, and playback-start routing returns to detail.
Subtitle and episode focus routing
iosApp/iosApp/Screens/Player/tvOS/TVPlayerInfoHUD.swift, iosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swift
Subtitle entry focus targets the Tracks column, and episode rail focus is exposed to detail views for Play/Pause handling.

Subtitle overlay lifecycle

Layer / File(s) Summary
Owned subtitle overlay attachments
iosApp/iosApp/Screens/Player/{AVPlayerRoute,CoreMedia}/..., iosApp/iosApp/Screens/Player/Subtitles/SubtitleOverlayView.swift
Subtitle overlays are attached and detached by owner through a synchronized weak registry during player-surface lifecycle events.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately captures the main tvOS playback-selection and navigation changes.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tvos-ui-fixes-july-9-2026

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.

@zZebrahz
zZebrahz marked this pull request as ready for review July 10, 2026 05:14

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 084d441d0c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +437 to +438
var subtitleOverlay: SubtitleOverlayView? {
subtitleOverlayAttachments.currentOverlay

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Migrate macOS surfaces before removing overlay setters

When building the SiloMac target, the macOS surfaces still assign to the old mutable overlay property (iosApp/iosApp/macOS/AVPlayerSurface.swift:12,19 and iosApp/iosApp/macOS/PlayerSurface.swift:51), but this change makes subtitleOverlay get-only here and applies the same pattern to PlayerCore. That leaves both macOS player surfaces uncompilable; update the NSViewRepresentable surfaces to use the new attach/detach API or keep a compatible setter.

Useful? React with 👍 / 👎.

Comment on lines +440 to +444
router.presentPlayer(
contentId: id,
startFromBeginning: false,
resumePosition: resumePosition,
returnToContentId: id == detail.contentId ? nil : id

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve selector choices for the current rail episode

When this handler is invoked for the rail card that represents the current episode, it starts playback via presentPlayer without fileId, preferredAudioTrackIndex, or preferredSubtitleTrackIndex, so a user who changed Version/Audio/Subtitles on the detail page gets the default file/tracks by pressing Select on the highlighted current episode card. The main Play path and the new Play/Pause shortcut preserve those choices via playbackFileId(for:); this current-episode branch should do the same or remain a no-op.

Useful? React with 👍 / 👎.

@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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
iosApp/iosApp/Screens/Player/CoreMedia/PlayerSurface.swift (1)

88-97: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Detach from the previous player before re-attaching.

When attach(player:) is called with a different PlayerCore (player swap via updateUIView), the old player's registry retains a stale entry for this view. Both owner and overlay weak references remain alive (the view and its overlay are still allocated), so pruneReleasedEntries won't clean them up. The old player's subtitleOverlay computed property can then return this view's overlay even though its renderer has been repointed to the new player — risking subtitle rendering through the wrong renderer session.

During Next Up transitions where the outgoing player stays alive (mini-player), this stale entry is actively reachable.

🔧 Proposed fix: detach before player swap
 func attach(player: PlayerCore) {
     if attachedPlayer === player { return }
+    attachedPlayer?.detachSubtitleOverlay(owner: self)
     attachedPlayer = player
     player.attach(to: displayLayer)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@iosApp/iosApp/Screens/Player/CoreMedia/PlayerSurface.swift` around lines 88 -
97, Update attach(player:) to detach the existing attachedPlayer before
assigning a different player, while preserving the early return when it is the
same instance. Invoke the existing player detachment/overlay cleanup API so the
old player's registry removes this view, then attach the new player and rewire
subtitleOverlay.renderer and attachSubtitleOverlay as currently done.
🧹 Nitpick comments (4)
iosApp/iosApp/Screens/Personal/FavoritesView.swift (1)

83-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract shared playAction(for:) to eliminate duplication across browse views.

The identical playAction(for: BrowseItem) implementation appears in FavoritesView, WatchlistView, CatalogGrid, CollectionDetailView, and TVCatalogGrid. A shared helper (e.g., a free function or View extension taking BrowseItem and AppRouter) would centralize the isDirectlyPlayable guard and presentPlayer call, ensuring future changes propagate to all entry points.

♻️ Proposed shared helper
// e.g., in a shared file like PlaybackActions.swift or as an extension on View

`@MainActor`
func browseItemPlayAction(for item: BrowseItem, router: AppRouter) -> (() -> Void)? {
    `#if` os(tvOS)
    guard SiloMediaType.isDirectlyPlayable(item.type) else { return nil }
    return {
        router.presentPlayer(
            contentId: item.contentId,
            posterURL: item.posterUrl,
            backdropURL: item.backdropUrl
        )
    }
    `#else`
    return nil
    `#endif`
}

Then each call site becomes:

-                        playAction: playAction(for: item),
+                        playAction: browseItemPlayAction(for: item, router: router),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@iosApp/iosApp/Screens/Personal/FavoritesView.swift` around lines 83 - 97,
Extract the duplicated playAction(for:) logic from FavoritesView, WatchlistView,
CatalogGrid, CollectionDetailView, and TVCatalogGrid into one shared `@MainActor`
helper accepting BrowseItem and AppRouter. Preserve the tvOS isDirectlyPlayable
guard, presentPlayer arguments, and non-tvOS nil behavior, then update each view
to call the shared helper.
iosApp/iosApp/Components/EpisodeThumbCard.swift (1)

344-352: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate helper — same body as TVMediaCard.applyTVCardPlayPauseAction.

This applyEpisodePlayPauseAction is structurally identical to the private applyTVCardPlayPauseAction in TVMediaCard.swift (per the upstream-contract snippet). Consider consolidating into one shared View extension (e.g. applyPlayPauseCommand(_:)) used by both card types so future tweaks to this pattern don't need to be applied twice.

♻️ Suggested consolidation
-private extension View {
-    `@ViewBuilder`
-    func applyEpisodePlayPauseAction(_ action: (() -> Void)?) -> some View {
-        if let action {
-            self.onPlayPauseCommand(perform: action)
-        } else {
-            self
-        }
-    }
+// Shared, e.g. in a common file:
+extension View {
+    `@ViewBuilder`
+    func applyPlayPauseCommand(_ action: (() -> Void)?) -> some View {
+        if let action {
+            self.onPlayPauseCommand(perform: action)
+        } else {
+            self
+        }
+    }
+}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@iosApp/iosApp/Components/EpisodeThumbCard.swift` around lines 344 - 352,
Remove the duplicated applyEpisodePlayPauseAction helper and consolidate the
shared optional play/pause action behavior into a single View extension, such as
applyPlayPauseCommand(_:). Update both the episode card and TVMediaCard call
sites, including applyTVCardPlayPauseAction, to use the shared helper and
preserve the existing nil behavior.
iosApp/iosApp/Screens/Browse/CatalogGrid.swift (1)

62-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated playAction(for:) across multiple browse/collection views.

This exact #if os(tvOS) + isDirectlyPlayable + presentPlayer(...) block is repeated verbatim in CollectionDetailView.swift in this PR, and (per cross-file evidence) in FavoritesView.swift, WatchlistView.swift, and TVCatalogGrid.swift. Consider hoisting this into a single helper (e.g. an AppRouter extension or a free function taking router + item) so the direct-play gating logic has one source of truth.

♻️ Suggested consolidation
extension AppRouter {
    `#if` os(tvOS)
    func directPlayAction(for item: BrowseItem) -> (() -> Void)? {
        guard SiloMediaType.isDirectlyPlayable(item.type) else { return nil }
        return { [weak self] in
            self?.presentPlayer(
                contentId: item.contentId,
                posterURL: item.posterUrl,
                backdropURL: item.backdropUrl
            )
        }
    }
    `#endif`
}

Callers then become router.directPlayAction(for: item) (returns nil automatically on non-tvOS since the method itself is #if os(tvOS)-gated — non-tvOS call sites would need their own nil fallback or a non-tvOS stub).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@iosApp/iosApp/Screens/Browse/CatalogGrid.swift` around lines 62 - 76,
Consolidate the duplicated tvOS direct-play logic from playAction(for:) and the
corresponding browse/collection views into one shared helper, preferably an
AppRouter method named directPlayAction(for:). Preserve the isDirectlyPlayable
guard, player arguments, weak router capture, and non-tvOS nil behavior, then
update all affected callers to use the shared helper.
iosApp/iosApp/Screens/Personal/WatchlistView.swift (1)

83-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract duplicated playAction(for:) into a shared helper.

The same playAction(for:) method is copy-pasted across at least 7 files (WatchlistView, FavoritesView, CatalogGrid, CollectionDetailView, MediaCard, TVCatalogGrid, TVMediaCard), all producing an identical router.presentPlayer(contentId:posterURL:backdropURL:) closure gated by SiloMediaType.isDirectlyPlayable. Extracting this to an AppRouter extension would give a single source of truth for the direct-play contract.

♻️ Proposed extraction
// In a shared file, e.g. AppRouter+DirectPlay.swift
extension AppRouter {
    func directPlayAction(for item: BrowseItem) -> (() -> Void)? {
        `#if` os(tvOS)
        guard SiloMediaType.isDirectlyPlayable(item.type) else { return nil }
        return {
            presentPlayer(
                contentId: item.contentId,
                posterURL: item.posterUrl,
                backdropURL: item.backdropUrl
            )
        }
        `#else`
        return nil
        `#endif`
    }
}

Each call site then becomes:

- playAction: playAction(for: item),
+ playAction: router.directPlayAction(for: item),

and the per-file playAction(for:) methods can be deleted.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@iosApp/iosApp/Screens/Personal/WatchlistView.swift` around lines 83 - 97,
Extract the duplicated playAction(for:) logic into a shared AppRouter extension
method named directPlayAction(for:), preserving the tvOS availability guard and
presentPlayer closure behavior. Update WatchlistView and the other listed call
sites to invoke router.directPlayAction(for:), then remove their local
playAction(for:) implementations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@iosApp/iosApp/Screens/Detail/DetailPlaybackFormatting.swift`:
- Around line 482-483: Unify forced-track detection between subtitleDetail and
subtitlePillSummary. Replace the direct track.forced == true check in
subtitleDetail with the shared isForced(track) logic, or otherwise route both
subtitleDetail and subtitlePillSummary through the same helper so title-based
forced detection is handled consistently.
- Around line 641-647: Update containsAccessibilityMarker to also detect the
phrase “hearing impaired,” matching the substring behavior of
SubtitleAutoResolver.titleIndicatesHearingImpaired while preserving the existing
SDH, CC, and HI checks, so subtitlePillSummary does not append a redundant
“(SDH)”.

In `@iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerSurface.swift`:
- Around line 30-35: Update AVPlayerLayerView.attach(backend:) to detach the
subtitle overlay from the currently stored backend before replacing it with the
new backend, then register it with the new backend as needed. Keep
updateUIView’s attachment flow unchanged and ensure repeated backend swaps do
not leave the overlay in the old backend’s registry.

---

Outside diff comments:
In `@iosApp/iosApp/Screens/Player/CoreMedia/PlayerSurface.swift`:
- Around line 88-97: Update attach(player:) to detach the existing
attachedPlayer before assigning a different player, while preserving the early
return when it is the same instance. Invoke the existing player
detachment/overlay cleanup API so the old player's registry removes this view,
then attach the new player and rewire subtitleOverlay.renderer and
attachSubtitleOverlay as currently done.

---

Nitpick comments:
In `@iosApp/iosApp/Components/EpisodeThumbCard.swift`:
- Around line 344-352: Remove the duplicated applyEpisodePlayPauseAction helper
and consolidate the shared optional play/pause action behavior into a single
View extension, such as applyPlayPauseCommand(_:). Update both the episode card
and TVMediaCard call sites, including applyTVCardPlayPauseAction, to use the
shared helper and preserve the existing nil behavior.

In `@iosApp/iosApp/Screens/Browse/CatalogGrid.swift`:
- Around line 62-76: Consolidate the duplicated tvOS direct-play logic from
playAction(for:) and the corresponding browse/collection views into one shared
helper, preferably an AppRouter method named directPlayAction(for:). Preserve
the isDirectlyPlayable guard, player arguments, weak router capture, and
non-tvOS nil behavior, then update all affected callers to use the shared
helper.

In `@iosApp/iosApp/Screens/Personal/FavoritesView.swift`:
- Around line 83-97: Extract the duplicated playAction(for:) logic from
FavoritesView, WatchlistView, CatalogGrid, CollectionDetailView, and
TVCatalogGrid into one shared `@MainActor` helper accepting BrowseItem and
AppRouter. Preserve the tvOS isDirectlyPlayable guard, presentPlayer arguments,
and non-tvOS nil behavior, then update each view to call the shared helper.

In `@iosApp/iosApp/Screens/Personal/WatchlistView.swift`:
- Around line 83-97: Extract the duplicated playAction(for:) logic into a shared
AppRouter extension method named directPlayAction(for:), preserving the tvOS
availability guard and presentPlayer closure behavior. Update WatchlistView and
the other listed call sites to invoke router.directPlayAction(for:), then remove
their local playAction(for:) implementations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f1744c7-b548-47a7-95ec-75743edb508e

📥 Commits

Reviewing files that changed from the base of the PR and between 79ea7af and 084d441.

📒 Files selected for processing (29)
  • iosApp/Tests/DetailVersionSelectionTests.swift
  • iosApp/iosApp/Components/EpisodeThumbCard.swift
  • iosApp/iosApp/Components/MediaCard.swift
  • iosApp/iosApp/Components/MediaRow.swift
  • iosApp/iosApp/Navigation/AppRouter.swift
  • iosApp/iosApp/Networking/Models.swift
  • iosApp/iosApp/Screens/Browse/CatalogGrid.swift
  • iosApp/iosApp/Screens/Collections/CollectionDetailView.swift
  • iosApp/iosApp/Screens/Detail/DetailPlaybackFormatting.swift
  • iosApp/iosApp/Screens/Detail/ItemDetailViewModel.swift
  • iosApp/iosApp/Screens/Home/SectionRow.swift
  • iosApp/iosApp/Screens/Personal/FavoritesView.swift
  • iosApp/iosApp/Screens/Personal/WatchlistView.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerBackend.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerSurface.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/PlayerCore.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/PlayerSurface.swift
  • iosApp/iosApp/Screens/Player/PlayerView.swift
  • iosApp/iosApp/Screens/Player/Subtitles/SubtitleOverlayView.swift
  • iosApp/iosApp/Screens/Player/tvOS/TVPlayerInfoHUD.swift
  • iosApp/iosApp/tvOS/Navigation/TVMainTabView.swift
  • iosApp/iosApp/tvOS/Screens/Components/TVCatalogGrid.swift
  • iosApp/iosApp/tvOS/Screens/Components/TVMediaCard.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVItemDetailView.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVMovieDetailView.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVPlaybackSelectorRow.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVSeasonDetailView.swift
  • iosApp/iosApp/tvOS/Screens/Detail/TVSeriesDetailView.swift

- Introduced a new test to ensure subtitle labels do not duplicate title-based markers.
- Updated subtitle formatting logic to prevent redundancy in displayed titles.
- Enhanced subtitle overlay management in AVPlayer and PlayerSurface classes for better resource handling.
- Improved tvOS detail view to manage playback state more effectively for current episodes.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6ffe06624

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// types such as series and seasons still open their detail screen.
static func isDirectlyPlayable(_ type: String) -> Bool {
isMovieLibrary(type)
|| isAudiobook(type)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route audiobook shortcuts through the audio player

When the focused item is an audiobook, this now returns true, so the new tvOS Play/Pause handlers in the browsing/home surfaces call router.presentPlayer(...) and open the video PlayerView. Audiobook playback elsewhere is explicitly routed through AudioPlaybackStore (for example the audiobook detail and play deep-link paths), and PlayerView has no audiobook-specific path, so pressing Play/Pause on an audiobook card opens the wrong player instead of starting audio. Route audiobook items to the audio store or keep them out of this video-player shortcut.

Useful? React with 👍 / 👎.

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.

2 participants