fix(copies): close the fourth verification round of owner review 6
The fourth verification round of the matches work found 18 defects in the merge, Integrate and Matches surfaces. This commit fixes them: - An Integrate job now carries the planning account's id, so its re-plan decides ownership the way the dialog did. - A merge skips only a project the kept sequence holds a real copy of (name, offset head and history content) and re-points its renders to that copy. - A merge runs its trash checks before the Links stage and records an undo, so an abandoned merge gives the other sequence back its link, session keys and pairs. - The metered hold adopts automatic transfers that were paused before a restart. - Apply in the Compare dialog re-plans when the plan is pending or stale. - The Library's Two versions... lists the second versions a Union merge leaves, each with Drop... (dry run, confirmation, verified partner). A merge job's Open shows that list. - The merge's typed confirmation is the invariant count, and the prompt names it in all 38 languages. - Italian text uses Principale and Gemello. The Main project is named through WorkspaceText in the Projects part and in the twin tooltip. - The session keys tooltip is split into two keys, and To trash... and Delete on server... say why they are disabled. - The capture restores the editor account before the Matches scenes. - Upload again follows SyncHost.CanSendSync (Upload with Edit). - Matches rows trim archive names in the middle on a rebalanced grid; the Projects part rows trim, with the full text in the tooltip. - The sample project targets use ProjectTransplant.FreeName. DECISIONS, CHANGELOG, STATUS 8.7, the request doc and the 16 changed capture baselines are updated. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c99badcfe
commit
2c06e7ac2b
171 files changed
+1591
-218
No files matched your search
@@ -408,6 +408,52 @@ public sealed class CopyTextTests
|
||||
Assert.Equal(0, CopyDialogViewModel.KeptVersions(steps, PhotoAction.FetchVersion, PhotoAction.TrashHere));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheMergesTypedConfirmationIsTheCountWithoutSeparatorsAndThePromptNamesIt()
|
||||
{
|
||||
// 1,204 photos: what to type has no group separator in any language ("1.204" in Italian), and the prompt says it.
|
||||
foreach (var culture in new[] { "en", "it", "de", "hu" })
|
||||
{
|
||||
Loc.SetCulture(CultureInfo.GetCultureInfo(culture));
|
||||
try
|
||||
{
|
||||
Assert.Equal("1204", CopyDialogViewModel.MergeTyped(1_204));
|
||||
var prompt = CopyDialogViewModel.MergeTypedPrompt(1_204, "Alps 2026");
|
||||
Assert.Contains("1204", prompt);
|
||||
Assert.Contains("Alps 2026", prompt);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Loc.SetCulture(CultureInfo.GetCultureInfo("en"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheSessionKeysTooltipNamesTheKeysThatStayOnlyWhenThereAreAny()
|
||||
{
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Copies.Plan.SessionKeys"), CopyDialogViewModel.SessionKeysToolTip([]));
|
||||
var kept = CopyDialogViewModel.SessionKeysToolTip(["card:A1", "folder:B2"]);
|
||||
Assert.False(kept.Contains("{0}", StringComparison.Ordinal), "no placeholder is left in the text");
|
||||
Assert.Contains("card:A1", kept);
|
||||
Assert.Contains("folder:B2", kept);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AMatchRowTrimsALongArchiveNameInItsMiddleAndItsTooltipSaysItWhole()
|
||||
{
|
||||
Assert.Equal("Main archive", CopyText.MiddleTrim("Main archive", CopyText.RowNameLength));
|
||||
var name = "ChronosArchive-Photos-2026-Studio NAS backup";
|
||||
var trimmed = CopyText.MiddleTrim(name, CopyText.RowNameLength);
|
||||
Assert.LessOrEqual(trimmed.Length, CopyText.RowNameLength);
|
||||
Assert.True(trimmed.StartsWith("ChronosArch", StringComparison.Ordinal) && trimmed.EndsWith("NAS backup", StringComparison.Ordinal), trimmed);
|
||||
Assert.Contains("…", trimmed);
|
||||
|
||||
var facts = Facts("Lighthouse", name, 1_204);
|
||||
Assert.Contains(trimmed, CopyText.Where(facts, isServer: false, maxName: CopyText.RowNameLength));
|
||||
Assert.Contains(name, CopyText.Where(facts, isServer: false));
|
||||
}
|
||||
|
||||
private static (StatusKind, string) Head((StatusKind Kind, string Text, string ToolTip) state) => (state.Kind, state.Text);
|
||||
|
||||
private static FoundCopy Copy(CopyState state, CopyKind kind = CopyKind.LocalServer, int deletedThere = 0, bool gone = false) => new()
|
||||
|
||||
Reference in new issue
Block a user