RemoteAlbum: a failed later page can no longer discard the whole album (#175 hardening) - #186
Merged
Merged
Conversation
#175 hardening) Every shared-album provider paginates, and every one of them ran its paging loop bare inside fetch()'s single top-level runCatching — so an exception on page 2 (an error body that isn't the expected JSON shape, a transport hiccup mid-crawl) threw away everything page 1 had already collected and dropped the screensaver to the default feed. That failure shape matches issue #175's report exactly: an iCloud CloudKit query page is 200 records but records come as CPLAsset+CPLMaster pairs, so one page is ~100 photos and a >100-photo album always crosses a page boundary. If the continuation query then fails, the user goes from "would have seen 100 photos" to "sees the default feed". Now each provider contains failures at its paging granularity, degrading to a shorter album instead of none: - iCloud CloudKit: per page (query + parse + collect) - iCloud legacy: per 25-photo webasseturls batch - Google Photos: per continuation RPC - Synology: per SYNO.Foto.Browse.Item page This is the defensive half of #175; the root cause of the failing CloudKit continuation still needs a >100-photo repro album to pin down, so the issue stays open. Verified against a real legacy shared album (fetch returns all photos, unchanged behaviour) plus the full unit suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every shared-album provider paginates, and every one ran its paging loop bare inside
fetch()'s single top-levelrunCatching. An exception on a later page (an error body that isn't the expected JSON shape, a transport hiccup mid-crawl) threw away everything already collected and dropped the screensaver to the default feed.That failure shape matches #175 exactly: a CloudKit query page is 200 records, but records arrive as CPLAsset+CPLMaster pairs, so one page is ~100 photos and a >100-photo album always crosses a page boundary. If the continuation query fails, the user goes from "would have seen 100 photos" to "sees the default feed".
Each provider now contains failures at its paging granularity, degrading to a shorter album instead of none:
webasseturlsbatchSYNO.Foto.Browse.ItempageWhat this does NOT do
This is the defensive half of #175. The root cause (why the CloudKit continuation fails) still needs a >100-photo repro album to pin down; a live-harness setup for that is ready, and the issue stays open.
Testing
RemoteAlbum.fetch: all photos returned, behaviour unchanged.🤖 Generated with Claude Code