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:
1 parent
102f28b5df
commit
2e1c67f531
43 files changed
+1725
-128
No files matched your search
@@ -30,6 +30,30 @@ public sealed class JobPriorityQueueTests
|
||||
Assert.Equal(JobKindPriority.Low, (queue with { Levels = new Dictionary<JobKind, JobKindPriority> { [JobKind.Render] = JobKindPriority.Low } }).LevelOf(JobKind.Render));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ALocalRenderAndAWorkspaceMoveGoFirstAndSendingARenderHomeWaitsItsTurn()
|
||||
{
|
||||
var queue = new JobPriorityQueue();
|
||||
// The user waits on a local render as on a render, and Edit is held while the workspace moves.
|
||||
Assert.Equal(JobKindPriority.High, queue.LevelOf(JobKind.WorkspaceRender));
|
||||
Assert.Equal(JobKindPriority.High, queue.LevelOf(JobKind.WorkspaceMove));
|
||||
Assert.Equal(JobKindPriority.Normal, queue.LevelOf(JobKind.WorkspaceSend));
|
||||
var on = queue with { Enabled = true };
|
||||
Assert.True(on.Interrupts(JobKind.WorkspaceRender, JobKind.WorkspaceSend));
|
||||
Assert.False(on.Interrupts(JobKind.WorkspaceSend, JobKind.Scan));
|
||||
// The defaults are no change: settings store none of them, and read back as they are.
|
||||
var defaults = new Dictionary<JobKind, JobKindPriority>
|
||||
{
|
||||
[JobKind.WorkspaceRender] = JobKindPriority.High,
|
||||
[JobKind.WorkspaceSend] = JobKindPriority.Normal,
|
||||
[JobKind.WorkspaceMove] = JobKindPriority.High,
|
||||
};
|
||||
Assert.Empty(JobPriorityQueue.Changed(defaults));
|
||||
var changed = JobPriorityQueue.Changed(new Dictionary<JobKind, JobKindPriority> { [JobKind.WorkspaceSend] = JobKindPriority.Low });
|
||||
Assert.Equal("low", changed["workspace-send"]);
|
||||
Assert.Equal(JobKindPriority.Low, JobPriorityQueue.From(true, changed).LevelOf(JobKind.WorkspaceSend));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OnlyAHigherLevelInterruptsAndOnlyWhileTheQueueIsOn()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user