fix(projects): one photo merges as one, newer settings are never merged

A workspace copied before the home hashed or converted a photo named it
differently from the versions the home made since, so a pull merged the
same photo as two: frame edits were silently undone and Keep mine placed
the library's value. Before replaying, the workspace media now learn the
home's hashes (same frame id, size and capture time) and conversion
aliases, so every side names each photo alike. Rebind also gives a
renamed entry the occurrence a placement looks for, so positions on
burst photos keep applying once hashed, and folds entries of one photo
(in Rebind and in the merge's keyed form) instead of keeping one.

Settings of a newer Chronos are no longer merged member by member with
this one's: ProjectMerge refuses when both sides changed. A workspace
pull keeps its local versions and working state untouched and records a
conflict of format that only Save both settles (into a new project of
this format); with nothing local it takes the newer head read-only.
Main's catch-up leaves a newer head and settings written meanwhile as
they are.

When Main's catch-up merge overrides values another writer stored, that
writer's settings are kept as an External version before the Merge one,
so nothing is lost from the history.

Unknown members inside Auto values, camera keyframes and curve points,
and on pending entries once placed, are kept like ProjectSettings' Extra.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-03 10:05:27 +01:00
1 parent 50e28fd63d
commit eac4a36a7b
12 files changed
+905 -38

No files matched your search

+10 -1
View File
@@ -27,7 +27,16 @@ public sealed record WorkspaceSyncState(Guid? RestoredFrom, WorkspaceConflict? C
/// taking the server's (each member or all), or saving both (<see cref="WorkspaceSync.ResolveAsync"/>).
/// </summary>
public sealed record WorkspaceConflict(Guid TheirsVersionId, int TheirsNumber, Guid BaseVersionId, IReadOnlyList<Guid> Mine,
IReadOnlyList<SettingsDifference> Differences, DateTimeOffset Found);
IReadOnlyList<SettingsDifference> Differences, DateTimeOffset Found)
{
/// <summary>
/// The home's head holds settings of a newer Chronos (a difference at <see cref="ProjectMerge.FormatPath"/>): nothing of
/// this workspace's is merged into them. Only Save both settles it (this workspace's versions go to a new project in this
/// Chronos's format), or a Chronos that reads them; keeping mine or taking the server's is refused.
/// </summary>
[JsonIgnore]
public bool NewerFormat => Differences.Any(d => d.Path == ProjectMerge.FormatPath);
}
/// <summary>
/// Parameters of a <see cref="JobKind.WorkspaceCopy"/> job: target = the home's sequence; the workspace folder, the