feat(workspace): lay the phase 5c foundation

Phase 5c (owner review 2, R8) is built by six packages in parallel. This
commit settles everything they share, so each one touches its own files:

- job kinds WorkspaceRender (21), WorkspaceSend (22) and WorkspaceMove (23)
  with their wire names, default priorities, notices and parameter records;
  their handlers are registered as skeletons that throw until their
  package lands
- WorkspaceJobOptions and a new CreateHandlers overload; the earlier ones
  stay and default the options
- originals in the media index (an index of phase 5b reads as proxies
  only), their file names, and the exports/renders.json ledger of local
  renders, written atomically
- the optional project and version of an uploaded render
- the workspace settings (size limit, default media, version on render,
  clean-up age, project to open) and when each project was opened, which
  Reset and Import keep and Export leaves out
- WorkspaceHost split into partial files, with stubs for usage, trash and
  the folder move, removal hooks for unsent renders and last originals,
  and a guard that holds work while the workspace moves
- every new string of the phase in English and Italian, with tooltips

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 15:05:09 +01:00
1 parent 102f28b5df
commit 2e1c67f531
43 files changed
+1725 -128

No files matched your search

@@ -341,6 +341,25 @@ public sealed class UploadTests(TestContext context)
Assert.Equal("cancelled", (await state.ReadAsync(ProtocolJson.Default.UploadState)).State);
}
[Test]
public void ARenderOfferOfAnEarlierClientReadsWithoutItsProjectAndAWorkspaceOneKeepsIt()
{
// As a client of phase 5b sends it: no project, no version.
var earlier = System.Text.Json.JsonSerializer.Deserialize("""
{ "renderId": "0192a4c1-7b3e-7cc0-8a51-2f9d0e6b1a01", "fileName": "Roof.mp4", "size": 10, "sha256": "ab", "presetName": "4K HEVC",
"codec": "hevc", "width": 3840, "height": 2160, "fps": 30, "durationSeconds": 10 }
""", ProtocolJson.Default.RenderUploadRequest);
Assert.NotNull(earlier);
Assert.Equal(("Roof.mp4", (Guid?)null, (Guid?)null), (earlier.FileName, earlier.ProjectId, earlier.ProjectVersionId));
var omitted = System.Text.Json.JsonSerializer.Serialize(earlier, ProtocolJson.Default.RenderUploadRequest);
Assert.False(omitted.Contains("projectId", StringComparison.Ordinal), "an offer without a project names none");
var workspace = earlier with { ProjectId = Guid.CreateVersion7(), ProjectVersionId = Guid.CreateVersion7() };
var json = System.Text.Json.JsonSerializer.Serialize(workspace, ProtocolJson.Default.RenderUploadRequest);
Assert.Contains("\"projectVersionId\"", json);
Assert.Equal(workspace, System.Text.Json.JsonSerializer.Deserialize(json, ProtocolJson.Default.RenderUploadRequest));
}
/// <summary>Reports synchronously (Progress&lt;T&gt; posts to the thread pool and may arrive late).</summary>
private sealed class SyncProgress<T>(Action<T> report) : IProgress<T>
{