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 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-17 15:02:39 +01:00
1 parent d10577b175
commit b34b6b6fe0
41 files changed
+1046 -193

No files matched your search

@@ -891,6 +891,8 @@ public sealed class LibraryViewModel : SectionViewModel
var entry = _entries.GetValueOrDefault(item.Id);
var action = MassActions.QuickSync(new SelectedSequence(item.Sequence, entry), Context, out var blocker);
item.SetSync(entry, action is not null, action is { } a ? Loc.L("Tooltips.Library.QuickSync." + a) : blocker ?? string.Empty);
// The match status survives every reload (a search, a filter, a page): the cards are new each time.
item.SetMatch(Shell.Server?.Sync.Copies.StatusOf(item.Id));
item.SetQuickBlocker(item.IsRemote
? _actions.CanPost ? null : Loc.L("Library.Blocked.NotConnected")
: Context.HasEngine ? null : Loc.L("Library.Blocked.NoIndex"));
@@ -5,12 +5,14 @@ using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
using Chronos.App.Server.Copies;
namespace Chronos.App.Sections;
public partial class ServerView : UserControl
{
private IInputElement? _beforeDialog;
private CopyDialogViewModel? _copyDialog;
public ServerView()
{
@@ -41,6 +43,9 @@ public partial class ServerView : UserControl
private void OnModelChanged(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName != nameof(ServerViewModel.Dialog) || sender is not ServerViewModel model) return;
if (_copyDialog is not null) _copyDialog.KeepFocusRequested -= OnKeepFocusRequested;
_copyDialog = model.Dialog as CopyDialogViewModel;
if (_copyDialog is not null) _copyDialog.KeepFocusRequested += OnKeepFocusRequested;
if (model.Dialog is not null)
{
if (!IsVisible) return;
@@ -57,4 +62,19 @@ public partial class ServerView : UserControl
Body.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
});
}
/// <summary>Choose on "Choose the sequence to keep": the keyboard goes to the first Kept sequence radio of the Plan part.</summary>
private void OnKeepFocusRequested(object? sender, EventArgs e) =>
Dispatcher.BeginInvoke(DispatcherPriority.Input, () => FirstKeepOption(DialogHost)?.Focus());
internal static RadioButton? FirstKeepOption(DependencyObject root)
{
for (var i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
{
var child = VisualTreeHelper.GetChild(root, i);
if (child is RadioButton { DataContext: CopyKeepOption, IsVisible: true } radio) return radio;
if (FirstKeepOption(child) is { } found) return found;
}
return null;
}
}