fix(workspace): settle conflicts in one answer and give refused folders a way on

Phase 5a fix round 2 of owner review 2 (desktop):

- Take library's no longer commits the working state first, so a take that
  leaves only the library's values sends no empty version; the working state
  it replaces is kept aside in versions/.replaced, outside the chain.
- Conflicts list this side's value as the working state holds it, so one
  answer settles them instead of asking again for the newer value.
- A conflict of format (library saved by a newer Chronos) offers only Save
  both and Later, says why in its tooltip and shows no raw format numbers.
- Conflict lines count the photos a setting differs on ("Excluded frames
  (3)") instead of dropping the duplicates.
- A read-only library is named as such, not as offline; checkouts from it
  stay editable and their versions wait in the workspace.
- A workspace folder refused inside a library offers Choose folder, and
  Settings > Workspace gets Change...: a plan (projects left, projects found)
  is confirmed before the folder changes; nothing is moved.
- Open in workspace shows the copy's size and the drive's free space, and
  warns when the copy would not fit with its 0.5 GB reserve.
- A cancelled first copy removes the half media it wrote.
- A copy whose project.chronos cannot be read is listed as damaged instead of
  hidden, and goes only through Remove local copy > Discard, after a plan.
- Pruning keeps a version whose archive file is damaged (test added).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-03 11:52:49 +01:00
1 parent 8256b72913
commit 64fc5521c0
30 files changed
+1017 -98

No files matched your search

@@ -153,6 +153,27 @@ public sealed class SyncTextTests
Assert.Equal(0, rows.Count(r => SyncText.Matches(r, SyncFilter.Conflicts, "comet")));
}
[Test]
public void ASettingDifferingOnSeveralPhotosIsOneLineWithTheirCount()
{
var keyframes = new SettingsDifference("pendingFrames.sha:ab12#0.keyframes", "[]", "[{\"x\":1}]");
var lines = SyncText.Differences(
[
new SettingsDifference("pendingFrames.sha:ab12#0.excluded", "true", "false"),
keyframes,
new SettingsDifference("pendingFrames.sha:cd34#0.excluded", "true", "false"),
new SettingsDifference("pendingFrames.sha:ef56#1.excluded", "false", "true"),
new SettingsDifference("pendingFrames.sha:ab12#0.excluded", "true", "false"),
], 10);
// Counted by photo, in the order the settings were met; a setting on one photo keeps its values.
Assert.SequenceEqual(
[Loc.L("Server.Conflict.Count", Loc.L("Server.Setting.ExcludedFrames"), Chronos.App.Infrastructure.Formatting.Count(3)), SyncText.Differences([keyframes], 1)[0]],
lines);
Assert.Contains(Loc.L("Server.Setting.Keyframes"), lines[1]);
Assert.Count(1, SyncText.Differences([new SettingsDifference("pendingFrames.sha:ab12#0.excluded", "true", "false")], 10));
Assert.Contains(Loc.L("Server.Setting.ExcludedFrames"), SyncText.Differences([new SettingsDifference("pendingFrames.sha:ab12#0.excluded", "true", "false")], 10)[0]);
}
[Test]
public void ATransferCountsWhereItsOriginalsAre()
{