Skip to content

Reskin Apple onboarding with Aurora - #9

Merged
Quick104 merged 16 commits into
mainfrom
feature/ios-aurora-onboarding
Jun 17, 2026
Merged

Quick104 merged 16 commits into
mainfrom
feature/ios-aurora-onboarding

Conversation

@Quick104

@Quick104 Quick104 commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Promotes the Aurora visual system into shared cross-platform SwiftUI code and adds iOS/macOS Aurora form components.
  • Reskins iOS first-run server setup, login, signup, and profile selection screens onto the Aurora backdrop.
  • Replaces the in-app create-admin route with a browser-based setup handoff screen.
  • Hides protocol and port behind Advanced options on iOS and tvOS server setup.
  • Adds the Aurora onboarding design spec and implementation plan docs.

Testing

  • cd iosApp && xcodegen generate
  • cd iosApp && xcodebuild build -project Silo.xcodeproj -scheme Silo -destination 'platform=iOS Simulator,name=iPhone 17 Pro' CODE_SIGNING_ALLOWED=NO
  • cd iosApp && xcodebuild build -project Silo.xcodeproj -scheme SiloTV -destination 'platform=tvOS Simulator,name=Apple TV' CODE_SIGNING_ALLOWED=NO
  • cd iosApp && xcodebuild build -project Silo.xcodeproj -scheme SiloMac -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO

Summary by CodeRabbit

  • New Features
    • Added an iOS “Server needs setup” first-run state with browser instructions, URL copying, and retry.
    • Added tvOS “Advanced options” to server setup, exposing protocol/port behind a toggle.
  • Design
    • Reskinned iOS/macOS sign-in, sign-up, server setup, and profile selection to the Aurora design system with improved focus and error presentation.
    • Replaced the old iOS “Create-Admin” setup screen with the new server-setup experience.
  • Bug Fixes
    • Improved playback recovery for certain VideoToolbox bad-data failures (H.264/HEVC).
  • Tests / Documentation
    • Added onboarding design/spec documentation and expanded standalone test coverage for recovery and local streaming policies.

Quick104 and others added 12 commits June 15, 2026 17:18
Brings the shipped tvOS Aurora language to the iOS server-setup,
sign-in (password-first), profile, and sign-up screens. Adapts the
16:9 two-column TV layouts to portrait/touch, promotes the Aurora
design system to shared code, hides protocol/port behind an Advanced
disclosure (also on tvOS), and replaces the in-app Create-Admin page
with a "finish setup in your browser" state.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
9 tasks: promote Aurora to shared cross-platform code, add an iOS Aurora
form kit, reskin Server/Sign-in/Profile/Sign-up, add the tvOS Advanced
disclosure, and replace Create-Admin with a "finish setup in your browser"
screen. Each task builds iOS/tvOS/macOS; verified by simulator, not XCTest
(per CLAUDE.md UI-test guidance).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
- Scale ghost buttons appropriately off tvOS
- Make setup URL copy affordance available across platforms
@coderabbitai

coderabbitai Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fe80beed-19f5-4c46-ac2a-94df1e319ff1

📥 Commits

Reviewing files that changed from the base of the PR and between d12f20c and b5aa178.

📒 Files selected for processing (15)
  • docs/superpowers/plans/2026-06-15-ios-aurora-onboarding.md
  • docs/superpowers/specs/2026-06-15-ios-aurora-onboarding-design.md
  • docs/superpowers/specs/2026-06-15-tvos-detail-redesign-design.md
  • docs/tvos-detail-mockups/audiobook.html
  • docs/tvos-detail-mockups/buttons.html
  • docs/tvos-detail-mockups/directions.html
  • docs/tvos-detail-mockups/playback-selection.html
  • docs/tvos-detail-mockups/refined-page.html
  • iosApp/Tests/DecodeFailureRecoveryPolicyTests.swift
  • iosApp/iosApp/DesignSystem/Aurora/AuroraTextField.swift
  • iosApp/iosApp/Screens/Auth/LoginView.swift
  • iosApp/iosApp/Screens/Auth/ServerNeedsSetupView.swift
  • iosApp/iosApp/Screens/Auth/SignupView.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentStore.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/PlayerCore.swift

📝 Walkthrough

Walkthrough

Reskins the iOS first-run/auth flow to the Aurora design language by promoting AuroraBackdrop and AuroraStyle to cross-platform code, adding platform-split input components (AuroraInputField for tvOS, AuroraTextField for iOS/macOS), rewriting all iOS auth screens with Aurora components, replacing the Create-Admin SetupView/SetupViewModel with a new ServerNeedsSetupView browser-handoff recovery flow, and updating routing throughout. Independently introduces a tvOS detail page redesign spec ("Squared Skyline") with squared controls, pre-Play playback selection, audiobook cover-forward layout, and revised focus model, plus five supporting HTML mockups for design exploration. Additionally implements playback-position-based segment retirement, segment-store spill-capacity backpressure, and in-place H.264/HEVC decode-burst recovery with attempt budgeting and stability tracking.

Changes

iOS Aurora Onboarding Reskin

Layer / File(s) Summary
Design spec and implementation plan
docs/superpowers/specs/2026-06-15-ios-aurora-onboarding-design.md, docs/superpowers/plans/2026-06-15-ios-aurora-onboarding.md
Adds the iOS Aurora onboarding design specification (scope, goals, out-of-scope constraints, screen requirements, routing changes, acceptance criteria) and a detailed nine-task implementation plan with verification steps covering all changes.
Aurora design system promotion and platform-split input components
iosApp/iosApp/DesignSystem/Aurora/AuroraBackdrop.swift, iosApp/iosApp/DesignSystem/Aurora/AuroraStyle.swift, iosApp/iosApp/tvOS/Aurora/AuroraInputField.swift, iosApp/iosApp/DesignSystem/Aurora/AuroraTextField.swift
Removes tvOS-only compilation guards from AuroraBackdrop and AuroraStyle to enable cross-platform use; makes AuroraControl.height and ghost-button sizing platform-conditional (tvOS vs iOS/macOS); extracts AuroraInputField as tvOS-only controlled text input; adds iOS/macOS-only AuroraTextField with field enums, label/error views, secure-entry toggle, and focus-driven styling; adds AuroraScreen scaffold with keyboard-dismissable scrollable layout.
ServerSetupView and TVServerSetupView Aurora reskin with advanced options
iosApp/iosApp/Screens/Auth/ServerSetupView.swift, iosApp/iosApp/Screens/Auth/TVServerSetupView.swift
Rewrites iOS/macOS ServerSetupView from Continuum UI to AuroraScreen layout with AuroraTextField host input, loading-aware connect() helper, and animated advanced-options disclosure (replacing DisclosureGroup with segmented protocol buttons and AuroraTextField port field); gates entire view under #if !os(tvOS). Updates TVServerSetupView with .advanced focus case and animated "Advanced options" toggle controlling protocol/port field visibility via viewModel.showsAdvancedOptions.
LoginView and SignupView Aurora reskin
iosApp/iosApp/Screens/Auth/LoginView.swift, iosApp/iosApp/Screens/Auth/SignupView.swift
Rewrites both views (non-tvOS only) to use AuroraScreen/AuroraTextField with @FocusState-driven focus management, loading-guard helpers (signIn() and createAccount()), AuroraErrorLabel, and loading-aware button labels; removes legacy Continuum UI helpers, password-reveal state toggle, and field-mapping enums.
ServerNeedsSetupView, routing changes, and SetupView/ViewModel deletion
iosApp/iosApp/Screens/Auth/ServerNeedsSetupView.swift, iosApp/iosApp/Navigation/Route.swift, iosApp/iosApp/Screens/Auth/ServerSetupViewModel.swift, iosApp/iosApp/ContentView.swift, iosApp/iosApp/Screens/Auth/SetupView.swift, iosApp/iosApp/Screens/Auth/SetupViewModel.swift
Adds ServerNeedsSetupView with browser-setup instructions, iOS copy affordance, async retry probe, and back navigation; replaces Route.setup with Route.serverNeedsSetup; updates ServerSetupViewModel.connect to unconditionally set authState = .needsLogin and navigate to .serverNeedsSetup when setup is required; wires both destinationView(for:) and profileFlowDestination(for:) routes in ContentView; completely removes SetupView and SetupViewModel.
ProfileSelectionView Aurora background and title styling
iosApp/iosApp/Screens/Profiles/ProfileSelectionView.swift
Replaces non-tvOS ProfileSelectionView background (black ZStack with radial gradient) with AuroraBackdrop(variant: .profile, scrim: .soft); switches titleBlock foreground colors from white/opacity to Color.auroraInk and Color.auroraInkSecondary.

tvOS Detail Page Redesign (Squared Skyline)

Layer / File(s) Summary
tvOS detail redesign specification
docs/superpowers/specs/2026-06-15-tvos-detail-redesign-design.md
Adds the "Squared Skyline" tvOS detail page redesign spec covering squared 8pt control geometry, pre-Play playback selection row with per-profile sticky behavior, audiobook cover-forward hero layout, revised focus/scroll model (removing ReadableFocusSection), season chip behavior, motion/Reduce Motion timing, data coordination notes, and acceptance criteria.
HTML mockups for detail page exploration
docs/tvos-detail-mockups/directions.html, docs/tvos-detail-mockups/buttons.html, docs/tvos-detail-mockups/playback-selection.html, docs/tvos-detail-mockups/audiobook.html, docs/tvos-detail-mockups/refined-page.html
Adds five static HTML mockups with embedded CSS and interactive selection: directions.html explores three layout directions (cinematic scroll, tabbed shelf, companion panel); buttons.html shows four button treatment variants; playback-selection.html presents three playback selector placements; audiobook.html demonstrates cover-forward audiobook layout; refined-page.html displays finalized movie/series page designs with squared controls and playback selector integration.
TVFocusMarquee episode-aware backdrop and TVSkylineSectionFeed integration
iosApp/iosApp/tvOS/Components/TVFocusMarquee.swift, iosApp/iosApp/tvOS/Components/TVSkylineSectionFeed.swift
Updates TVMarqueeContent with isEpisode flag and TVMarqueeEnrichment with backdropUrl/backdropThumbhash fields; adds computed backdropURL and backdropThumbhash properties in TVFocusMarqueeModel to swap episodes to enriched series backdrop when available and re-sample tint on enrichment updates; updates TVSkylineSectionFeed to feed TVRootHeroBackdrop from marqueeModel's dedicated properties.

Playback Segment Retirement and Decode Failure Recovery

Layer / File(s) Summary
Segment store retirement and HLS playlist/request logging policies
iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentStore.swift, iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentWriter.swift, iosApp/iosApp/Screens/Player/AVPlayerRoute/LocalHLSPlaylistPolicy.swift, iosApp/iosApp/Screens/Player/AVPlayerRoute/LocalHLSRequestLogPolicy.swift
Adds DVSegmentStore.minimumSegmentsToKeep constant and retireSegments(names:) public method to remove segments and cleanup spill files; introduces LocalHLSPlaylistPolicy.shouldEmitStartTag(firstMediaSequence:) to conditionally emit start tag and shouldRemoveRetiredSegmentsFromPlaylist flag; introduces LocalHLSRequestLogPolicy.shouldLog(...) to centralize request log eligibility, bypassing startup cap for HTTP errors while suppressing duplicate signatures.
DVSegmentWriter playback-based retirement and spill-capacity backpressure
iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentWriter.swift
Reworks DVSegmentWriter from time-window eviction to playback-position-based retirement via retireSegmentsBehindPlaybackIfNeeded() helper and safety-window constants; adds waitForSegmentStoreCapacityIfNeeded() to pause appends under spill pressure; SegmentEntry now tracks start time and duration with computed end; logs backpressure periodically and uses LocalHLSPlaylistPolicy when emitting playlist tags.
DecodeFailureRecoveryPolicy and PlayerCore decode-burst recovery
iosApp/iosApp/Screens/Player/CoreMedia/DecodeFailureRecoveryPolicy.swift, iosApp/iosApp/Screens/Player/CoreMedia/PlayerCore.swift, iosApp/iosApp/Screens/Player/CoreMedia/PlayerCoreTypes.swift
Introduces DecodeFailureRecoveryPolicy with shouldAttemptBurstResync(...) to bound H.264/HEVC "-12909" recovery attempts. Extends PlayerCore with per-session attempt budgeting, stability-frame tracking, performDecodeBurstResync() workflow that flushes decoder without recreation, guards against cascading failures, and consults policy before bounded recovery or terminal rejection. Adds PlayerCore.StreamRejection.videoToolboxBadDataHEVC case for HEVC-specific rejection routing.
PlaybackRecoveryPlanner and PlayerViewModel HEVC loopback integration
iosApp/iosApp/Screens/Player/ApplePlaybackRoutePlanner.swift, iosApp/iosApp/Screens/Player/PlaybackRecoveryPlanner.swift, iosApp/iosApp/Screens/Player/PlayerViewModel.swift
Adds ApplePlaybackRoutePlanner.hevcLoopbackVideoRange(for:) static helper; extends PlaybackRecoveryPlanner.Context with optional hevcLoopbackVideoRange field and refactors fallback HEVC branches through hevcLoopbackPlan(...) helper (varying videoRange per rejection reason); updates PlayerViewModel.handleUnsupportedStream to compute and pass HEVC loopback range; extends humanReadablePlayerCoreRejection to recognize HEVC bad-data rejection.
Test executables for segment store and decode recovery policies
iosApp/Tests/DVSegmentStoreTests.swift, iosApp/Tests/DecodeFailureRecoveryPolicyTests.swift, iosApp/Tests/LocalHLSPlaylistPolicyTests.swift, iosApp/Tests/LocalHLSRequestLogPolicyTests.swift
Adds @main test executables verifying spill-budget reclamation on segment retirement and backpressure in canAppendSegment(); H.264 bad-data recovery before terminal rejection and budget exhaustion; start-tag emission rules and disabled retired-segment removal; request log cap bypass for HTTP errors and duplicate-signature suppression.
AVPlayerBackend comment clarification
iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerBackend.swift
Updates inline comment in localDVLoopback path to clarify that paused playlist polling visibility is affected by disk/spill pressure pausing segment appends, reflecting new writer backpressure behavior.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ServerSetupView
    participant ServerSetupViewModel
    participant AuthService
    participant AppRouter

    User->>ServerSetupView: enter host, tap Connect
    ServerSetupView->>ServerSetupViewModel: connect(router:)
    ServerSetupViewModel->>AuthService: checkServer(candidate)
    AuthService-->>ServerSetupViewModel: status
    ServerSetupViewModel->>AppRouter: authState = .needsLogin
    alt status.needsSetup == true
        ServerSetupViewModel->>AppRouter: navigate(.serverNeedsSetup)
        AppRouter->>User: show ServerNeedsSetupView
        User->>ServerNeedsSetupView: tap Retry
        ServerNeedsSetupView->>AuthService: checkServer(serverUrl)
        AuthService-->>ServerNeedsSetupView: status.needsSetup resolved
        ServerNeedsSetupView->>AppRouter: goBack()
        AppRouter->>User: return to LoginView
    else setup complete
        ServerSetupViewModel->>AppRouter: navigate(.login)
        AppRouter->>User: show LoginView
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • Silo-Server/silo-apple#6: Updates TVSkylineSectionFeed.swift to source backdrop artwork from TVFocusMarqueeModel's new computed backdropURL/backdropThumbhash properties, directly integrating the marquee episode-aware backdrop logic introduced in this PR with the tvOS Skyline detail redesign work.
  • Silo-Server/silo-apple#7: Modifies iosApp/iosApp/Screens/Auth/TVServerSetupView.swift to refactor the tvOS server setup flow with connect-vs-pairing receiver logic, overlapping at the same screen-level code as this PR's advanced-options disclosure and focus case additions.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/ios-aurora-onboarding

- Document squared controls, playback selectors, focus behavior, and audiobook layout
- Add HTML mockups for the approved detail-page directions

@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: c8a84df966

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

@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: 6

🧹 Nitpick comments (1)
iosApp/iosApp/Screens/Profiles/ProfileSelectionView.swift (1)

82-88: ⚡ Quick win

Remove redundant platform conditional.

Both the tvOS and non-tvOS branches now use identical code. The #if os(tvOS) conditional can be removed entirely.

♻️ Simplify to single implementation
 private var background: some View {
-    `#if` os(tvOS)
-    AuroraBackdrop(variant: .profile, scrim: .soft)
-    `#else`
     AuroraBackdrop(variant: .profile, scrim: .soft)
-    `#endif`
 }
🤖 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/Profiles/ProfileSelectionView.swift` around lines 82 -
88, The background computed property contains a platform conditional with
identical code in both the tvOS and non-tvOS branches. Remove the entire `#if`
os(tvOS) conditional block and replace it with just the single AuroraBackdrop
statement that is currently duplicated in both branches, since no
platform-specific logic is needed.
🤖 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 `@docs/superpowers/plans/2026-06-15-ios-aurora-onboarding.md`:
- Around line 57-62: Replace the hard-coded absolute path in the cd command with
a repo-relative path. Change the cd command from using the full machine-specific
path `/Volumes/NVMe/dev/github/SiloServer/silo-apple/iosApp/iosApp` to a
relative path like `cd iosApp` or `cd iosApp/iosApp` that will work for any
contributor regardless of their local machine setup. This makes the
documentation portable and usable in CI environments without modification.
- Line 1355: The documentation contains hardcoded development credentials (admin
/ water1234) in the iOS simulator testing section that should be replaced with
generic placeholders. In the text referencing the xcrun simctl patterns and
boot/install/sign-in mechanics, replace the specific credentials admin and
water1234 with generic placeholders such as <username> and <password>
respectively. This maintains clarity that these are placeholders while avoiding
the appearance of hardcoded credentials in the documentation.

In `@docs/superpowers/specs/2026-06-15-ios-aurora-onboarding-design.md`:
- Around line 43-45: The documentation currently references Aurora files using
two different paths: `iosApp/iosApp/tvOS/Aurora/...` in Section 3 and
`iosApp/iosApp/DesignSystem/Aurora/...` in Section 4, creating confusion about
the canonical location. Identify which path represents the actual final location
for the Aurora files (AuroraStyle.swift and AuroraBackdrop.swift) and update all
references in the document to use that single canonical path consistently,
including both the initial references and any subsequent mentions across all
sections.

In `@iosApp/iosApp/DesignSystem/Aurora/AuroraTextField.swift`:
- Around line 77-83: The TextField/SecureField (inputField) lacks an explicit
accessibility label, making it difficult for VoiceOver users to identify the
field. Add an accessibility label modifier to the inputField configuration chain
that binds to the label parameter. Use the accessibilityLabel modifier to attach
semantic accessibility information, ensuring the visible empty label is
supplemented with a proper accessibility identifier for screen reader users.

In `@iosApp/iosApp/Screens/Auth/LoginView.swift`:
- Around line 72-81: The secondary navigation controls in both auth screens
remain active during async operations, allowing users to navigate away while
loading is in progress. In LoginView.swift at lines 72-81, add a disabled
modifier to the HStack containing the "Create account" and "Change server"
buttons, binding it to viewModel.isLoading so they are disabled while sign-in is
loading. Similarly, in SignupView.swift at lines 69-72, add a disabled modifier
to the "Back to sign in" button, binding it to viewModel.isLoading so it is
disabled while account creation is loading. This prevents unintended navigation
while async auth work is in flight.

In `@iosApp/iosApp/Screens/Auth/ServerNeedsSetupView.swift`:
- Around line 48-70: The ServerNeedsSetupView currently displays only the host
value which omits port and path information needed for manual server setup, and
shows a copy affordance on macOS where copyURL() is iOS-only. Replace the Text
displaying host with the full trimmed server URL to provide complete setup
information. Additionally, conditionally gate the copy icon and onTapGesture
call to copyURL() to only appear on iOS platforms, either by hiding the copy
affordance on macOS or by implementing clipboard support for macOS if desired.
This same fix applies to the similar code structure at the other affected
location (approximately lines 95-107).

---

Nitpick comments:
In `@iosApp/iosApp/Screens/Profiles/ProfileSelectionView.swift`:
- Around line 82-88: The background computed property contains a platform
conditional with identical code in both the tvOS and non-tvOS branches. Remove
the entire `#if` os(tvOS) conditional block and replace it with just the single
AuroraBackdrop statement that is currently duplicated in both branches, since no
platform-specific logic is needed.
🪄 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: 4269e9f2-ed83-4f09-ba43-4f4f22ba5443

📥 Commits

Reviewing files that changed from the base of the PR and between 5189114 and c8a84df.

📒 Files selected for processing (17)
  • docs/superpowers/plans/2026-06-15-ios-aurora-onboarding.md
  • docs/superpowers/specs/2026-06-15-ios-aurora-onboarding-design.md
  • iosApp/iosApp/ContentView.swift
  • iosApp/iosApp/DesignSystem/Aurora/AuroraBackdrop.swift
  • iosApp/iosApp/DesignSystem/Aurora/AuroraStyle.swift
  • iosApp/iosApp/DesignSystem/Aurora/AuroraTextField.swift
  • iosApp/iosApp/Navigation/Route.swift
  • iosApp/iosApp/Screens/Auth/LoginView.swift
  • iosApp/iosApp/Screens/Auth/ServerNeedsSetupView.swift
  • iosApp/iosApp/Screens/Auth/ServerSetupView.swift
  • iosApp/iosApp/Screens/Auth/ServerSetupViewModel.swift
  • iosApp/iosApp/Screens/Auth/SetupView.swift
  • iosApp/iosApp/Screens/Auth/SetupViewModel.swift
  • iosApp/iosApp/Screens/Auth/SignupView.swift
  • iosApp/iosApp/Screens/Auth/TVServerSetupView.swift
  • iosApp/iosApp/Screens/Profiles/ProfileSelectionView.swift
  • iosApp/iosApp/tvOS/Aurora/AuroraInputField.swift
💤 Files with no reviewable changes (3)
  • iosApp/iosApp/Screens/Auth/SetupView.swift
  • iosApp/iosApp/Screens/Auth/SetupViewModel.swift
  • iosApp/iosApp/DesignSystem/Aurora/AuroraBackdrop.swift

@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: 5

🤖 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 `@docs/superpowers/specs/2026-06-15-tvos-detail-redesign-design.md`:
- Around line 123-126: In the section describing when the selector row hides,
update the visibility predicate to include Edition as one of the selectable
options that should be checked. Currently the logic only considers version,
audio, and subtitles for the hide condition, but it must also account for
Edition being selectable. Modify the hide condition to check whether ANY
selector exists (Edition, version, audio, or subtitles) rather than only
checking version/audio/subtitles, so the row only hides when there are truly no
selectable options at all.

In `@docs/tvos-detail-mockups/audiobook.html`:
- Line 1: All three HTML mockup files are missing a DOCTYPE declaration at the
beginning, which can cause browsers to enter quirks-mode rendering and make
visual comparisons unreliable. Add the HTML5 doctype declaration at the very
start of each file before the opening `<style>` tag. Specifically, prepend
`<!doctype html>` to the beginning of docs/tvos-detail-mockups/audiobook.html
(line 1), docs/tvos-detail-mockups/directions.html (line 1), and
docs/tvos-detail-mockups/playback-selection.html (line 1) to ensure consistent,
standards-compliant rendering across all browsers.

In `@docs/tvos-detail-mockups/buttons.html`:
- Around line 46-106: The onclick handlers on the option elements
(data-choice="current", data-choice="square-icon", data-choice="square-label",
and data-choice="sharp") all call toggleSelect(this), but this function is never
defined in the file, causing JavaScript errors when clicking cards. Define the
toggleSelect function to accept the clicked element and toggle its selection
state (typically by adding/removing an active class or toggling the data-choice
attribute), or alternatively remove all the onclick="toggleSelect(this)"
handlers if interactive selection is not needed for the mockup.
- Around line 1-127: The HTML mockup files lack proper document structure and
doctype declaration, which can cause the browser to render in quirks mode and
lead to inconsistent styling. For docs/tvos-detail-mockups/buttons.html (lines
1-127) and docs/tvos-detail-mockups/refined-page.html (lines 1-191), wrap the
existing content with a complete HTML5 document structure: add <!doctype html>
at the very beginning, create the root <html> element with lang="en" attribute,
add a <head> section with charset and viewport meta tags plus a title, and
enclose all existing styles within a <style> tag in the head and all existing
HTML content within a <body> tag. This ensures both files render consistently
and correctly in modern browsers.

In `@docs/tvos-detail-mockups/directions.html`:
- Line 99: The `toggleSelect` function referenced in all `onclick` handlers
across multiple sites is not implemented in either file. Add a concrete
`toggleSelect` implementation to docs/tvos-detail-mockups/directions.html (which
will fix the three affected options at lines 99, 121, and 147) and to
docs/tvos-detail-mockups/playback-selection.html (which will fix the three
affected options at lines 60, 85, and 115). The function should accept the
clicked element and toggle its selected state while updating the UI accordingly.
Ensure all option elements affected across both files use this same handler and
participate in the same selected-state update mechanism.
🪄 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: 910dfeab-4110-4c75-a0e2-8f9cefd138c0

📥 Commits

Reviewing files that changed from the base of the PR and between c8a84df and 250f817.

📒 Files selected for processing (6)
  • docs/superpowers/specs/2026-06-15-tvos-detail-redesign-design.md
  • docs/tvos-detail-mockups/audiobook.html
  • docs/tvos-detail-mockups/buttons.html
  • docs/tvos-detail-mockups/directions.html
  • docs/tvos-detail-mockups/playback-selection.html
  • docs/tvos-detail-mockups/refined-page.html

Comment thread docs/tvos-detail-mockups/audiobook.html Resolved
Comment thread docs/tvos-detail-mockups/buttons.html Resolved
Comment thread docs/tvos-detail-mockups/buttons.html Resolved
Quick104 added 2 commits June 15, 2026 22:00
- Upgrade episode hero art to the detail-level series backdrop when available
- Resample marquee tint after cached or fetched enrichment changes backdrop art

@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: 2

🧹 Nitpick comments (1)
iosApp/Tests/DecodeFailureRecoveryPolicyTests.swift (1)

5-47: ⚡ Quick win

Add HEVC branch assertions for shouldAttemptBurstResync.

Current tests validate only .h264 branches. Since the policy has codec-specific .hevc logic, add one positive and one negative HEVC assertion to lock that path.

Suggested patch
 struct DecodeFailureRecoveryPolicyTests {
     static func main() {
         testH264BadDataUsesRecoveryBeforeTerminalRejection()
         testH264BadDataStopsRecoveringAfterAttemptBudget()
         testOtherH264ErrorsDoNotUseBurstRecovery()
+        testHEVCBadDataPolicyBranches()
         print("DecodeFailureRecoveryPolicyTests: all passed")
     }
@@
     private static func testOtherH264ErrorsDoNotUseBurstRecovery() {
         precondition(
             !DecodeFailureRecoveryPolicy.shouldAttemptBurstResync(
                 status: -12903,
                 codec: .h264,
                 attempts: 0,
                 maxAttempts: 2
             ),
             "Only bad-data decode bursts should use the discontinuity resync path"
         )
     }
+
+    private static func testHEVCBadDataPolicyBranches() {
+        precondition(
+            DecodeFailureRecoveryPolicy.shouldAttemptBurstResync(
+                status: -12909,
+                codec: .hevc,
+                attempts: 0,
+                maxAttempts: 2
+            ),
+            "HEVC bad-data should use bounded burst recovery"
+        )
+        precondition(
+            !DecodeFailureRecoveryPolicy.shouldAttemptBurstResync(
+                status: -12903,
+                codec: .hevc,
+                attempts: 0,
+                maxAttempts: 2
+            ),
+            "Non-bad-data HEVC errors should not use burst recovery"
+        )
+    }
 }
🤖 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/Tests/DecodeFailureRecoveryPolicyTests.swift` around lines 5 - 47, The
test suite currently validates only the .h264 codec paths in
DecodeFailureRecoveryPolicy.shouldAttemptBurstResync but lacks coverage for the
.hevc codec-specific logic. Add two new test methods following the pattern of
the existing H.264 tests: one positive assertion that HEVC uses burst recovery
with a valid error status and remaining attempts budget, and one negative
assertion that HEVC properly stops recovering after the attempt budget is
exhausted. Call these new test methods from the main() function alongside the
existing H.264 tests.
🤖 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/Player/AVPlayerRoute/DVSegmentStore.swift`:
- Around line 165-205: A race condition exists where `retireSegments(names:)`
removes a name from `spillingSegments` and adds it to `evictedResources`, but
`finishSpillLocked()` can still insert the same name back into `spilledSegments`
after the lock is released. To fix this, in the `finishSpillLocked()` method,
before inserting a segment name into `spilledSegments`, check if that name
exists in `evictedResources` and skip the insertion if it does. This prevents
retired segments from being reintroduced and ensures `tempSpillBytes` accounting
remains correct.

In `@iosApp/iosApp/Screens/Player/CoreMedia/PlayerCore.swift`:
- Around line 4074-4077: The guard statement checking `isRecoveringDecodeBurst`
in PlayerCore.swift currently returns early for all VideoToolbox errors during a
`-12909` resync, but it should only swallow the specific recoverable bad-data
status and allow other errors like `-12903` invalid-session errors to reach the
rebuild path below. Modify the condition to check both that
`isRecoveringDecodeBurst` is true AND that the current error status matches the
recoverable codec/bad-data combination, so only recoverable errors are filtered
out while other statuses continue to the error handling paths below.

---

Nitpick comments:
In `@iosApp/Tests/DecodeFailureRecoveryPolicyTests.swift`:
- Around line 5-47: The test suite currently validates only the .h264 codec
paths in DecodeFailureRecoveryPolicy.shouldAttemptBurstResync but lacks coverage
for the .hevc codec-specific logic. Add two new test methods following the
pattern of the existing H.264 tests: one positive assertion that HEVC uses burst
recovery with a valid error status and remaining attempts budget, and one
negative assertion that HEVC properly stops recovering after the attempt budget
is exhausted. Call these new test methods from the main() function alongside the
existing H.264 tests.
🪄 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: c476d41f-4946-40e4-a1b2-0b58e9f7bcf0

📥 Commits

Reviewing files that changed from the base of the PR and between 250f817 and d12f20c.

📒 Files selected for processing (18)
  • iosApp/Tests/DVSegmentStoreTests.swift
  • iosApp/Tests/DecodeFailureRecoveryPolicyTests.swift
  • iosApp/Tests/LocalHLSPlaylistPolicyTests.swift
  • iosApp/Tests/LocalHLSRequestLogPolicyTests.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerBackend.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentServer.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentStore.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/DVSegmentWriter.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/LocalHLSPlaylistPolicy.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/LocalHLSRequestLogPolicy.swift
  • iosApp/iosApp/Screens/Player/ApplePlaybackRoutePlanner.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/DecodeFailureRecoveryPolicy.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/PlayerCore.swift
  • iosApp/iosApp/Screens/Player/CoreMedia/PlayerCoreTypes.swift
  • iosApp/iosApp/Screens/Player/PlaybackRecoveryPlanner.swift
  • iosApp/iosApp/Screens/Player/PlayerViewModel.swift
  • iosApp/iosApp/tvOS/Components/TVFocusMarquee.swift
  • iosApp/iosApp/tvOS/Components/TVSkylineSectionFeed.swift
✅ Files skipped from review due to trivial changes (3)
  • iosApp/iosApp/Screens/Player/ApplePlaybackRoutePlanner.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/AVPlayerBackend.swift
  • iosApp/iosApp/Screens/Player/AVPlayerRoute/LocalHLSPlaylistPolicy.swift

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