feat(data): filter sequences by renders and sync state; read a remote sequence's first frame alone

SequenceQuery.Rendered and SyncStates back the Library's Rendered, Not
rendered and Synced status choices. ISyncRemote.FirstFrameAsync reads one row
of the frames page (default: the whole list), so a remote card without a hero
frame no longer downloads the server's manifest for its thumbnail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-05 22:13:55 +00:00
1 parent 3f443eaacf
commit dcc9dcd213
4 files changed
+31 -2

No files matched your search

@@ -170,6 +170,9 @@ public sealed class SyncServerTests(TestContext context)
var remoteId = (await studio.EntryAsync("Milan skyline dusk")).Link!.RemoteId;
await ServerIdleAsync(server);
Assert.True(((await server.Database.Sequences.GetAsync(remoteId))!.Status & SequenceStatus.ThumbsBuilt) != 0, "thumbnails on the server");
// A remote card without a hero frame shows its first frame, read as one row instead of the whole list.
ISyncRemote remote = laptop.Remote;
Assert.Equal((await remote.ListFramesAsync(remoteId, context.Cancellation))[0].Id, (await remote.FirstFrameAsync(remoteId, context.Cancellation))?.Id);
await laptop.Sync.RefreshAsync(laptop.Remote, new SyncPolicy(), context.Cancellation);
var job = await laptop.Sync.EnqueueDownloadAsync(laptop.Engine, laptop.Server, remoteId, "Milan skyline dusk", SyncDownloadMode.Proxies, null);