feat: single setup, mass-pass progress, per-server homes, Desktop shares its library (owner review 5, v1.1.0) (#68)
CI / Build and test (push) Successful in 11m36s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 12s
Release / Build, test and publish (push) Successful in 14m56s
CI / PostgreSQL 16 integration (push) Successful in 10m11s
CI / PostgreSQL 17 integration (push) Successful in 10m15s
CI / Docker image (push) Successful in 45s
Release / Server image (push) Successful in 4m55s

Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #68.
This commit is contained in:
Alby96 authored and Alby96 committed 2026-11-15 18:11:43 +01:00
1 parent 988068ee8e
commit 20d64af4a4
793 files changed
+23882 -2096

No files matched your search

+7 -1
View File
@@ -17,6 +17,11 @@ public sealed record ServerLimits(long MaxUploadBytes, int ChunkSizeBytes, int P
/// The highest project settings format the server reads and renders (<c>ProjectSettings.CurrentVersion</c>, owner review 1,
/// phase 4); null from an older server, which reads format 1 only. The desktop holds back a push or a render that needs more.
/// </param>
/// <param name="ServerId">
/// The server's stable id (owner review 5, #66): made once, kept in its database, the same whatever address or name it is
/// reached by. A desktop keys the server's homes, links and folders by it. Null from an older server, which a desktop keys by
/// its address.
/// </param>
public sealed record ServerInfo(
string Name,
string Version,
@@ -26,7 +31,8 @@ public sealed record ServerInfo(
IReadOnlyList<string> Formats,
ServerLimits Limits,
IReadOnlyList<string>? Extensions = null,
int? SettingsFormat = null);
int? SettingsFormat = null,
Guid? ServerId = null);
/// <summary>Names of <see cref="ServerInfo.Capabilities"/> that clients act on.</summary>
public static class ServerCapabilities
+5 -1
View File
@@ -17,7 +17,11 @@ namespace Chronos.Protocol;
[JsonDerivedType(typeof(ProjectChangedEvent), "projectChanged")]
public abstract record ServerEvent;
public sealed record JobProgressEvent(Guid JobId, long Done, long Total, double? ItemsPerSecond, double? EtaSeconds) : ServerEvent;
/// <summary>
/// A running job's progress, sent at most twice a second per job. <see cref="Detail"/> (owner review 5, #65): what it does
/// now; appended, absent from an older server, ignored by an older client.
/// </summary>
public sealed record JobProgressEvent(Guid JobId, long Done, long Total, double? ItemsPerSecond, double? EtaSeconds, JobDetailDto? Detail = null) : ServerEvent;
public sealed record JobStateEvent(Guid JobId, string State, string? Error) : ServerEvent;
+21 -4
View File
@@ -1,6 +1,10 @@
namespace Chronos.Protocol;
/// <summary>A job of the queue. <see cref="ScheduleId"/>: the schedule that queued it (owner review 2, R10), absent otherwise.</summary>
/// <summary>
/// A job of the queue. <see cref="ScheduleId"/>: the schedule that queued it (owner review 2, R10), absent otherwise.
/// <see cref="Detail"/>: what it did when its progress was last saved (owner review 5, #65), absent from an older server or
/// for a job whose handler reports none; appended, so an older client ignores it.
/// </summary>
public sealed record JobDto(
Guid Id,
string Kind,
@@ -19,7 +23,17 @@ public sealed record JobDto(
DateTimeOffset Created,
DateTimeOffset? Started,
DateTimeOffset? Finished,
Guid? ScheduleId = null);
Guid? ScheduleId = null,
JobDetailDto? Detail = null);
/// <summary>
/// What a running job does now, beside its overall progress (owner review 5, #65): <see cref="Step"/> and
/// <see cref="PartUnit"/> are kebab-case keys (<c>copy-photo</c>, <c>sequence</c>) each client words in its own language;
/// a key a client does not know reads as none, and the counts still show. <see cref="Item"/> is data (a sequence title, a
/// folder, a file name, a sub-step key), at most 160 characters. <see cref="ItemDone"/> of <see cref="ItemTotal"/> counts
/// the photos inside the item, <see cref="Part"/> of <see cref="Parts"/> the item among the job's parts; 0 of 0 when not counted.
/// </summary>
public sealed record JobDetailDto(string Step, string? Item = null, long ItemDone = 0, long ItemTotal = 0, int Part = 0, int Parts = 0, string? PartUnit = null);
/// <summary><c>POST /api/v1/jobs</c>: kind = render, deep-analyse, proxies, thumbs, verify, scan, rebuild, maintenance…</summary>
public sealed record CreateJobRequest(string Kind, IReadOnlyList<Guid> Target, string? ParametersJson);
@@ -48,8 +62,11 @@ public sealed record RenderNodeDto(Guid Id, string ClientName, string Username,
public sealed record ClaimedJob(JobDto Job, Guid SequenceId, string SettingsJson, string PresetJson, bool UseProxies, IReadOnlyList<ManifestFrame> Frames,
ProxySpec? Proxies = null);
/// <summary><c>POST /api/v1/nodes/{id}/jobs/{jobId}/progress</c>.</summary>
public sealed record NodeProgress(long Done, long Total, double? ItemsPerSecond, string? LogLine);
/// <summary>
/// <c>POST /api/v1/nodes/{id}/jobs/{jobId}/progress</c>. <see cref="Detail"/> (owner review 5, #65): what the node does now;
/// appended, so an older node sends none (the server then shows the counts alone) and an older server ignores it.
/// </summary>
public sealed record NodeProgress(long Done, long Total, double? ItemsPerSecond, string? LogLine, JobDetailDto? Detail = null);
/// <summary><c>POST /api/v1/jobs/{id}/priority</c>: background, normal or user.</summary>
public sealed record JobPriorityRequest(string Priority);
+1
View File
@@ -37,6 +37,7 @@ namespace Chronos.Protocol;
[JsonSerializable(typeof(UploadState))]
[JsonSerializable(typeof(CardImportReport))]
[JsonSerializable(typeof(JobDto))]
[JsonSerializable(typeof(JobDetailDto))]
[JsonSerializable(typeof(Page<JobDto>))]
[JsonSerializable(typeof(CreateJobRequest))]
[JsonSerializable(typeof(RegisterNodeRequest))]