fix(app): archive tree selection, toolbar, filters and dialogs after review

- reloads and expanding never clear the tree selection; only jobs on this
  archive reload it, once they settle
- one-row toolbar with the view switch and last scan on their own row; figure
  tiles shrink instead of cutting at the minimum width
- set filter by camera, status and tag; duplicates and orphans searches can be
  cancelled; health fixes cover every matching sequence
- Right/Left/Enter open and close years; dialogs hold the keyboard and only
  close themselves; disabled commands say why
- adopt folder can copy into the layout (Import screen); database backup in
  Maintenance; Move dialog capture state

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 10:44:22 +00:00
1 parent 29c82eba5c
commit 58ae096061
9 files changed
+614 -124

No files matched your search

+32
View File
@@ -1,3 +1,4 @@
using Titano.App.Library;
using Titano.App.Settings;
using Titano.Core.Archiving;
using Titano.Core.Localization;
@@ -80,3 +81,34 @@ public static class Retag
.Where(c => !c.Tags.SequenceEqual(c.Sequence.Tags, StringComparer.Ordinal)),
];
}
/// <summary>
/// Narrows the mass-operation set on top of the tree selection (Archive.html "Filtered set ▾"): camera, status and tag;
/// years and single sequences are chosen in the tree.
/// </summary>
public sealed record ArchiveSetFilter(string? Camera = null, StatusFilter Status = StatusFilter.Any, string? Tag = null)
{
public bool IsEmpty => Camera is null && Status == StatusFilter.Any && Tag is null;
public bool Matches(Sequence sequence)
{
if (Camera is not null && CameraOf(sequence) != Camera) return false;
if (Tag is not null && !sequence.Tags.Contains(Tag, StringComparer.OrdinalIgnoreCase)) return false;
var (with, without) = LibraryFilter.Flags(Status);
return (sequence.Status & with) == with && (sequence.Status & without) == 0;
}
/// <summary>"Canon EOS R5 · Not analysed · sunset"; empty without a filter.</summary>
public string Describe() => string.Join(" · ", new[]
{
Camera ?? string.Empty,
Status == StatusFilter.Any ? string.Empty : StatusLabel(Status),
Tag ?? string.Empty,
}.Where(t => t.Length > 0));
/// <summary>The camera a sequence is filed under, as the camera chart names it.</summary>
public static string CameraOf(Sequence sequence) =>
PathTemplate.CameraName(sequence.CameraMake, sequence.CameraModel) is { Length: > 0 } name ? name : Loc.L("Archive.Chart.UnknownCamera");
public static string StatusLabel(StatusFilter status) => Loc.L(status == StatusFilter.Any ? "Library.Filter.AnyStatus" : "Library.Filter.Status." + status);
}