fix(import): keep a server rename on re-import and show multi-day sessions

A whole folder imported again to the server sent its folder name as the
sequence title on every run, undoing a rename made on the server. The
sink now sends a typed title as before, but the folder's default name
only to a sequence that has no title yet (it reads the sequence first).
The archive already applied a title only when it created the sequence.

A session that ends on another day, as a whole folder often does,
showed only its first date ("28/09/2026 · 18:02 → 18:05"), which read
as a few minutes on one day. Its plan row and Show plan heading now
show both dates, from two new invariant resources (with the
right-to-left arrow).

The Gap and Minimum boxes now show their tooltip while disabled, so the
reason Whole folder turns them off reaches them, not only the Sessions
check box. Doc comments that said a merge needs the same camera now
mention the whole-folder rule.

Tests: a server whole-folder import run twice keeps the server's rename
and still applies a typed title; multi-day time text in both reading
directions; and the Import view model's Group rules (folder only, cards
planned by sessions, switching drops splits, tooltips say why).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-26 23:33:16 +01:00
1 parent a34b33d50b
commit a809416199
13 files changed
+181 -25

No files matched your search

+12 -6
View File
@@ -45,7 +45,10 @@ public sealed record PlanTotals(int Sessions, int Photos, int CopyCount, long Co
/// <param name="DefaultTitle">Title the sequence gets when the user types none (a whole folder's name, else its folder name).</param>
/// <param name="IsNew">The session starts a new sequence (false: it continues one imported before).</param>
/// <param name="FirstPath">Card path of the session's first photo (where a merge joins it to the previous session).</param>
/// <param name="MergesInto">Number of the earlier session of the same camera and format it can merge into; null for none.</param>
/// <param name="MergesInto">
/// Number of the earlier session it can merge into (same camera and format; for a whole folder, same format whatever the
/// camera); null for none.
/// </param>
public sealed record PlanSessionRow(int Number, string SessionKey, string? Title, string DefaultTitle, string TimeText, string FramesText,
string SizeText, string CameraText, string TargetText, bool IsNew, string FirstPath, int? MergesInto);
@@ -250,12 +253,15 @@ public static class ImportPlans
};
/// <summary>
/// "28/09/2026 · 18:02 → 20:04". Bidi never mirrors an arrow, so a right-to-left language reads it from its own
/// resource with the arrow pointing from the start to the end in its reading order.
/// "28/09/2026 · 18:02 → 20:04"; one that ends on another day (a whole folder, often) shows both dates:
/// "28/09/2026 18:02 → 06/10/2026 18:00". Bidi never mirrors an arrow, so a right-to-left language reads it from its
/// own resource with the arrow pointing from the start to the end in its reading order.
/// </summary>
private static string TimeText(PlannedSession s) =>
Loc.L(Loc.IsRightToLeft ? "Import.Session.TimeRtl" : "Import.Session.Time", Formatting.Date(s.Start), s.Start.ToString("t", Loc.Culture),
s.End.ToString("t", Loc.Culture));
private static string TimeText(PlannedSession s) => s.End.Date == s.Start.Date
? Loc.L(Loc.IsRightToLeft ? "Import.Session.TimeRtl" : "Import.Session.Time", Formatting.Date(s.Start), s.Start.ToString("t", Loc.Culture),
s.End.ToString("t", Loc.Culture))
: Loc.L(Loc.IsRightToLeft ? "Import.Session.TimeDaysRtl" : "Import.Session.TimeDays", Formatting.Date(s.Start), s.Start.ToString("t", Loc.Culture),
Formatting.Date(s.End), s.End.ToString("t", Loc.Culture));
/// <summary>"3,600 · 2 s": photos and the median interval between them.</summary>
private static string FramesText(PlannedSession s)