feat(jobs): show what mass passes do now on the desktop, the server section and the admin panel

A running job now says what it does now: "Verifying photo 812 of 2,400 · Harbour sunset · sequence 3 of 41". A paused or
failed job says where it stopped. The line appears in the Jobs table under the target, in the job bar (at most 60
characters, the item dropped first, the bar text also its tooltip), in the Archive's recent maintenance (refreshed at
most twice a second), in the editor's server-job line and in the sync tooltip. Byte jobs now count sizes in the bar.

While connected, the Server section lists the server's running and paused jobs, live through the jobs API and the
jobProgress events. Pause, Resume and Cancel are offered only to an account that manages the archive, which is what
the server requires to act on someone else's job; for any other account the list is read-only. The list hides while
nothing runs, and the capture gains a server-jobs scene.

The admin panel's Jobs page and dashboard show the same line under the target and update it with every progress event.
The steps, parts and sub-steps are in English and Italian, and an unknown step shows its counts only.

Refs #65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-15 13:42:47 +01:00
1 parent ee9505df22
commit b95bc997d5
36 files changed
+1895 -28

No files matched your search

+13 -1
View File
@@ -14,7 +14,8 @@ namespace Chronos.App.Sections;
/// <summary>
/// Server (BRIEF §12.7, Server.html): address with LAN-discovered servers, connect with trust-on-first-use and login,
/// status (name, version, latency, certificate), account and quota, sign out, the options of this PC (render node,
/// proxies kept offline, automatic project sync, uploads paused on metered networks) and the sync table (<see cref="Sync"/>).
/// proxies kept offline, automatic project sync, uploads paused on metered networks), the server's running and paused jobs
/// (<see cref="Jobs"/>) and the sync table (<see cref="Sync"/>).
/// The rail badge counts the settings conflicts waiting for a choice.
/// </summary>
public sealed class ServerViewModel : SectionViewModel
@@ -41,11 +42,19 @@ public sealed class ServerViewModel : SectionViewModel
Sync = new SyncTableViewModel(shell);
_conflicts = Sync.Chips.Single(c => c.Filter == SyncFilter.Conflicts);
_conflicts.PropertyChanged += OnConflictsChanged;
Jobs = new ServerJobsViewModel(() => ServerJobsViewModel.AccountOf(Session), () => JobsConnection(Session), SynchronizationContext.Current,
(title, message) => Shell.Notify(title, message, isError: true));
}
/// <summary>Sequences of this PC and of the server, where they stand and what can be done.</summary>
public SyncTableViewModel Sync { get; }
/// <summary>The server's running and paused jobs, live (owner review 5, #65).</summary>
public ServerJobsViewModel Jobs { get; }
/// <summary>Opens the job list's connection for a session; the screenshots put the sample server's jobs here.</summary>
internal Func<ServerSession, IServerJobsApi?> JobsConnection { get; set; } = ServerJobsViewModel.ConnectionOf;
public ShellViewModel Shell { get; }
private ServerSession Session => _session ?? Shell.Services.Server;
@@ -212,6 +221,7 @@ public sealed class ServerViewModel : SectionViewModel
if (!Shell.Services.Environment.IsCapture) _session.StartDiscovery();
Shell.Settings.Encoders.CollectionChanged += OnEncodersChanged;
Sync.Attach();
Jobs.Refresh();
await _session.RestoreAsync();
if (_session.Flow.Error is not ConnectError.None and var error && !_session.IsConnected) ErrorText = ServerSession.ErrorText(error, _session.Flow.Address);
}
@@ -222,6 +232,7 @@ public sealed class ServerViewModel : SectionViewModel
if (_session is not null) _session.PropertyChanged -= OnSessionChanged;
Shell.Settings.Encoders.CollectionChanged -= OnEncodersChanged;
Sync.Dispose();
Jobs.Dispose();
base.Dispose();
}
@@ -278,6 +289,7 @@ public sealed class ServerViewModel : SectionViewModel
{
OnAllPropertiesChanged();
CommandManager.InvalidateRequerySuggested();
Jobs.Refresh();
}
/// <summary>The <see cref="Core.Model.UserRole"/> name of a server role, or null for a role this build does not know.</summary>