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:
Alby96andClaude Opus 5.5 committed 2026-11-17 19:20:30 +01:00
1 parent 3c99badcfe
commit 2c06e7ac2b
171 files changed
+1591 -218

No files matched your search

@@ -30,6 +30,12 @@ internal sealed record MergeReplace(string Key, Guid KeepFrameId, string FileNam
/// <summary>A drop original the verify found in the kept sequence: its SHA-256 now and the keep frame that holds it.</summary>
internal sealed record MergeVerified(string Sha256, Guid KeepFrameId);
/// <summary>
/// What a merge's links stage changes, read before it: the session keys each manifest held, the other's archive, and the
/// rows <see cref="FoundCopyStore.MoveToKeptAsync"/> moves (<see cref="MoveUndo"/>).
/// </summary>
internal sealed record MergeLinksUndo(List<string> KeepKeysBefore, List<string> DropKeysBefore, Guid DropArchiveId, MoveUndo Moved);
/// <summary>
/// The journal of a merge (owner review 6, #73; design §5d): <c>&lt;keep archive&gt;/.chronos/journal/merge-&lt;job:N&gt;.json</c>,
/// written atomically (temp + rename) after each step. It keeps what the confirmed plan decided (a resumed run never plans
@@ -123,6 +129,12 @@ internal sealed class MergeJournal
public bool LinksMoved { get; set; }
/// <summary>
/// What the links stage takes from the other sequence, read before its first change: a merge abandoned after it (a check
/// before the trash fails, a cancel) gives it back, so the other keeps its keys, links and pairs. Null before the stage.
/// </summary>
public MergeLinksUndo? LinksUndo { get; set; }
/// <summary>The journal of job <paramref name="jobId"/> in the archive at <paramref name="paths"/>.</summary>
public static string PathFor(ArchivePaths paths, Guid jobId) => Path.Combine(paths.JournalDirectory, $"merge-{jobId:N}.json");