feat(editor): visual crop, rotate/mirror/flip/straighten, colour looks (owner review 1 phase 4) (#26)
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s

Owner review 1 R5 + R6. Camera rotation, mirror, flip, straighten and crop handles locked to the output; an Exposure Look group; Export output size ("proportions win"); settings format 2 with older-node gates. Also fixes project text and hashes differing between Windows and Linux.

Closes #19
Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #26.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-05 01:09:09 +01:00
1 parent db389a54f2
commit 188b2c2e55
355 files changed
+10549 -1061

No files matched your search

+27 -4
View File
@@ -48,7 +48,7 @@ public sealed class LibraryActions(ShellViewModel shell)
{
if (sequences is [{ Origin: SequenceOrigin.Server, SyncState: SyncState.RemoteOnly } remote])
{
await PostAsync(() => Task.FromResult(new CreateJobRequest(DeepAnalyseKind, [remote.Id], null)), JobKind.DeepAnalyse, remote.DisplayTitle);
await PostAsync(() => Task.FromResult<CreateJobRequest?>(new CreateJobRequest(DeepAnalyseKind, [remote.Id], null)), JobKind.DeepAnalyse, remote.DisplayTitle);
return;
}
await QueueAsync(ProcessingJobs.DeepAnalysis([.. sequences.Select(s => s.Id)], Label(sequences)));
@@ -83,7 +83,14 @@ public sealed class LibraryActions(ShellViewModel shell)
await PostAsync(async () =>
{
var (project, width, height) = await RemoteProjectAsync(remote, sequence.Id);
return new CreateJobRequest(RenderKind, [sequence.Id], ProcessingJobs.Render(sequence, project.Export with { Batch = [] }, width, height).ParametersJson);
var export = project.Export with { Batch = [] };
// As the editor's Render: settings or proportions an older server would render otherwise are not posted.
if (ServerCannotRender(project, export, width, height, Services.Sync.SettingsFormat) is { } newer)
{
shell.Notify(Loc.L("Library.Post.Failed"), newer);
return null;
}
return ServerRender(sequence, project, export, width, height);
}, JobKind.Render, sequence.DisplayTitle);
return;
}
@@ -196,7 +203,23 @@ public sealed class LibraryActions(ShellViewModel shell)
}
/// <summary>Posts a job to the signed-in server, which runs it or hands it to a render node (BRIEF §14.6, §14.7).</summary>
private async Task PostAsync(Func<Task<CreateJobRequest>> build, JobKind kind, string label)
/// <summary>
/// Why a server that reads settings up to <paramref name="serverFormat"/> cannot render <paramref name="project"/> with
/// <paramref name="export"/> as this Chronos would (<see cref="ProcessingJobs.RequiredFormat"/>), localised; null when it can.
/// </summary>
internal static string? ServerCannotRender(ProjectSettings project, ExportSettings export, int sourceWidth, int sourceHeight, int serverFormat) =>
Editor.ServerJobs.NeedsNewerServer(ProcessingJobs.RequiredFormat(project, export, sourceWidth, sourceHeight), serverFormat);
/// <summary>
/// The server render of a remote card: sized on <paramref name="project"/> (the settings just read), which it does not
/// embed, so the server renders the sequence's settings as they are when a node takes the job (the read may come from
/// this PC's proxy cache, older than the server's).
/// </summary>
internal static CreateJobRequest ServerRender(Sequence sequence, ProjectSettings project, ExportSettings export, int sourceWidth, int sourceHeight) =>
new(RenderKind, [sequence.Id], ProcessingJobs.Render(sequence with { SettingsJson = project.ToJson() }, export, sourceWidth, sourceHeight).ParametersJson);
/// <summary>Posts the job <paramref name="build"/> gives; nothing when it gives none (it said why).</summary>
private async Task PostAsync(Func<Task<CreateJobRequest?>> build, JobKind kind, string label)
{
var session = Services.Server;
if (!CanPost || session.Flow is not { Address: { } address, Token: { } token })
@@ -206,7 +229,7 @@ public sealed class LibraryActions(ShellViewModel shell)
}
try
{
var request = await build();
if (await build() is not { } request) return;
using var client = new ChronosClient(address, new CertificatePinning(session.Fingerprints), $"Chronos ({Environment.MachineName})") { Token = token };
await client.CreateJobAsync(request);
shell.Notify(Loc.L("Library.QueuedServer", JobText.Kind(kind), label));