feat(app): matches list, compare dialog, settings rows, library and picker surfaces (owner review 6, P6)

Server > Matches shows the pairs the copy engine found (same sequence on the
server and this PC, or twice here), attention first, with the design 8.1
actions; Keep apart and Unlink toast with Undo. The in-window Compare dialog
walks photos, details, projects and the plan, blocks until details are
chosen, and confirms only what replaces or merges (typed count for a merge).
Sync rows of an unanswered pair read "match found" and offer Compare first;
Upload all local skips suspected copies and says why. Settings > Server gains
Link matches, Integrate photos and Integrate projects. Library cards carry the
match status with Compare..., the sequence picker marks twins, and Jobs opens
Integrate and Merge targets. The sample engine and capture scenes render every
state; tests cover the text rules and the screens.

Refs #73

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-16 20:29:07 +01:00
1 parent 283d04d9cd
commit 06b826e39d
34 files changed
+3762 -43

No files matched your search

+54
View File
@@ -12,6 +12,7 @@ using Chronos.App.Import;
using Chronos.App.Infrastructure;
using Chronos.App.Library;
using Chronos.App.Server;
using Chronos.App.Server.Copies;
using Chronos.App.Settings;
using Chronos.Core.Diagnostics;
using Chronos.Core.Imaging.Geometry;
@@ -189,6 +190,7 @@ public static class ScreenCapture
written += await CaptureEditorAsync(window, shell, sample, directory);
written += await CaptureRemoteEditorAsync(window, shell, sample, directory);
written += await CaptureCopiesAsync(window, shell, sample, directory);
Log.Info("capture", $"{written} screenshot(s) written to {Path.GetFullPath(directory)}");
if (written == 0) Environment.ExitCode = 1;
}
@@ -291,6 +293,58 @@ public static class ScreenCapture
return written;
}
/// <summary>
/// Matches (owner review 6, #73, design §8.7), last as they add sequences of their own: the list, its toast, the dialog
/// at each part and list, the plan with and without a block, the merge, the two destructive confirmations, the sync rows
/// a pair marks, the Library's cards, the empty list, and the list signed out (local pairs only).
/// </summary>
private static async Task<int> CaptureCopiesAsync(MainWindow window, ShellViewModel shell, SampleData sample, string directory)
{
var written = 0;
var engine = await sample.FillCopiesAsync();
await shell.Library.RefreshAsync();
foreach (var theme in Themes)
{
ThemeManager.Apply(theme);
foreach (var view in CopyScenes.Views)
{
DismissToasts(window);
await CopyScenes.ShowAsync(shell, view);
written += await SaveAsync(window, directory, view, theme);
}
CopyScenes.Reset(shell);
if (await CopyScenes.ReplaceRequestAsync(shell) is { } replace)
written += await SaveDialogAsync(new ConfirmDialog(replace), directory, "server-copies-replace-confirm", theme);
if (await CopyScenes.MergeRequestAsync(shell) is { } merge)
written += await SaveDialogAsync(new ConfirmDialog(merge), directory, "server-copies-confirm", theme);
CopyScenes.Reset(shell);
DismissToasts(window);
await LibraryScenes.ShowCopiesAsync(shell, CopyScenes.Alps);
written += await SaveAsync(window, directory, "library-copies", theme, waitForThumbnails: shell);
shell.Library.SearchText = string.Empty;
}
// No pair at all, then signed out: only this PC's own pairs stay (the chip shows with two archives).
shell.Services.Sync.Copies = new SampleCopyEngine();
foreach (var theme in Themes)
{
ThemeManager.Apply(theme);
DismissToasts(window);
await CopyScenes.ShowAsync(shell, "server-copies");
written += await SaveAsync(window, directory, "server-copies-empty", theme);
}
shell.Services.Sync.Copies = engine;
CopyScenes.Reset(shell);
await shell.Services.Server.SignOutAsync();
foreach (var theme in Themes)
{
ThemeManager.Apply(theme);
DismissToasts(window);
await CopyScenes.ShowAsync(shell, "server-copies");
written += await SaveAsync(window, directory, "server-copies-signedout", theme);
}
return written;
}
private static void SelectSyncFilter(ShellViewModel shell, SyncFilter filter) =>
shell.Server.Sync.Chips.First(c => c.Filter == filter).SelectCommand.Execute(null);