fix(projects): never revert a server's index settings to an older project.json

Before phase 5b the server's settings PATCH wrote the index alone, and every
desktop edit of a linked sequence arrives as one, so an upgraded server holds
sequences whose index settings are newer than their project.json. Main's birth
read project.json first and mirrored it over the index; sequenceChanged then
carried the loss to the desktops' linked copies.

ArchiveServiceOptions.IndexSettingsMayLead, set by the server, keeps both: Main
is born with project.json's settings as version 1 and the index's as version 2,
in force and mirrored (on a read-only archive both go to the index only). A Main
the sidecars already hold, met with no mirror known, keeps index settings that
none of its versions hold as an External version below what project.json gives
(the head again as a Restore, a merge, or the file's). The desktop is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 13:35:47 +01:00
1 parent ccc10ec8b8
commit ab6cad51b2
11 files changed
+245 -18

No files matched your search

+7 -1
View File
@@ -56,7 +56,13 @@ public static class LibraryEndpoints
/// <summary>The archive engine behind these operations: the host's, or one of its own (a test host that replaces the archive module).</summary>
internal static ArchiveService Engine(ArchiveService? archives, ChronosDatabase db) =>
archives ?? new ArchiveService(db, new ArchiveServiceOptions { Decoder = DecoderFactory.CreateServer(), Owner = ArchiveModule.Owner, ImagesAfterScan = true });
archives ?? new ArchiveService(db, new ArchiveServiceOptions
{
Decoder = DecoderFactory.CreateServer(),
Owner = ArchiveModule.Owner,
ImagesAfterScan = true,
IndexSettingsMayLead = true
});
/// <summary>
/// What the Library's filters offer (the panel's Year, Camera and Tag menus): the years of first capture, the camera