Repository navigation
Audiobooks: first-party playback over the standard API, PlexAmp-style player, tvOS polish - #3
Conversation
Upstream is archived and the Libuavs3d 1.2.1 release asset it pins was re-published with a new checksum on 2026-04-23, so remote resolution of the manifest can never succeed again. Vendor the package at commit b38afaff with only the Libuavs3d checksum corrected, and point project.yml at the local path. Ignore .swiftpm/ so SPM workspace state stays out of the repo. Co-Authored-By: Claude Fable 5 <[email protected]>
Generation-token the post-discontinuity preroll waiters so a newer seek or track switch cancels stale ones instead of racing them, gate restart on minimum decoded audio/video buffer, and centralize format-context seeking with stream-appropriate timestamps. Co-Authored-By: Claude Fable 5 <[email protected]>
First-party audiobook support for iOS, tvOS, and macOS: a persistent audio player (mini player + full-screen Now Playing), audiobook detail content with parts/chapters, audiobook library surfaces in Home, Browse, and the tvOS library tabs, and spoken-audio Now Playing integration with adjustable skip intervals and playback rate. Playback uses the standard per-file session API that the web client ships against — the dedicated /api/v1/audio surface from the closed server PR #97 never reached main, which 404'd every audiobook start. The client now builds the whole-book timeline from item detail (AudiobookPlaybackContext), starts one direct /playback/start session per part with disable_progress_persistence, stitches parts at boundaries, and reports file-local progress to the session while persisting book-level resume through /sync/progress. Bookmarks are omitted: main has no first-party bookmark endpoint. Also fix a startup crash in the audio error path: both tab shells applied .environment(router) inside the presentation modifiers, so fullScreenCover content (the audio player) never inherited AppRouter and ErrorView trapped on first render. Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
PlexAmp-inspired Now Playing surface: quadrant colors sampled from the book cover (CIAreaAverage over a Nuke-downsampled thumb) drive a slow-drifting MeshGradient backdrop and an accent tint for the controls. The full player gets oversized artwork that breathes with play state, a slim chapter-ticked scrubber with drag-to-scrub, a circular accent play button, capsule chips for speed/sleep/chapters, and a chapter sheet that opens scrolled to the current chapter. tvOS uses a side-by-side layout with remote Back to minimize; the mini player picks up the accent progress hairline and current chapter line. Drift and artwork scaling pause under Reduce Motion, and the scrubber exposes a VoiceOver-adjustable element. AudioPlayerViews.swift is split into focused per-view files. Co-Authored-By: Claude Fable 5 <[email protected]>
The detail action row rendered white-on-white until focused because the tvOS shell tints controls with continuumOnSurface — swap the system bordered styles for the hero pill buttons the video detail already uses. Chapter rows were .plain buttons, so tvOS focus blew them up into full-width slabs; they now use the native list-row inversion (faint resting fill, white/black on focus, gentle scale) with 10-foot typography. Audiobook covers are square, so rows made entirely of audiobooks (Continue Listening, audiobook rails) now render 1:1 tiles via a new MediaRow/MediaCard square aspect instead of stretching covers into 2:3 posters — same treatment for the detail page's related rails. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (52)
📝 WalkthroughWalkthroughThis PR introduces comprehensive audiobook playback support to the iOS/tvOS app while transitioning FFmpeg binary dependencies from a remote Git source to a locally vendored package. The feature includes a complete playback engine, multi-part timeline management, full-screen and mini-player UI, detail screen rendering, and integration across browse, library, and home navigation. Video player discontinuity handling is improved to gate playback resumption after seek/track-switch operations. ChangesFFmpeg vendoring and binary dependencies
Audiobook playback feature
🎯 4 (Complex) | ⏱️ ~75 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba6cead181
ℹ️ 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".
| Task { | ||
| await player.start( | ||
| contentId: lastRequest.contentId, | ||
| restart: lastRequest.restart, | ||
| startPosition: lastRequest.startPosition | ||
| ) |
There was a problem hiding this comment.
Ignore stale audiobook start tasks
When a user starts two audiobooks in quick succession (or retries/taps another title while the first /itemDetail or /playback/start call is still in flight), each untracked Task can complete out of order and still call player.start. Since AudioPlayerViewModel.start only checks the existing context before its first await, an older request can overwrite the newer context or reuse the newer session/track index, leaving playback pointed at the wrong book/session. Track and cancel the previous start task or pass a request generation through start so stale completions are ignored.
Useful? React with 👍 / 👎.
| .fullScreenCover(isPresented: Binding( | ||
| get: { audioStore.isShowingFullPlayer }, | ||
| set: { if !$0 { audioStore.dismissFullPlayer() } } | ||
| )) { | ||
| AudioFullPlayerView() |
There was a problem hiding this comment.
Present audio controls on macOS
These new audio presentation modifiers are compiled only for !os(macOS), but the shared non-tvOS detail UI still renders AudiobookDetailContent play buttons on macOS and calls audioStore.play. On macOS, pressing Play can therefore start the AVPlayer-backed audiobook in the background with no mini player/full player and no in-app way to pause or stop it. Either present a macOS audio player/control surface or hide/route the audiobook play actions for macOS.
Useful? React with 👍 / 👎.
| audioStore.play( | ||
| contentId: detail.contentId, | ||
| restart: false, | ||
| startPosition: resumePosition |
There was a problem hiding this comment.
Start non-resumable Play actions from zero
When the stored audiobook position is intentionally not resumable (for example resumePosition is nil because progress is under 30 seconds or within 5 seconds of the end), this primary button still sends restart: false; AudioPlayerViewModel.start then falls back to context.resumePositionSeconds, so a button labeled “Play” can jump to the near-end saved position instead of starting over. Pass restart: true (or an explicit startPosition: 0) when resumePosition is nil so the label and behavior match.
Useful? React with 👍 / 👎.
| } catch { | ||
| self.error = ErrorState(error) |
There was a problem hiding this comment.
Clear partial audio state after failed starts
If loadTrack fails after the context has been assigned (for example /playback/start fails or returns an unusable stream URL), the catch only records the error and leaves context, duration, Now Playing, and hasActiveSession populated. Dismissing the error then leaves the mini player visible for an item that never loaded, and its controls operate on an empty AVPlayer. Clean up the partially-created session state in this failure path before exposing the error.
Useful? React with 👍 / 👎.
| .fullScreenCover(isPresented: Binding( | ||
| get: { audioStore.isShowingFullPlayer }, | ||
| set: { if !$0 { audioStore.dismissFullPlayer() } } | ||
| )) { | ||
| AudioFullPlayerView() |
There was a problem hiding this comment.
Stop audiobooks before opening videos
With the new persistent audiobook player, the audio full-screen cover is independent from the existing video PlayerView cover below it. If an audiobook is playing and the user starts a movie/episode, nothing pauses or closes audioStore.player, so the audiobook can keep playing underneath the video and both players can register Now Playing remote commands. Close or pause the audio session before presenting video playback.
Useful? React with 👍 / 👎.
| .onReceive(NotificationCenter.default.publisher(for: .continuumSessionExpired)) { _ in | ||
| Task { await audioStore.player.close() } | ||
| router.expiredSession() |
There was a problem hiding this comment.
Close audio on manual sign-out
This only stops audiobook playback when the session-expired notification fires. Manual sign-out paths call router.signOutAndReset() directly and do not post .continuumSessionExpired, so an audiobook can continue playing after tokens/profile state have been cleared and the UI has returned to login/server setup with no mini player controls. Also close audioStore.player when auth state leaves .authenticated or when sign-out is requested.
Useful? React with 👍 / 👎.
| #if os(tvOS) | ||
| .onExitCommand { | ||
| minimize() | ||
| } |
There was a problem hiding this comment.
Don't orphan tvOS playback on Exit
On tvOS, pressing Menu/Back while the audiobook player is open calls minimize(), which dismisses the only audio UI while leaving playback active. Unlike iOS, tvOS does not install AudioMiniPlayerView, so after this path the user has no visible way to reopen, pause, or stop the audiobook except by starting another book or relying on system controls. Either treat Exit as stop/pause or provide a tvOS mini/reopen affordance before dismissing.
Useful? React with 👍 / 👎.
…ation - Remove the Face ID / biometric gate (spec §1/§5/§6). Authorization is the user's confirmation tap on a phone already signed in to the server — the signed-in phone is the authority. Resolves the spec/plan inconsistency (HIGH #1) by dropping the unimplemented gate rather than adding it. - Make the Receiver poll loop cancellable (plan Task 8): the stream reader no longer blocks on polling; each server's start+poll is a separate cancellable Task, so a peer Cancel or dropped connection aborts the attempt immediately and frees the advertiser (HIGH #3). - Confirm-once multi-server CRITICAL re-affirmed as the previously-accepted v1 risk (no change). Co-Authored-By: Claude Opus 4.8 <[email protected]>
- Clear cached/persisted status and breadcrumb consent context when purging a signed-out binding, so a later capture can't recreate default-Ask consent and resume diagnostics for the old account (#1) - Gate persistent capture on server availability, not just consent != Never, so a disabled/storage-unavailable server never stores crash reports (#2) - Persist the binding (and profile) in abnormal-exit markers and attribute the report to it; drop markers whose account no longer matches, keeping legacy markers' best-effort behavior (#3) - Default breadcrumb capture to disabled until stored consent loads, bootstrapping from the last-known status so a Never account's fresh launch writes nothing (#4) - Treat a status-refresh failure during upload as retryable instead of a destination mismatch (wrong message + 24h retry suppression) (#5) - Suppress declined prompts for the report's lifetime via a per-report flag; declined reports stay manually sendable but never re-prompt or auto-upload (#6) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh
…sent, and upload (#96) * feat(diagnostics): Apple client diagnostics slice (iOS + tvOS) Implements the Apple slice of the client-diagnostics spec (silo-server docs/design/2026-07-19-client-diagnostics.md): vendored contract models with fixture tests, DiagLog safe-logging facade with collection-time redaction and an always-on memory ring, breadcrumb journal, tar.gz bundle builder + multipart upload via DiagnosticsAPI, MetricKit crash/hang capture (iOS), abnormal-exit sentinel (tvOS) with consent gating, server+account- bound consent and pending-report stores with sign-out purge, device snapshot with hashed route identifiers, Diagnostics settings + consent prompts on both platforms, and a curated cmpLog tee into the ring. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XppCCycoaskCsW7ja1fZct * feat(diagnostics): consent prompts, pending-report review, and settings UX (iOS + tvOS) Adds the user-facing layer over the diagnostics slice: the crash/hang pending-report prompt flow with a review sheet before anything uploads, per-fingerprint suppression and child-profile gating via DiagnosticsPromptPolicy, an automatic upload path for always-on consent, report summary and detail screens, Diagnostics settings panes on both platforms, and pending-report notifications posted from MetricKit capture so an active session can surface the prompt. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * feat(debug): auto-login launch arguments for simulator E2E runs -debugServer/-debugUsername/-debugPassword sign in through the real checkServer -> login -> selectProfile flow and land on Home, so simulator-driven end-to-end runs (paired with -debugPlayFirst) need no UI input. DEBUG builds only. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): redact server hosts, emails, and identity key-values in logs A captured report leaked the server domain three ways: HTTPClient error lines with full URLs, wss:// URLs inside NSError descriptions (the URL regex only matched http/https), and the potential for bare hostnames outside URL syntax. Now: - URL normalization hashes the host to a stable [host:<sha256-12>] token (ws/wss included), keeping lines correlatable without exposing the domain; loopback hosts stay literal for playback debugging. - Every remembered server hostname from ServerRegistry is registered with the redactor and replaced even when it appears as bare text — known-string matching avoids the false positives a generic domain regex would hit (bundle ids, file names). - Email addresses are redacted, and username/login/email key-values join the token key-value redaction (= and : separators). Verified on a live report: zero domain occurrences in the bundle, hashed tokens in place, loopback URLs intact. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address PR #96 review findings - Move DiagnosticsSHA256 into its own file so the SiloTVTopShelf target (which compiles the logging/redaction slice) links DiagLog.hostToken - Refresh the stored manifest consent notice_version at upload time so a report captured under an older notice isn't rejected as stale_consent forever - Classify too_large uploads as a permanent local failure (new report state) instead of retrying the same oversized bundle indefinitely - Preserve crash capture when the status refresh is offline by falling back to the last-known-good status/binding (in-memory, then persisted per server) - Gate persistent capture for child profiles, mirroring the prompt policy - Filter breadcrumbs.jsonl to the crashed run's lines for abnormal-exit reports - Snapshot logs at capture time and prefer the frozen snapshot when building an old crash/hang/abnormal-exit bundle (manual reports still use the live ring) - Distinguish a token rotation from a real identity change by comparing the server id + account id rather than raw access-token fingerprints - Skip reports marked needsServerUpdate/tooLarge in auto-upload and prompting - Scope recorded playback session IDs to the active binding so another server/account's sessions can't leak into a report bound elsewhere - Truncate MetricKit stack_excerpt by UTF-8 bytes, not characters - Drop the redundant named-keys frame traversal that duplicated stack frames - Note the MetricKit delivery-time binding limitation at the capture site - Hold BreadcrumbJournal's lock across readAll() so reads can't race rotation - Disable decline/delete buttons while the view model isWorking (iOS + tvOS) - Register the legacy host for redaction during ServerRegistry migration - Serialize ExitSentinel.captureEnabled writes with its lock via setCaptureEnabled - Coalesce overlapping foreground refreshes in DiagnosticsViewModel - Gate verbose 1 Hz [CMP-DIAG] player traces behind the Debug Logging toggle - Tests: use failable String(bytes:encoding:) and XCTUnwrap in redaction tests; add focused tests for consent refresh, permanent-failure state, session scoping, and byte-safe stack truncation Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-2 review findings on PR #96 - Clear cached/persisted status and breadcrumb consent context when purging a signed-out binding, so a later capture can't recreate default-Ask consent and resume diagnostics for the old account (#1) - Gate persistent capture on server availability, not just consent != Never, so a disabled/storage-unavailable server never stores crash reports (#2) - Persist the binding (and profile) in abnormal-exit markers and attribute the report to it; drop markers whose account no longer matches, keeping legacy markers' best-effort behavior (#3) - Default breadcrumb capture to disabled until stored consent loads, bootstrapping from the last-known status so a Never account's fresh launch writes nothing (#4) - Treat a status-refresh failure during upload as retryable instead of a destination mismatch (wrong message + 24h retry suppression) (#5) - Suppress declined prompts for the report's lifetime via a per-report flag; declined reports stay manually sendable but never re-prompt or auto-upload (#6) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-3 review findings on PR #96 - DiagnosticsCoordinator: drop abnormal-exit markers captured under a child profile by re-checking the marker's own profile at capture, not just the profile active now (an unknown status keeps the marker for a later retry). - DiagnosticsCoordinator: rotate the breadcrumb journal when the active server/account binding changes mid-run so a new binding can't bundle the previous one's breadcrumbs; the first establish of a launch still keeps the prior run's trail for abnormal-exit capture. - DiagnosticsCoordinator: restrict the last-known-status offline fallback to genuine network/status failures; identityChanged (signed out / no token) and missing-account no longer capture against a stale binding. - DiagnosticsCoordinator: gate breadcrumb capture on server availability so disabled/storage_unavailable status no longer arms capture, consistent with the persistent-capture gate. - DiagnosticsCoordinator: fail closed when the active profile's child status can't be resolved during persistent capture (getProfiles() failed offline) instead of proceeding. - PendingReportStore: refresh consent.mode as well as notice_version from the current consent record at upload so a demoted Always->Ask report can't still claim mode=always (manual reports stay manual). - MetricKitCapture: cap crash.summary to 8192 UTF-8 bytes after prefixing the first frame, reusing the byte-safe truncation. - DiagLog: redact HTTPClient's camelCase/wrapper header forms harvested from OSLog (profileId=, auth(...), profileToken(...), accessToken / refreshToken key-values). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-4 review findings on PR #96 - Restrict the offline capture fallback to genuinely transient failures: only network/offline errors and 5xx server errors fall back to the last-known snapshot; auth/permission (401/403), missing endpoint (404), other 4xx, malformed responses, and identity-level errors now fail closed so a capture is never queued against a signed-out or unavailable binding. - Back-fill the tvOS exit-sentinel marker binding the moment diagnostics first resolves it (coordinator refresh completion), not only on a later foreground, so a first-run crash before any status refresh is still attributed to the right account instead of a legacy/unbound marker. - Re-verify the active destination immediately before posting a diagnostics bundle; the bundle build (OSLog harvest + gzip) can outlast an account switch, and a same-server switch keeps server_instance_id, so keep the report retryable rather than upload it to the newly active account. - Drop the access-token fingerprint from the view model's RuntimeIdentity so a transparent token refresh during load() is no longer misread as an identity change and reset(); the stable identity is server registry id plus profile id, with sign-out still detected via token presence and generation. - Always run the registry-wide diagnostics purge on sign-out (it clears reports/consent under older server_instance_ids for the same URL); the current-binding purge only skips its own duplicate work, never the registry-wide purge. - Gate uploads on the captured profile: the server rejects an upload whose X-Profile-Id header (the currently active profile) disagrees with the manifest's report.profile_id (HTTP 400 profile_mismatch). Hold a report captured under another profile as retryable — before the bundle build and again right before the POST — so it uploads next time the capturing profile is active, mirroring the server's resolveProfileID trim-and-compare rule. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-5 review findings on PR #96 - DiagnosticsCoordinator: verify a *stable* destination identity (server registry id + selected profile, plus a token-presence sign-out check) before posting a bundle, not the access-token value. A transparent token refresh during buildBundle no longer trips the pre-POST check and defers the Always-path auto-upload for 24h; a genuine same-server account switch still fails closed (it clears the token and lands on a different profile). - DiagLog/LogRing: clear the process-wide log ring when the active diagnostics binding changes, mirroring the breadcrumb-journal purge at the same trigger, so a new binding's manual report or crash snapshot can't include the previous binding's CMP/playback log lines. Adds LogRing.clear(). - DiagnosticsCoordinator: re-evaluate the breadcrumb gate on profile change (and status refresh) so an adult->child profile switch disarms breadcrumb and exit-sentinel capture, consistent with the persistent-capture child gate; fails closed immediately on switch until the async child check lands. - PlaybackSessionBridge: gate RecentSessionTracker recording on the same capture-enabled signal (isDiagnosticsCaptureEnabled) as breadcrumbs, so session IDs aren't accumulated while collection is off (Never / disabled / storage-unavailable) and later surfaced in a report after re-enable. - DiagLog.replaceKnownHosts: rewrite as a single forward pass that never rescans replaced output, fixing an infinite loop when a registered host is a substring of its replacement token (e.g. "host" vs "[host:...]"). Adds a pathological-host regression test plus a LogRing.clear() test. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh --------- Co-authored-by: Claude Fable 5 <[email protected]>
…98) * feat(diagnostics): Apple client diagnostics slice (iOS + tvOS) Implements the Apple slice of the client-diagnostics spec (silo-server docs/design/2026-07-19-client-diagnostics.md): vendored contract models with fixture tests, DiagLog safe-logging facade with collection-time redaction and an always-on memory ring, breadcrumb journal, tar.gz bundle builder + multipart upload via DiagnosticsAPI, MetricKit crash/hang capture (iOS), abnormal-exit sentinel (tvOS) with consent gating, server+account- bound consent and pending-report stores with sign-out purge, device snapshot with hashed route identifiers, Diagnostics settings + consent prompts on both platforms, and a curated cmpLog tee into the ring. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XppCCycoaskCsW7ja1fZct * feat(diagnostics): consent prompts, pending-report review, and settings UX (iOS + tvOS) Adds the user-facing layer over the diagnostics slice: the crash/hang pending-report prompt flow with a review sheet before anything uploads, per-fingerprint suppression and child-profile gating via DiagnosticsPromptPolicy, an automatic upload path for always-on consent, report summary and detail screens, Diagnostics settings panes on both platforms, and pending-report notifications posted from MetricKit capture so an active session can surface the prompt. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * feat(debug): auto-login launch arguments for simulator E2E runs -debugServer/-debugUsername/-debugPassword sign in through the real checkServer -> login -> selectProfile flow and land on Home, so simulator-driven end-to-end runs (paired with -debugPlayFirst) need no UI input. DEBUG builds only. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): redact server hosts, emails, and identity key-values in logs A captured report leaked the server domain three ways: HTTPClient error lines with full URLs, wss:// URLs inside NSError descriptions (the URL regex only matched http/https), and the potential for bare hostnames outside URL syntax. Now: - URL normalization hashes the host to a stable [host:<sha256-12>] token (ws/wss included), keeping lines correlatable without exposing the domain; loopback hosts stay literal for playback debugging. - Every remembered server hostname from ServerRegistry is registered with the redactor and replaced even when it appears as bare text — known-string matching avoids the false positives a generic domain regex would hit (bundle ids, file names). - Email addresses are redacted, and username/login/email key-values join the token key-value redaction (= and : separators). Verified on a live report: zero domain occurrences in the bundle, hashed tokens in place, loopback URLs intact. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address PR #96 review findings - Move DiagnosticsSHA256 into its own file so the SiloTVTopShelf target (which compiles the logging/redaction slice) links DiagLog.hostToken - Refresh the stored manifest consent notice_version at upload time so a report captured under an older notice isn't rejected as stale_consent forever - Classify too_large uploads as a permanent local failure (new report state) instead of retrying the same oversized bundle indefinitely - Preserve crash capture when the status refresh is offline by falling back to the last-known-good status/binding (in-memory, then persisted per server) - Gate persistent capture for child profiles, mirroring the prompt policy - Filter breadcrumbs.jsonl to the crashed run's lines for abnormal-exit reports - Snapshot logs at capture time and prefer the frozen snapshot when building an old crash/hang/abnormal-exit bundle (manual reports still use the live ring) - Distinguish a token rotation from a real identity change by comparing the server id + account id rather than raw access-token fingerprints - Skip reports marked needsServerUpdate/tooLarge in auto-upload and prompting - Scope recorded playback session IDs to the active binding so another server/account's sessions can't leak into a report bound elsewhere - Truncate MetricKit stack_excerpt by UTF-8 bytes, not characters - Drop the redundant named-keys frame traversal that duplicated stack frames - Note the MetricKit delivery-time binding limitation at the capture site - Hold BreadcrumbJournal's lock across readAll() so reads can't race rotation - Disable decline/delete buttons while the view model isWorking (iOS + tvOS) - Register the legacy host for redaction during ServerRegistry migration - Serialize ExitSentinel.captureEnabled writes with its lock via setCaptureEnabled - Coalesce overlapping foreground refreshes in DiagnosticsViewModel - Gate verbose 1 Hz [CMP-DIAG] player traces behind the Debug Logging toggle - Tests: use failable String(bytes:encoding:) and XCTUnwrap in redaction tests; add focused tests for consent refresh, permanent-failure state, session scoping, and byte-safe stack truncation Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-2 review findings on PR #96 - Clear cached/persisted status and breadcrumb consent context when purging a signed-out binding, so a later capture can't recreate default-Ask consent and resume diagnostics for the old account (#1) - Gate persistent capture on server availability, not just consent != Never, so a disabled/storage-unavailable server never stores crash reports (#2) - Persist the binding (and profile) in abnormal-exit markers and attribute the report to it; drop markers whose account no longer matches, keeping legacy markers' best-effort behavior (#3) - Default breadcrumb capture to disabled until stored consent loads, bootstrapping from the last-known status so a Never account's fresh launch writes nothing (#4) - Treat a status-refresh failure during upload as retryable instead of a destination mismatch (wrong message + 24h retry suppression) (#5) - Suppress declined prompts for the report's lifetime via a per-report flag; declined reports stay manually sendable but never re-prompt or auto-upload (#6) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-3 review findings on PR #96 - DiagnosticsCoordinator: drop abnormal-exit markers captured under a child profile by re-checking the marker's own profile at capture, not just the profile active now (an unknown status keeps the marker for a later retry). - DiagnosticsCoordinator: rotate the breadcrumb journal when the active server/account binding changes mid-run so a new binding can't bundle the previous one's breadcrumbs; the first establish of a launch still keeps the prior run's trail for abnormal-exit capture. - DiagnosticsCoordinator: restrict the last-known-status offline fallback to genuine network/status failures; identityChanged (signed out / no token) and missing-account no longer capture against a stale binding. - DiagnosticsCoordinator: gate breadcrumb capture on server availability so disabled/storage_unavailable status no longer arms capture, consistent with the persistent-capture gate. - DiagnosticsCoordinator: fail closed when the active profile's child status can't be resolved during persistent capture (getProfiles() failed offline) instead of proceeding. - PendingReportStore: refresh consent.mode as well as notice_version from the current consent record at upload so a demoted Always->Ask report can't still claim mode=always (manual reports stay manual). - MetricKitCapture: cap crash.summary to 8192 UTF-8 bytes after prefixing the first frame, reusing the byte-safe truncation. - DiagLog: redact HTTPClient's camelCase/wrapper header forms harvested from OSLog (profileId=, auth(...), profileToken(...), accessToken / refreshToken key-values). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-4 review findings on PR #96 - Restrict the offline capture fallback to genuinely transient failures: only network/offline errors and 5xx server errors fall back to the last-known snapshot; auth/permission (401/403), missing endpoint (404), other 4xx, malformed responses, and identity-level errors now fail closed so a capture is never queued against a signed-out or unavailable binding. - Back-fill the tvOS exit-sentinel marker binding the moment diagnostics first resolves it (coordinator refresh completion), not only on a later foreground, so a first-run crash before any status refresh is still attributed to the right account instead of a legacy/unbound marker. - Re-verify the active destination immediately before posting a diagnostics bundle; the bundle build (OSLog harvest + gzip) can outlast an account switch, and a same-server switch keeps server_instance_id, so keep the report retryable rather than upload it to the newly active account. - Drop the access-token fingerprint from the view model's RuntimeIdentity so a transparent token refresh during load() is no longer misread as an identity change and reset(); the stable identity is server registry id plus profile id, with sign-out still detected via token presence and generation. - Always run the registry-wide diagnostics purge on sign-out (it clears reports/consent under older server_instance_ids for the same URL); the current-binding purge only skips its own duplicate work, never the registry-wide purge. - Gate uploads on the captured profile: the server rejects an upload whose X-Profile-Id header (the currently active profile) disagrees with the manifest's report.profile_id (HTTP 400 profile_mismatch). Hold a report captured under another profile as retryable — before the bundle build and again right before the POST — so it uploads next time the capturing profile is active, mirroring the server's resolveProfileID trim-and-compare rule. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-5 review findings on PR #96 - DiagnosticsCoordinator: verify a *stable* destination identity (server registry id + selected profile, plus a token-presence sign-out check) before posting a bundle, not the access-token value. A transparent token refresh during buildBundle no longer trips the pre-POST check and defers the Always-path auto-upload for 24h; a genuine same-server account switch still fails closed (it clears the token and lands on a different profile). - DiagLog/LogRing: clear the process-wide log ring when the active diagnostics binding changes, mirroring the breadcrumb-journal purge at the same trigger, so a new binding's manual report or crash snapshot can't include the previous binding's CMP/playback log lines. Adds LogRing.clear(). - DiagnosticsCoordinator: re-evaluate the breadcrumb gate on profile change (and status refresh) so an adult->child profile switch disarms breadcrumb and exit-sentinel capture, consistent with the persistent-capture child gate; fails closed immediately on switch until the async child check lands. - PlaybackSessionBridge: gate RecentSessionTracker recording on the same capture-enabled signal (isDiagnosticsCaptureEnabled) as breadcrumbs, so session IDs aren't accumulated while collection is off (Never / disabled / storage-unavailable) and later surfaced in a report after re-enable. - DiagLog.replaceKnownHosts: rewrite as a single forward pass that never rescans replaced output, fixing an infinite loop when a registered host is a substring of its replacement token (e.g. "host" vs "[host:...]"). Adds a pathological-host regression test plus a LogRing.clear() test. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address round-6 review findings on PR #96 - AuthService: move diagnostics profile invalidation into the profileId setter (and the ServerRegistry switchTo/remove profile-restore paths) so every active-profile change fails the breadcrumb/session/exit-sentinel gate closed, not just the selectProfile path. - DiagnosticsConsentStore: purge the tvOS ExitSentinel marker when Crash Reports is set to Never, so an armed marker can't later surface as an abnormal-exit report after collection was turned off. - ExitSentinel: preserve an unclean previous run's marker in a distinct leftover slot before arming the current run, so a crash marker survives a failed captureLeftoverIfNeeded and a subsequent background/terminate; decode stays backward-compatible. Extracted ExitSentinelMarkerStore for the (now unit-tested) slot bookkeeping. - MetricKitCapture: filter attached breadcrumbs to the payload's reporting window (with margin) so post-incident/relaunch and older-segment lines don't ride along with a crash/hang report. - Tests: leftover-preservation round-trip and breadcrumb-window filtering. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012e3QjbPo96ed9Mn2qRiUkh * fix(diagnostics): address PR review feedback * fix(diagnostics): address automated review follow-ups * fix(diagnostics): close evidence isolation gaps --------- Co-authored-by: Claude Fable 5 <[email protected]>
What changed
Playback over the standard API
First-party audiobook support for iOS, tvOS, and macOS. The original client work targeted the dedicated
/api/v1/audio/*surface from server PR Silo-Server/silo-server#97, which was closed without merging — so every playback start 404'd in production. The client now ships against what main actually serves (mirroring the web player):AudiobookPlaybackContextbuilds the whole-book timeline (parts, global chapter offsets, resume point) fromGET /items/{id}POST /playback/startsession per file withdisable_progress_persistence: true; parts are stitched at boundaries by stopping/starting sessionsPOST /playback/{id}/progress(admin activity/keepalive); book-level resume persists throughPOST /sync/progresswithforce_overwriteAlso fixes a fatal crash in the audio error path: both tab shells applied
.environment(router)inside the presentation modifiers, sofullScreenCovercontent never inheritedAppRouterandErrorViewtrapped on first render.PlexAmp-style player
MeshGradientbackdrop and an accent tint for controlstvOS detail + home polish
TVPrimaryPillButton/TVSecondaryPillButton(system bordered styles rendered white-on-white under the shell'scontinuumOnSurfacetint)Infrastructure
mpvkit/ffmpeg-buildas a local Swift package — upstream is archived and its pinned Libuavs3d release asset was re-published with a new checksum, so remote manifest resolution can never succeed againReview notes
web/src/pages/audiobooks/player/useAudiobookPlayback.ts— divergences from it are bugsVendor/ffmpeg-buildadds only the package manifest/shims (~90 KB);.build/.swiftpmare ignoredDetailVersionSelectionTestspass; playback, resume, and the detail page exercised on a physical Apple TV against the production server🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores