Skip to content

RemoteAlbum: a failed later page can no longer discard the whole album (#175 hardening) - #186

Merged
starbrightlab merged 1 commit into
mainfrom
fix/175-partial-pagination
Aug 4, 2026
Merged

RemoteAlbum: a failed later page can no longer discard the whole album (#175 hardening)#186
starbrightlab merged 1 commit into
mainfrom
fix/175-partial-pagination

Conversation

@starbrightlab

Copy link
Copy Markdown
Owner

What

Every shared-album provider paginates, and every one ran its paging loop bare inside fetch()'s single top-level runCatching. 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:

  • 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

What 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

  • Full unit suite green.
  • Verified against a real legacy iCloud shared album via a JVM harness driving the actual RemoteAlbum.fetch: all photos returned, behaviour unchanged.

🤖 Generated with Claude Code

#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>
@starbrightlab
starbrightlab merged commit 543f27b into main Aug 4, 2026
1 check passed
@starbrightlab
starbrightlab deleted the fix/175-partial-pagination branch August 4, 2026 20:10
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