fix(sync): resolve conflicts against the versions shown, isolate failures, renders on request

- Conflicts are settled against the versions the user was shown; a later change on
  either side refuses the choice and compares again. Title, tags, rating and notes
  changed differently on both sides are a conflict too (no silent tag union).
- Links are written under the engine's gate and forgotten only after a 404; linked
  local copies are read by id; unlinked copies with the same originals are linked
  by content.
- A failure on one sequence is recorded on its link; the others are still compared.
- Downloads hash unverified local copies first and restore originals missing here.
- Background proxy downloads give way to the user's requests; "Keep proxies offline"
  refreshes the caches of sequences opened with proxies, checks free space and backs
  off after a failure.
- Renders travel on request: Send exports (chunked, hash-verified upload keeping the
  render id; new POST /sequences/{id}/renders endpoints) and Get exports.
- Server screen: stable row buttons, mockup column grid, Tab through rows, conflict
  rows first on the card colour, localised conflict detail, Save both confirmation,
  Pause metered uploads, culture switch, Library one-word sync glyphs.

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:26:56 +00:00
1 parent 3601e0a47f
commit 2d40a613b9
48 files changed
+2498 -465

No files matched your search

+8 -10
View File
@@ -79,19 +79,17 @@ public sealed class SyncRulesTests
}
[Test]
public void MetadataMergeUnitesTagsAndTakesTheRestFromTheNewerSide()
public void PayloadDifferencesListTheSequenceFieldsBeforeTheSettings()
{
var mine = new SyncPayload("Harbour", ["sunset", "Harbour"], 3, "mine", SyncFixture.Window41);
var theirs = new SyncPayload("Harbour at dusk", ["harbour", "boats"], 5, null, SyncFixture.Window41);
var theirs = new SyncPayload("Harbour at dusk", ["harbour", "SUNSET"], 3, " mine ", SyncFixture.Window33);
var newerHere = SyncRules.Merge(mine, theirs, localIsNewer: true);
Assert.Equal("Harbour", newerHere.Title);
Assert.Equal(3, newerHere.Rating);
Assert.SequenceEqual(["sunset", "Harbour", "boats"], newerHere.Tags);
var differences = SyncRules.Differences(mine, theirs, 10);
var newerThere = SyncRules.Merge(mine, theirs, localIsNewer: false);
Assert.Equal("Harbour at dusk", newerThere.Title);
Assert.Null(newerThere.Notes);
Assert.True(newerThere.SameMetadata(newerThere with { Tags = ["BOATS", "harbour", "SUNSET"] }), "tags ignore case and order");
Assert.SequenceEqual(["sequence.title", "exposure.deflickerWindow.manual"], differences.Select(d => d.Path));
Assert.Equal(("Harbour", "Harbour at dusk"), (differences[0].Mine, differences[0].Theirs));
Assert.Count(1, SyncRules.Differences(mine, theirs, 1));
Assert.True(mine.SameMetadata(mine with { Tags = ["HARBOUR", "sunset"], Notes = "mine " }), "tags ignore case and order, blanks are trimmed");
Assert.Empty(SyncRules.Differences(mine, mine with { Tags = ["harbour", "SUNSET"] }));
}
}