feat: owner review 2 phase 5b: the server as a project home (#17)
CI / Build and test (push) Successful in 9m58s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 14m8s
CI / PostgreSQL 16 integration (push) Successful in 8m55s
CI / PostgreSQL 17 integration (push) Successful in 8m50s
CI / Docker image (push) Successful in 57s
Release / Server image (push) Successful in 1m22s

A Chronos Server keeps its sequences' projects, as a PC's archive does: Main and named projects with versions under /api/v1/sequences/{id}/projects, the projects capability and the projectChanged event. The desktop opens a server's sequences in the workspace (proxies downloaded, hash-checked, resumable) with Save version, Sync, conflicts, History, Restore and the project actions against the server. Renders can be of a project version. The admin panel lists a sequence's projects and versions. Strings in all 38 languages.

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 #17.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-04 14:58:11 +01:00
1 parent 255e149087
commit 81c303f484
325 files changed
+11477 -516

No files matched your search

@@ -48,8 +48,10 @@ public sealed class SyncTextTests
{
Assert.SequenceEqual([SyncAction.Upload], SyncText.Actions(Entry(SyncStatus.LocalOnly, link: null), Editor));
Assert.Empty(SyncText.Actions(Entry(SyncStatus.LocalOnly, link: null), Viewer));
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.DownloadOriginals], SyncText.Actions(Entry(SyncStatus.RemoteOnly, local: null), Editor));
Assert.SequenceEqual([SyncAction.OpenWithProxies], SyncText.Actions(Entry(SyncStatus.ProxiesOnly, local: null), Viewer));
// A server that keeps no projects opens its sequences with proxies; the workspace is offered disabled (owner review 2, R8).
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.DownloadOriginals, SyncAction.OpenInWorkspace],
SyncText.Actions(Entry(SyncStatus.RemoteOnly, local: null), Editor));
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.OpenInWorkspace], SyncText.Actions(Entry(SyncStatus.ProxiesOnly, local: null), Viewer));
Assert.SequenceEqual([SyncAction.Upload], SyncText.Actions(Entry(SyncStatus.LocalAhead, Link with { MissingRemote = 4 }), Editor));
Assert.SequenceEqual([SyncAction.DownloadOriginals], SyncText.Actions(Entry(SyncStatus.ServerAhead, Link with { MissingLocal = 2 }), Editor));
Assert.SequenceEqual([SyncAction.SyncSettings], SyncText.Actions(Entry(SyncStatus.ServerAhead), Editor));
@@ -74,6 +76,39 @@ public sealed class SyncTextTests
Assert.SequenceEqual([SyncAction.Resume], SyncText.Actions(Entry(SyncStatus.Transferring, transfer: Upload(JobState.Paused)), Editor));
}
[Test]
public async Task AServerThatKeepsProjectsOpensItsSequencesInTheWorkspace()
{
// Owner review 2, R8, phase 5b: the workspace replaces Open with proxies, and the originals can still come down.
var projects = Editor with { KeepsProjects = true };
Assert.SequenceEqual([SyncAction.OpenInWorkspace, SyncAction.DownloadOriginals], SyncText.Actions(Entry(SyncStatus.RemoteOnly, local: null), projects));
// An account that may not edit only looks, with proxies: it is offered no workspace copy it could not push.
Assert.SequenceEqual([SyncAction.OpenWithProxies], SyncText.Actions(Entry(SyncStatus.ProxiesOnly, local: null), Viewer with { KeepsProjects = true }));
Assert.SequenceEqual([SyncAction.OpenWithProxies], SyncText.Actions(Entry(SyncStatus.RemoteOnly, local: null), Viewer with { KeepsProjects = true }));
Assert.True(SyncText.IsEnabled(SyncAction.OpenInWorkspace, projects), "a server that keeps projects opens them");
Assert.Equal(Loc.L("Tooltips.Server.Sync.OpenInWorkspace"), SyncText.ToolTip(Entry(SyncStatus.RemoteOnly, local: null), SyncAction.OpenInWorkspace, projects));
// An older server's row says why its workspace action is disabled; the other actions are not.
Assert.False(SyncText.IsEnabled(SyncAction.OpenInWorkspace, Editor), "an older server keeps no projects");
Assert.True(SyncText.IsEnabled(SyncAction.OpenWithProxies, Editor), "proxies open as before");
Assert.Equal(Loc.L("Tooltips.Server.Sync.OpenInWorkspace.NoProjects"), SyncText.ToolTip(Entry(SyncStatus.RemoteOnly, local: null), SyncAction.OpenInWorkspace, Editor));
// The row's button is disabled with its reason, and enabled once the server keeps projects.
var acted = new List<SyncAction>();
var row = new SyncRow(Entry(SyncStatus.RemoteOnly, local: null), Editor, (_, action) =>
{
acted.Add(action);
return Task.CompletedTask;
});
var workspace = row.Actions.Single(a => a.Action == SyncAction.OpenInWorkspace);
Assert.Equal((false, Loc.L("Tooltips.Server.Sync.OpenInWorkspace.NoProjects")), (workspace.Command.CanExecute(null), workspace.ToolTip));
row.Update(Entry(SyncStatus.RemoteOnly, local: null), projects);
workspace = row.Actions.First();
Assert.Equal((SyncAction.OpenInWorkspace, true), (workspace.Action, workspace.Command.CanExecute(null)));
workspace.Command.Execute(null);
await Task.Yield();
Assert.SequenceEqual([SyncAction.OpenInWorkspace], acted);
}
[Test]
public void ColumnsSayWhatEachSideHolds()
{