fix(workspace): close the phase 5c review findings
Originals are now judged by their bytes, never by the media index: a removal or clean-up hashes every file under media/originals and deletes it only when the home holds that SHA-256; every other file, named or not, goes to the workspace trash. Trash entries are filled under a staging name that Empty never lists. A ledger can only name files inside exports/. Jobs follow the workspace: a copy, render or send resolves the folder that holds its project now (a moved workspace, a retry after a move) and waits while a move has not switched yet. A clean-up failure after the switch is a warning that keeps the journal for a later resume; entries that changed since they were copied are kept, and a same-volume rename refused across volumes falls back to copy and verify. Sends map a replayed version by content hash, or go with the project only, and note an old server that drops provenance. The media index (format 2) and project file (format 3) refuse older readers while they hold originals. Metered connections also hold sync downloads and server copies. The editor gains Send again, the Settings page can resume a stopped move, the disabled tooltips say why, and unused strings are pruned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09fcff4eb2
commit
2654683a12
125 files changed
+1618
-401
No files matched your search
@@ -7,7 +7,7 @@ using Chronos.Testing;
|
||||
namespace Chronos.App.Tests.Server;
|
||||
|
||||
/// <summary>
|
||||
/// Which jobs "Pause metered transfers" holds (Server.html, phase 5c): uploads, and the workspace's copies from and renders
|
||||
/// Which jobs "Pause metered transfers" holds (Server.html, phase 5c): uploads, the sync's downloads, and the workspace's copies from and renders
|
||||
/// sent to a server; never a copy from or a send to this PC's archive.
|
||||
/// </summary>
|
||||
public sealed class UploadHoldTests
|
||||
@@ -42,9 +42,11 @@ public sealed class UploadHoldTests
|
||||
public void TransfersWithAServerAreHeld()
|
||||
{
|
||||
Assert.True(UploadHold.Holds(Of(JobKind.UploadCommit)));
|
||||
// The sync's downloads too: the option's tooltip says "uploads and downloads".
|
||||
Assert.True(UploadHold.Holds(Of(JobKind.Download)));
|
||||
Assert.True(UploadHold.Holds(Of(WorkspaceJobs.CopyFromServer(SequenceId, "Harbour", Server, Root, ProjectId))));
|
||||
Assert.True(UploadHold.Holds(Of(WorkspaceJobs.Send(SequenceId, "Harbour", Root, ProjectId, [], Server))));
|
||||
Assert.SequenceEqual([JobKind.UploadCommit, JobKind.WorkspaceCopy, JobKind.WorkspaceSend], UploadHold.Kinds);
|
||||
Assert.SequenceEqual([JobKind.UploadCommit, JobKind.Download, JobKind.WorkspaceCopy, JobKind.WorkspaceSend], UploadHold.Kinds);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -53,7 +55,6 @@ public sealed class UploadHoldTests
|
||||
var sequence = new Sequence { Id = SequenceId, ArchiveId = Guid.CreateVersion7(), Title = "Harbour", Folder = "2026/harbour" };
|
||||
Assert.False(UploadHold.Holds(Of(WorkspaceJobs.Copy(sequence, Root, ProjectId))));
|
||||
Assert.False(UploadHold.Holds(Of(WorkspaceJobs.Send(SequenceId, "Harbour", Root, ProjectId, []))));
|
||||
Assert.False(UploadHold.Holds(Of(JobKind.Download)));
|
||||
Assert.False(UploadHold.Holds(Of(JobKind.Render)));
|
||||
// Parameters that cannot be read are not held: the job fails with its reason.
|
||||
Assert.False(UploadHold.Holds(Of(JobKind.WorkspaceSend, "{not json")));
|
||||
|
||||
Reference in new issue
Block a user