feat(copies): matches between this PC and the server, Integrate and merge (owner review 6, v1.2.0) (#74)
CI / Build and test (push) Successful in 13m44s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 16s
Release / Build, test and publish (push) Successful in 26m34s
CI / PostgreSQL 16 integration (push) Failing after 17m36s
CI / PostgreSQL 17 integration (push) Failing after 15m36s
CI / Docker image (push) Successful in 1m12s
Release / Server image (push) Failing after 15s

The same time-lapse on a server and on this PC under different ids, or twice on this PC, is recognised,
compared and settled as the owner asked in owner review 6.

Matches are found after each sync refresh, through the server's new photo lookup, and after the jobs that
change photos. The default is to ask every time. Server › Matches offers:
- Keep apart, which is remembered;
- Link only and Unlink;
- the Compare dialog: photos, details line by line, projects and the plan.

Integrate completes both sides. Photos default to Union, projects are copied across, and a losing version
goes to the trash only after a hash check. Afterwards new photos move by themselves, and deletions wait for
the user.

A merge of two local sequences verifies every photo before the other sequence goes to its archive's trash.
Upload all local skips suspected matches and flags them.

Migration 0012 adds the found_copies and copy_probes tables. Jobs 25 (Integrate) and 26 (MergeSequences) are
new, and so are the server capabilities photo-lookup and upload-into.

Refs #73

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #74.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-18 15:20:29 +01:00
1 parent 43719bb5c5
commit f33bcac32e
586 files changed
+41546 -280

No files matched your search

@@ -169,6 +169,21 @@ public sealed class SyncTextTests
Assert.Contains("403 forbidden", tip);
}
[Test]
public void PhotosThatFailedToMoveThreeTimesReadNotSentWithTheReason()
{
// Owner review 6 (#73), design §7.3: automatic photos of an integrated pair failed NotSentAfter times in a row.
var entry = Entry(SyncStatus.InSync);
var told = SyncText.State(entry, new SyncMark(null, null, NotSent: new AutoPhotoFailure(SyncAgent.NotSentAfter, "Quota reached")));
Assert.Equal((StatusKind.Warning, Loc.L("Server.Sync.State.NotSent")), (told.Kind, told.Text));
Assert.Equal(Loc.L("Tooltips.Server.Sync.State.NotSent", "Quota reached"), told.ToolTip);
// Fewer failures are still retried quietly; a transfer running now wins.
Assert.Equal(SyncText.State(entry), SyncText.State(entry, new SyncMark(null, null, NotSent: new AutoPhotoFailure(SyncAgent.NotSentAfter - 1, "Quota reached"))));
var moving = Entry(SyncStatus.Transferring, transfer: Upload(JobState.Running));
Assert.Equal(SyncText.State(moving), SyncText.State(moving, new SyncMark(null, null, NotSent: new AutoPhotoFailure(SyncAgent.NotSentAfter, "x"))));
}
[Test]
public void FiltersAndSearchSelectRows()
{