From b34b6b6fe09b5244468c669782a11455f06428ed Mon Sep 17 00:00:00 2001 From: Alberto Balbo Date: Tue, 17 Nov 2026 15:02:39 +0100 Subject: [PATCH] fix(copies): close the owner review 6 verification findings A merge could still trash photos it never verified, resume against a pair the user had answered meanwhile, and take different unhashed photos for copies; the dialog and the lists worded several facts wrongly or lost them on refresh. - Merge: a retry resumes only while the pair is still the job's; Verify requires the other archive online and its folder in place, stops on an unreadable photo, files a differing unhashed photo as a second version and must cover every frame before Trash; the plan hashes unmatched unhashed photos first, lists "Deleted in the other" and names the relinked servers; second versions stay discoverable (CopySides.VersionsAsync). - Integrate: a retry after a failure before the journal runs again. - Sync: a sequence back after a 404 stays Linked while its link holds; a local cull no longer asks for attention. - Block lines of both planners name the right sequence, archive, server and space through one formatter. - Compare dialog: one Details row per setting with worded values, Projects headings, Choose focuses the kept-sequence radios, the photo selection reaches rows outside the viewport, the Replace confirmation lists the losers per side, plan lines read as queued. - Matches and Library: counts first and grouped, integrating shown as a share, local matches name the other archive, the Library keeps its match and "deleted on server" statuses across a refresh. Refs #73 Co-Authored-By: Claude Opus 5.5 --- docs/CHANGELOG.md | 20 +++ docs/DECISIONS.md | 5 + i18n/en/Errors.resx | 2 +- i18n/en/Library.resx | 1 + i18n/en/Server.resx | 93 +++++----- i18n/en/Tooltips.resx | 2 + i18n/it/Errors.it.resx | 2 +- i18n/it/Library.it.resx | 1 + i18n/it/Server.it.resx | 97 +++++----- i18n/it/Tooltips.it.resx | 2 + src/Chronos.App/DesignTime/SampleData.cs | 4 +- src/Chronos.App/Infrastructure/AppServices.cs | 5 +- .../Infrastructure/ListSelection.cs | 39 ++++ src/Chronos.App/Sections/LibraryViewModel.cs | 2 + src/Chronos.App/Sections/ServerView.xaml.cs | 20 +++ .../Server/Copies/CopyDetailRow.cs | 41 +++-- .../Server/Copies/CopyDialogViewModel.cs | 105 +++++++++-- .../Server/Copies/CopyDialogs.xaml | 11 +- .../Server/Copies/CopyListViewModel.cs | 28 ++- src/Chronos.App/Server/Copies/CopyPhotoRow.cs | 2 +- src/Chronos.App/Server/Copies/CopyPlanLine.cs | 7 +- src/Chronos.App/Server/Copies/CopyText.cs | 24 ++- src/Chronos.App/Server/SyncTableViewModel.cs | 5 +- src/Chronos.App/Server/SyncText.cs | 57 +++++- .../Archiving/Jobs/MergeJobHandler.cs | 130 +++++++++++--- src/Chronos.Data/Archiving/MergeJournal.cs | 3 + src/Chronos.Data/Archiving/SequenceMerger.cs | 77 +++++++- src/Chronos.Data/Copies/CopyModel.cs | 8 +- src/Chronos.Data/Copies/CopyPlans.cs | 19 ++ src/Chronos.Data/Copies/CopySides.cs | 24 +++ src/Chronos.Data/Copies/FoundCopyStore.cs | 3 +- .../Copies/IntegrateJobHandler.cs | 10 +- src/Chronos.Data/Copies/IntegratePlanner.cs | 17 +- src/Chronos.Data/Sync/SyncService.cs | 12 +- .../Server/CopyScreenSmokeTests.cs | 14 ++ .../Chronos.App.Tests/Server/CopyTextTests.cs | 62 +++++++ .../Archiving/SequenceMergerTests.cs | 166 +++++++++++++++++- .../Copies/CopyEngineTests.cs | 34 ++++ .../Copies/IntegrateTests.cs | 56 ++++++ tests/Chronos.Data.Tests/Sync/SyncFixture.cs | 4 +- .../Sync/SyncServiceCopyTests.cs | 25 +++ 41 files changed, 1046 insertions(+), 193 deletions(-) create mode 100644 src/Chronos.App/Infrastructure/ListSelection.cs diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index dd86948b..9cfc9ca8 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -29,6 +29,26 @@ commits follow Conventional Commits (release notes are generated from them by `C Windows notification too. - The maintenance pass clears the journal of a merge or an integration that ended without deleting it, or whose job was deleted without a cancel and nothing wrote for as long as the job history keeps jobs. + - A merge retried after the pair was kept apart, or merged again by another job, refuses and trashes nothing. + - A merge verifies the other sequence only while its archive is online and its folder is where the index says; an + unreadable photo stops the job, every photo of the other sequence must be verified before it goes to the trash, and + an unhashed photo that turns out different is kept as a second version instead of going to the trash. + - Before comparing, a merge hashes the other sequence's unhashed photos that match nothing, so different photos with + the same size and time are no longer taken for copies. + - A merge plan lists "Deleted in the other · n" and names the servers it relinks; a merge's second versions stay + discoverable in the kept sequence after the pair is gone. + - The Merge and Integrate plans' block lines name the right sequence, archive, server and space; "already linked" + names the server. + - An Integrate retried after a failure before its first stage runs again instead of refusing. + - A sequence back on the server after a 404 stays Linked when its link still holds. + - A local cull (photos deleted on this PC) no longer flags a pair for attention. + - The Library keeps its "Also elsewhere" and "Deleted on server" statuses across a refresh. + - Compare dialog: one Details row per setting (an Auto parameter's members, the frame positions), values worded as the + sync words them; Projects lists each column's owner; Choose on "choose the sequence to keep" moves the keyboard to + the choice; the photo selection holds the photos outside the visible rows; the Replace confirmation lists the losing + versions under the side that loses them; plan lines read as queued; the Italian version choice fits. + - Matches: counts first in the This side and Other side cells, the integrating progress as a share ("x of y" in the + tooltip), counts grouped by thousands, and a match between this PC's archives names the other archive. ## [1.1.1] — 2026-11-16 diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 79f7db76..56625390 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -910,3 +910,8 @@ One line per decision: date · decision · alternative · reason. | 2026-11-17 | The maintenance pass clears a merge's or an integration's journal (`merge-.json`, `integrate-.json`) once its job is done or cancelled, or once the index no longer knows the job and nothing wrote the file for the job history's days; a failed or paused job's journal stays for its retry (#73) | Clear it with the job's deletion only | A job deleted without a cancel (or another host's) never deletes its journal itself | | 2026-11-17 | Automatic photos that failed `SyncAgent.NotSentAfter` (3) times in a row are told once with an error toast "{title}: photos not sent" · Show, which runs from its Windows notification too and shows the row; the row reads "not sent", the last reason in its tooltip, until a transfer succeeds (#73) | A toast at every failure; a badge only | Design §6.1/§7.3: retried quietly with backoff, told when it keeps failing; a toast that only navigates may run from the notification, as the jobs' Open does | | 2026-11-17 | A Corrupt or Missing frame on this PC whose photo the server holds is repaired by an Integrate through the ordinary fetch: the plan lists it as a Fetch (the comparison leaves unusable frames out), and the ingest replaces the damaged holder in place, the old file moved aside as `.damaged-