Repository navigation
Refine tvOS settings, servers, authentication, and content interactions - #90
Conversation
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe changes update server identity persistence, active-server removal, tvOS focus and confirmation flows, episode watched/favorite actions, continue-watching dismissal, person filters, subtitle appearance state, and the project marketing version. ChangesServer lifecycle and identity
Episode actions and continue watching
tvOS focus and confirmation flows
Subtitle appearance settings
Project versioning
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: 🚥 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e104b6278
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (3)
iosApp/iosApp/Networking/ServerRegistry.swift (1)
114-125: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
addOrUpdateshould treat an emptyfetchedNamethe same asupdateFetchedNamedoes.
updateFetchedNameguards with!name.isEmptybefore overwriting, butaddOrUpdate's merge only checks== nil(Line 124). SincedisplayNameis now the sole source of truth for the visible server name (no moreuserOverrideNamefallback), a caller that passes an empty (but non-nil)fetchedName— e.g.ReceiverPairingCoordinator.persistServerforwarding a peer-suppliedserverName— would silently clobber a previously-good name with an empty string, causingdisplayNameto fall back to the raw URL.♻️ Proposed fix for consistent empty-name handling
- if merged.fetchedName == nil { merged.fetchedName = existing.fetchedName } + if merged.fetchedName == nil || merged.fetchedName?.isEmpty == true { + merged.fetchedName = existing.fetchedName + }🤖 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/Networking/ServerRegistry.swift` around lines 114 - 125, Update the merge logic in ServerRegistry.addOrUpdate so an incoming fetchedName is preserved only when it is non-nil and non-empty; otherwise retain the existing fetchedName, matching updateFetchedName behavior. Keep the existing merge behavior for valid incoming names and unrelated fields unchanged.iosApp/iosApp/Screens/People/PersonDetailView.swift (1)
39-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueLGTM! The filter availability logic, concurrent execution, and error handling are well-implemented. One optional readability suggestion below.
♻️ Optional: Destructure tuple for readability
In
refreshAvailableFilters,results.0andresults.1are not self-documenting. Named destructuring improves clarity:- let results = await (movies, series) - guard currentGeneration == generation else { return } - - var filters: [PersonMediaFilter] = [.all] - if results.0 != false { filters.append(.movies) } - if results.1 != false { filters.append(.series) } + let (hasMovies, hasSeries) = await (movies, series) + guard currentGeneration == generation else { return } + + var filters: [PersonMediaFilter] = [.all] + if hasMovies != false { filters.append(.movies) } + if hasSeries != false { filters.append(.series) }Also applies to: 106-108, 249-275, 455-455, 585-585, 672-679
🤖 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/People/PersonDetailView.swift` at line 39, Improve readability in refreshAvailableFilters and the other referenced tuple-result usages by destructuring returned tuples into clearly named values instead of accessing results.0 and results.1. Apply the same named-destructuring pattern consistently at the affected usages while preserving existing filter logic and behavior.iosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swift (1)
92-171: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoffLocal
playedOverride/favoriteOverridenever clear back to nil once set.
isPlayed/isFavoriteprefer the local@Stateoverride forever after a successful toggle (only failure reverts it, lines 142-144, 159-161). Because the card's identity is tied toepisode.contentId(.id(episode.contentId)in the rail), this state survives across theloadEpisodesreload that follows a successfulsetEpisodeWatchedcall. That's fine for the immediate action, but the override then permanently shadowsepisode.userData?.played/true favorite status for the rest of this screen's lifetime — if the underlying server truth changes through any other path while this screen stays mounted (e.g. watched-threshold auto-marking during playback, or a change from another device), the card will keep showing the stale manually-set value instead of picking up the fresh one fromepisode/favoriteStates.Consider resetting the override once the corresponding prop (
episode.userData?.played/favoriteStates[episode.contentId]) is observed to match it, e.g. via.onChange(of: episode.userData?.played), rather than letting the override persist indefinitely.🤖 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/tvOS/Screens/Detail/TVEpisodeRail.swift` around lines 92 - 171, The local overrides in TVEpisodeCard persist after the episode data refreshes, so isPlayed and isFavorite can remain stale. Add change observation for episode.userData?.played and the current favorite prop (initialIsFavorite), clearing playedOverride or favoriteOverride when the refreshed value matches the corresponding override; preserve the override until the server-backed value catches up and retain existing failure-revert behavior.
🤖 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/Navigation/AppRouter.swift`:
- Around line 236-261: Update signOutRemoveServerAndReset() to replace its
inline path reset and four-way authState branching with the existing
resetToServerSetup(), resetToLogin(), showProfileSelection(), and resetToHome()
helpers. Preserve the current branch order and conditions based on hasServer,
isLoggedIn, and hasProfile, and invoke the selected helper on the main actor
after removing the server.
In `@iosApp/iosApp/Screens/Detail/ItemDetailViewModel.swift`:
- Around line 385-398: Protect the newer value written by setEpisodeFavorite
from stale results applied by refreshEpisodeFavoriteStates. Track which episode
keys are updated after each refresh begins, then merge the refresh response
while preserving those newer local values; keep unrelated refreshed keys updated
normally.
- Line 18: Update refreshEpisodeFavoriteStates to fetch episode favorites with a
bounded level of concurrency instead of starting one request per episode
simultaneously. Track whether loadEpisodes was triggered by setEpisodeWatched,
and skip the favorites refresh for watched-state reloads; continue refreshing
when episode favorite state changes.
In `@iosApp/iosApp/Screens/Servers/ServerListView.swift`:
- Around line 258-268: Update the iOS alert’s “Remove” button handler to call
the existing remove(_:) helper with the selected ServerEntry, replacing its
duplicated wasActive check, registry.remove(serverId:), and refreshAuthState
logic while preserving the alert dismissal behavior.
In `@iosApp/iosApp/tvOS/Screens/Detail/TVItemDetailView.swift`:
- Line 347: Pass the episode action callbacks and favorite state data through
TVSeasonDetailView and TVSeriesDetailView into each TVEpisodeRail instance,
wiring onSetWatched, onSetFavorite, and favoriteStates consistently with
TVItemDetailView so long-press actions work in season and series rails.
In `@iosApp/iosApp/tvOS/Screens/Settings/TVSettingsComponents.swift`:
- Around line 283-313: Update TVSettingsInfoRow to restore a single
accessibility element for the title and value, applying the grouping to the row
container rather than either individual Text. Preserve the row’s read-only,
non-focusable behavior while ensuring VoiceOver reads the combined content as
one stop.
In `@iosApp/iosApp/tvOS/Screens/Settings/TVSubtitleSettingsView.swift`:
- Around line 97-104: Update the TVSubtitleSettingsView toggle for “Custom
Subtitle Appearance” to be disabled whenever subtitleMatchesSystemAppearance is
true, matching the iOS implementation. Preserve the existing
subtitleUsesDeviceAppearanceOverride state and setSubtitleDeviceOverrideEnabled
action for enabled cases.
---
Nitpick comments:
In `@iosApp/iosApp/Networking/ServerRegistry.swift`:
- Around line 114-125: Update the merge logic in ServerRegistry.addOrUpdate so
an incoming fetchedName is preserved only when it is non-nil and non-empty;
otherwise retain the existing fetchedName, matching updateFetchedName behavior.
Keep the existing merge behavior for valid incoming names and unrelated fields
unchanged.
In `@iosApp/iosApp/Screens/People/PersonDetailView.swift`:
- Line 39: Improve readability in refreshAvailableFilters and the other
referenced tuple-result usages by destructuring returned tuples into clearly
named values instead of accessing results.0 and results.1. Apply the same
named-destructuring pattern consistently at the affected usages while preserving
existing filter logic and behavior.
In `@iosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swift`:
- Around line 92-171: The local overrides in TVEpisodeCard persist after the
episode data refreshes, so isPlayed and isFavorite can remain stale. Add change
observation for episode.userData?.played and the current favorite prop
(initialIsFavorite), clearing playedOverride or favoriteOverride when the
refreshed value matches the corresponding override; preserve the override until
the server-backed value catches up and retain existing failure-revert behavior.
🪄 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: b01a58a6-cd4d-4a95-90a0-02c7566077b8
📒 Files selected for processing (28)
iosApp/Tests/PairingCoordinatorTests.swiftiosApp/iosApp/Components/MediaRow.swiftiosApp/iosApp/Navigation/AppRouter.swiftiosApp/iosApp/Networking/ServerRegistry.swiftiosApp/iosApp/Pairing/Receiver/ReceiverPairingCoordinator.swiftiosApp/iosApp/Screens/Auth/AuthService.swiftiosApp/iosApp/Screens/Auth/TVLoginView.swiftiosApp/iosApp/Screens/Detail/ItemDetailViewModel.swiftiosApp/iosApp/Screens/Home/HomeViewModel.swiftiosApp/iosApp/Screens/People/PersonDetailView.swiftiosApp/iosApp/Screens/Player/PlayerSettings.swiftiosApp/iosApp/Screens/Profiles/PINEntryView.swiftiosApp/iosApp/Screens/Profiles/ProfileSelectionView.swiftiosApp/iosApp/Screens/Servers/ServerListView.swiftiosApp/iosApp/Screens/Settings/SettingsViewModel.swiftiosApp/iosApp/tvOS/Aurora/AuroraInputField.swiftiosApp/iosApp/tvOS/Navigation/TVMainTabView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swiftiosApp/iosApp/tvOS/Screens/Detail/TVItemDetailView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVMovieDetailView.swiftiosApp/iosApp/tvOS/Screens/Libraries/TVLibraryCollectionsView.swiftiosApp/iosApp/tvOS/Screens/Settings/TVGeneralSettingsView.swiftiosApp/iosApp/tvOS/Screens/Settings/TVPlaybackSettingsView.swiftiosApp/iosApp/tvOS/Screens/Settings/TVSettingsComponents.swiftiosApp/iosApp/tvOS/Screens/Settings/TVSettingsView.swiftiosApp/iosApp/tvOS/Screens/Settings/TVSettingsViewModel.swiftiosApp/iosApp/tvOS/Screens/Settings/TVSubtitleSettingsView.swiftiosApp/project.yml
💤 Files with no reviewable changes (1)
- iosApp/iosApp/Screens/Auth/AuthService.swift
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1a7b0b4ed
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4418957f2f
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/tvOS/Screens/Detail/TVSeasonDetailView.swift`:
- Around line 301-304: Update the TVEpisodeRail invocation in TVSeasonDetailView
to pass the highlighted nextUpEpisode’s favorite state through
currentContentIsFavorite. Derive it from episodeFavoriteStates using
nextUpEpisode.contentId, preserving the existing default only when no matching
state exists so favorited episodes can remove their favorite.
In `@iosApp/iosApp/tvOS/Screens/Detail/TVSeriesDetailView.swift`:
- Around line 315-318: Update the highlighted next-up card configuration in
TVSeriesDetailView to pass the favorite status corresponding to
nextUpEpisode?.contentId through currentContentIsFavorite, using the existing
episodeFavoriteStates map so TVEpisodeRail does not default the highlighted
episode to false.
🪄 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: 86fa46dd-2091-4bc2-8ac8-095e641201b3
📒 Files selected for processing (10)
iosApp/iosApp/Navigation/AppRouter.swiftiosApp/iosApp/Networking/ServerRegistry.swiftiosApp/iosApp/Screens/Detail/ItemDetailViewModel.swiftiosApp/iosApp/Screens/Servers/ServerListView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swiftiosApp/iosApp/tvOS/Screens/Detail/TVItemDetailView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVSeasonDetailView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVSeriesDetailView.swiftiosApp/iosApp/tvOS/Screens/Settings/TVSettingsComponents.swiftiosApp/iosApp/tvOS/Screens/Settings/TVSubtitleSettingsView.swift
🚧 Files skipped from review as they are similar to previous changes (6)
- iosApp/iosApp/tvOS/Screens/Detail/TVItemDetailView.swift
- iosApp/iosApp/Navigation/AppRouter.swift
- iosApp/iosApp/tvOS/Screens/Detail/TVEpisodeRail.swift
- iosApp/iosApp/tvOS/Screens/Settings/TVSubtitleSettingsView.swift
- iosApp/iosApp/Screens/Servers/ServerListView.swift
- iosApp/iosApp/tvOS/Screens/Settings/TVSettingsComponents.swift
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ff5c3854d
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/ContentView.swift`:
- Around line 31-34: Update ContentView’s overlay-preference hydration to react
to ServerRegistry.activeServerId rather than only router.authState, ensuring
OverlayPrefsStore reloads or clears overlayPrefs whenever the active server
changes, including fallback to an already-authenticated server.
🪄 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: f5daa502-45b3-4dc5-8b72-cdc1cf8bc9a3
📒 Files selected for processing (4)
iosApp/iosApp/ContentView.swiftiosApp/iosApp/tvOS/Navigation/TVMainTabView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVSeasonDetailView.swiftiosApp/iosApp/tvOS/Screens/Detail/TVSeriesDetailView.swift
🚧 Files skipped from review as they are similar to previous changes (3)
- iosApp/iosApp/tvOS/Navigation/TVMainTabView.swift
- iosApp/iosApp/tvOS/Screens/Detail/TVSeriesDetailView.swift
- iosApp/iosApp/tvOS/Screens/Detail/TVSeasonDetailView.swift
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19e076d401
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36ddf82301
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
This PR collects the tvOS settings, authentication, server-management, and content-navigation fixes completed during simulator testing.
Settings navigation and presentation
Custom subtitle appearance
Server management and confirmation dialogs
Sign-out, sign-in, and profile entry
Library, person, and item-detail behavior
defaultFocusrather than directional interception.Continue Watching
Validation
git diff --check origin/main...HEADSiloTVbuilds, installs, and launches on Apple TV 4K (2nd generation), tvOS 26.5, including a clean final build after the server-switch review fix.