feat(workspace): render a project on this PC from its originals
A workspace project that holds its originals now renders locally (JobKind.WorkspaceRender), so the full-resolution render no longer waits on the home. This holds also when the home is a server. - The handler reads its inputs under the project's lease. It refuses proxies-only media, and it refuses frames without an original, saying how many lack one. It renders into exports/ with unique names and a resumable checkpoint. - Each output gets a ledger entry: SHA-256, the render id from RenderJobHandler.RenderId, and the version, recorded only when versions/ holds it and its hash verifies. - After rendering, the handler queues a WorkspaceSend follow-up for the outputs it recorded. A cancel leaves no partial file. - The editor routes Originals media to the local engine even for a server home, and lists those jobs beside the server's. It treats WorkspaceRender like Render for the toast and the reload, says "Sent home" when a send ends, and shows unsent ledger renders as "Not sent". - Version on render saves a changed project as a version noted "Render" before it renders, and sends it with Sync automatically. With the setting off, the render behaves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0c51d11080
commit
59e7aca006
12 files changed
+779
-32
No files matched your search
@@ -634,7 +634,9 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
var export = batch ? RenderExport : RenderExport with { Batch = [] };
|
||||
var requests = Session.RenderRequests(export);
|
||||
foreach (var request in requests) await Session.SubmitAsync(request with { Priority = priority });
|
||||
if (IsRemote) Shell.Notify(Loc.L("Editor.Render.QueuedServer", ServerName), requests[0].Label);
|
||||
if (Session.Source is IProjectRenders { RendersLocally: true })
|
||||
Shell.Notify(Loc.L("Editor.Render.QueuedLocal"), requests[0].Label, Loc.L("Shell.Nav.Jobs"), Loc.L("Tooltips.Nav.Jobs"), () => Shell.Navigate(SectionKey.Jobs));
|
||||
else if (IsRemote) Shell.Notify(Loc.L("Editor.Render.QueuedServer", ServerName), requests[0].Label);
|
||||
else Shell.Notify(Loc.L("Editor.Render.Queued"), requests[0].Label, Loc.L("Shell.Nav.Jobs"), Loc.L("Tooltips.Nav.Jobs"), () => Shell.Navigate(SectionKey.Jobs));
|
||||
}
|
||||
|
||||
@@ -957,7 +959,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
private void RefreshSteps()
|
||||
{
|
||||
if (_disposed) return;
|
||||
var facts = new PathFacts(Session.Content, Session.Advice, Session.Project, _jobs.Active(JobKind.DeepAnalyse), _jobs.Active(JobKind.Render),
|
||||
var facts = new PathFacts(Session.Content, Session.Advice, Session.Project, _jobs.Active(JobKind.DeepAnalyse), _jobs.Active(JobKind.Render) ?? _jobs.Active(JobKind.WorkspaceRender),
|
||||
_planned ? RenderBlockedReason : null, _rendered.Matches(Session.Project));
|
||||
foreach (var tab in Tabs) tab.SetStep(EditPath.Of(tab.Key, facts));
|
||||
Analysis.OnStepChanged();
|
||||
@@ -1174,7 +1176,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
if (_disposed)
|
||||
{
|
||||
// Closed after the Jobs screen left this render's end to it (FollowsRender): said without a read.
|
||||
if (job is { Kind: JobKind.Render, State: JobState.Done } && _jobs.IsActive(job.Id) && Shell.Jobs.ClaimRenderToast(job.Id))
|
||||
if (job is { State: JobState.Done } && IsRender(job.Kind) && _jobs.IsActive(job.Id) && Shell.Jobs.ClaimRenderToast(job.Id))
|
||||
AnnounceRender(job, read: false);
|
||||
return;
|
||||
}
|
||||
@@ -1186,13 +1188,19 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
if (!wasActive) return;
|
||||
if (job is { Kind: JobKind.DeepAnalyse, State: JobState.Done }) ClearVisited();
|
||||
// A render this editor followed to its end is said here, with its output, unless the Jobs screen said it first.
|
||||
if (job.State == JobState.Done) _ = ReloadAsync(job.Kind == JobKind.Render && Shell.Jobs.ClaimRenderToast(job.Id) ? job : null);
|
||||
if (job.State == JobState.Done) _ = ReloadAsync(IsRender(job.Kind) && Shell.Jobs.ClaimRenderToast(job.Id) ? job : null);
|
||||
// A local render's send home (phase 5c): said once, here or on the Jobs screen.
|
||||
if (job is { Kind: JobKind.WorkspaceSend, State: JobState.Done } && Shell.Jobs.ClaimRenderToast(job.Id)) Shell.Notify(Loc.L("Editor.Render.SentHome"), Title);
|
||||
// An analysis may have written its Auto values into the library's settings (Main): the project takes them or says so.
|
||||
if (job.State == JobState.Done && _project is { } project) _ = project.JobEndedAsync(job);
|
||||
else if (IsRemote && job.State is JobState.Failed or JobState.Cancelled) ReportServerJobEnded(job);
|
||||
else if (IsRemote && job.Kind is not (JobKind.WorkspaceRender or JobKind.WorkspaceSend) && job.State is JobState.Failed or JobState.Cancelled)
|
||||
ReportServerJobEnded(job);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>A render of the sequence: at its home, or on this PC from a workspace project's originals (phase 5c).</summary>
|
||||
private static bool IsRender(JobKind kind) => kind is JobKind.Render or JobKind.WorkspaceRender;
|
||||
|
||||
/// <summary>
|
||||
/// The frames of the server sequence changed while it is open, or a workspace project's sync took a newer Chronos's
|
||||
/// settings (any thread): everything that changes the project is disabled and says why, and a toast says so (for a
|
||||
|
||||
Reference in new issue
Block a user