Repository navigation
perf: load Home and artwork before they are shown - #603
Conversation
The splash now stays its full length while the app resolves the session, fetches Home, For You, library landings and first grid pages, and decodes the first screen's artwork, so a signed-in user lands on a painted Home. The first screens' responses are kept on disk per server and profile and seed the next launch. Cards just off screen decode ahead at the size they draw, on-screen images load at high priority, and the thumbhash fades out in 0.12 s. Also removes dead and redundant code found by an audit of the app and test suite, and modernizes concurrency and SwiftUI patterns. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Remote-playback handoffs no longer write or read response snapshots under the owner's profile, and keep the owner's snapshots on disk. - Backgrounding during the splash records the profile-away time; a return while the splash is up is handled when it lifts. - Cache invalidations remove matching snapshots, a language change removes the profile's snapshots, and each scope is seeded once. - Queued warm-ups stop when decoded memory is trimmed for playback. - Audiobook covers and episode rows warm at the shape their cards draw. - The tvOS grid keeps its loading state while a newer fetch runs. - Restores the DiceBear preset loader with its retries, the tvOS insecure-connection alert's Connect-first order, and directory creation for refreshed download subtitles. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedToo many files! This PR contains 464 files, which is 364 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
📒 Files selected for processing (464)
You can disable this status message by setting the
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 |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98940f8502
ℹ️ 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".
Restoring the remembered profile on launch clears its per-profile caches; since the previous commit that also deleted its snapshots, just before the launch seeded from them. Profile boundaries now clear memory only; content invalidations still delete matching snapshots. The decode ladder's expression was ambiguous to Swift 6.2 on macOS. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 116a4bdae3
ℹ️ 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".
Quick104
left a comment
There was a problem hiding this comment.
Five findings from the review of 98940f85 still apply at 116a4bda: four P2 defects and the disclosed P3 startup presentation issue below.
The update addresses snapshot deletion during profile restoration and changes the decode-ladder expression that failed macOS CI. The updated expression still needs confirmation from the macOS job.
Verification used source tracing and focused Swift probes. No full app or device validation was run for this review.
AI-assisted review: gpt-6-astra and gpt-6.1-sol, using the Codex harness in T3 Code.
- Add advisory age and source to item models and an advisory age poster badge, off by default - Add AdvisoryAgePreferenceStore for the profile's Show Advisory Age setting, re-read after foreground - Add a ResponseCache write fence so a response fetched before an invalidation can't restore stale data - Limit the series Delete Download action to records that are confirmed and still present - Widen the AI subtitle poll interval in a test that lost a race on loaded runners
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32d5b69e91
ℹ️ 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".
- Top Shelf rechecks profile eligibility before every request again. - Snapshot keys too long for a file name are not saved. - A cancelled handoff that restores no identity resumes snapshots. - On tvOS, a player requested from a phone waits for the splash to lift. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Skipping the main-actor hop while the server looked reachable let a failure queued before a success be applied after it, marking a live server unreachable. Every response hops again, as on main. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…warm-ups - tvOS page focus rechecks the top menu after yielding, as on main. - The phone detail caches a next-up watch detail only after its cancellation and selection checks. - Skyline rows cancel the artwork they warmed when they leave view. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Clearing memory for a profile, server or handoff boundary now also fences writes from fetches that began before it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
💡 Codex Review
On the tvOS For You screen, if a viewer toggles watched, favorite, or watchlist state while one of these detail requests is already in flight, PersonalStateSync.invalidateItemState removes the item key and advances the cache write fence, but this unconditional write restores the response fetched before the mutation. Opening that item can then hydrate stale ItemDetail.userData and show the old flags. Capture the write token before starting each request and use the fenced set(..., fetchedAt:) path when caching its result.
ℹ️ 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".
| state.inFlightProbe = nil | ||
| state.probedCapability = probed | ||
| return true |
There was a problem hiding this comment.
Retire stale persisted image capabilities after a failed probe
When tvOS has remembered an available capability and the same server ID is later rolled back to a version where /api/v2/images/capabilities returns 404, the probe produces nil here but capability immediately falls back to the remembered value, and the stored value is only updated after successful probes. The client therefore keeps adding the unsupported image_size=large parameter to every image-bearing request across launches, potentially making Home and catalog endpoints return 400 until app data is cleared. Distinguish an authoritative unsupported response from a transient failure and retire or quarantine the remembered capability in that case.
Useful? React with 👍 / 👎.
Problem
Related issue: N/A. The maintainer asked for this directly; no issue was filed.
Opening the app and its library pages felt slow on iOS and tvOS, and posters and backdrops often showed their blurred placeholder for a noticeable time. Measuring on simulators and a physical Apple TV against a development server showed the time went to the app, not the server:
Approach
Startup. The splash still runs its full length, but the session, route and first screens now load underneath it, so a signed-in user lands on a painted Home.
Saved responses. The responses the first screens draw are saved in Caches per server and profile (
ResponseSnapshotStore, at most 32 per profile). The next launch shows them while fresh ones load. Sign-out and server switches delete them; invalidations and metadata-language changes delete the affected ones. They are neither written nor read while a remote-playback handoff runs under another account.Artwork.
Cleanup. An audit removed dead and redundant code across the app and tests and modernized concurrency and SwiftUI use:
@Observable,Mutex,async let, and@MainActorwhere state was already main-thread. It also deleted unused types (DurableCommandStore,APIv2DispatchFailure) and sped up slow tests. The test suites run in about half the time.Not changed: ten upgrade paths for installs from before late September 2026 (old download stores, the pre-rename keychain service and background-task ID, the App Group defaults mirror, the pre-#145 diagnostics key). Removing them needs a decision on which old builds are still supported.
Android was not changed. The splash and snapshot behavior has no Android counterpart yet.
Validation
xcodebuild test, schemeSilo, iOS 27 simulator: 2,518 tests, 0 failures. SchemeSiloTV, tvOS 27 simulator: 2,301 tests, 0 failures. Both on32d5b69e, which mergesmainatf59b9878(feat(catalog): show profile-controlled advisory ages #587).xcodebuild build:Silo,SiloTV(with test bundles) andSiloMacon Xcode 27; CI builds with Xcode 26.3.116a4bda).Evidence: https://evidence.siloserver.org/r/silo-apple/startup-and-artwork-speed/
Risks
Checklist
AI Disclosure
Harness: Claude Code (Claude Agent SDK) in T3 Code
Tool(s): Claude Code, including its subagents
Model(s): claude-opus-5-5[1m]
Involvement: Fully AI-generated, human verified
Adversarial review: Six review subagents read the diff against
main: startup and saved responses; the image pipeline and look-ahead; player, networking, downloads, and settings/auth. They found:All of these are fixed in
98940f85. On the PR, Codex found that restoring the remembered profile at launch deleted that profile's snapshots just before they were seeded, a regression from98940f85's invalidation fix; profile boundaries now clear memory only (116a4bda). Codex then found that a request already in flight could write pre-mutation rows back after an invalidation;ResponseCachenow fences such writes (32d5b69e). Kody's findings on the offline Delete All confirmation and the Browse grid's change detection are fixed in the same commit; its other findings concern code unchanged frommainand are answered in their threads. A reported missingawaitwas a false positive: the code builds on all platforms. A narrow misclassification in AI subtitle creation was left as is, because it fails safely by holding the job.🤖 Generated with Claude Code
Note
Prefetch Home content and artwork before first render via shared-flight startup prefetch
SharedFetchsingle-flight coordination so concurrent startup requests (Home sections, recommendations, user libraries, library sections, browse pages) share one request, cache writes use a start-token fence, and user-library results can be reused for 15 seconds (StartupContentPrefetcher.swift)ResponseSnapshotStoreand seedsResponseCachefrom snapshots on launch, so first screens can render before network responses arrive (ResponseSnapshotStore.swift, ResponseCache.swift)PosterImageCacheat ladder-aligned decode sizes, and the newAsyncImageViewserves cached decodes before requests fire (ArtworkLookahead.swift, AsyncImageView.swift)PosterRowsSkeletonplaceholders during Home loading (ContentView.swift)zoomNamespace,pendingZoomSourceID),HomeSectionHeaderno longer offers See All or rule styles, andAppNavPreferences.showAudiobooksnow reads themac.nav.showAudiobookskey; check those call sites if regressions appearMacroscope summarized 7a61f86.