Author SHA1 Message Date
Alby96andClaude Opus 5.5 db389a54f2 feat: owner review 2 phase 5c: originals, local render, clean-up and the workspace settings (#18)
CI / Build and test (push) Successful in 9m26s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 8s
Release / Build, test and publish (push) Successful in 14m31s
CI / PostgreSQL 16 integration (push) Successful in 9m53s
CI / PostgreSQL 17 integration (push) Successful in 9m22s
CI / Docker image (push) Successful in 44s
Release / Server image (push) Successful in 1m36s
Originals in the workspace, local render and send home with provenance, the workspace clean-up, size limit and trash, moving the workspace folder, and the complete Settings › Workspace page (owner review 2, R8, phase 5c). One adversarial review round (35 findings, 32 fixed), a copy-cancel race fixed, 184 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>
2026-11-04 20:03:52 +01:00
5 changed files with 15 additions and 3 deletions

No files matched your search

+2
View File
@@ -51,6 +51,8 @@ commits follow Conventional Commits (release notes are generated from them by `C
keeps *Change…* and *Move…* disabled until then. The Server header no longer shows this PC's local renders as server keeps *Change…* and *Move…* disabled until then. The Server header no longer shows this PC's local renders as server
jobs; the *Copying originals* toast's Jobs button works; disabled *Copy originals…* and *Proxies only…* say why. jobs; the *Copying originals* toast's Jobs button works; disabled *Copy originals…* and *Proxies only…* say why.
Italian wording. Italian wording.
- A workspace copy cancelled just before it committed (its last query already answered, the project's lease then free)
could commit anyway and end *Done*, keeping the media it wrote; it now stops at the commit and its clean-up runs.
### Changed ### Changed
- *Pause uploads on metered* (Server screen) is now *Pause metered transfers*: on a metered connection the sync's - *Pause uploads on metered* (Server screen) is now *Pause metered transfers*: on a metered connection the sync's
+2 -1
View File
@@ -803,7 +803,8 @@ public sealed partial class WorkspaceHost
var conflict = status.Conflict is not null || project.OpenConflict() is not null; var conflict = status.Conflict is not null || project.OpenConflict() is not null;
var (unsentRenders, lastOriginals) = await RemovalMediaAsync(project, cancellationToken).ConfigureAwait(false); var (unsentRenders, lastOriginals) = await RemovalMediaAsync(project, cancellationToken).ConfigureAwait(false);
return new WorkspaceRemovalPlan(projectId, name, files, bytes, status.Ahead + status.Damaged, status.Modified, conflict, status.Offline, return new WorkspaceRemovalPlan(projectId, name, files, bytes, status.Ahead + status.Damaged, status.Modified, conflict, status.Offline,
status.State == WorkspaceState.Gone) { UnsentRenders = unsentRenders, LastOriginals = lastOriginals }; status.State == WorkspaceState.Gone)
{ UnsentRenders = unsentRenders, LastOriginals = lastOriginals };
}, cancellationToken); }, cancellationToken);
/// <summary> /// <summary>
@@ -465,6 +465,9 @@ internal sealed class WorkspaceCopyJobHandler(ChronosDatabase db, ArchiveService
// The working state is the editor's meanwhile: it is held only while the media index and the positions move. // The working state is the editor's meanwhile: it is held only while the media index and the positions move.
using (await project.LockAsync(LockWait, ct).ConfigureAwait(false)) using (await project.LockAsync(LockWait, ct).ConfigureAwait(false))
{ {
// The commit point: a cancel that came while the copy waited (a query it did not stop, the lease) wins here,
// so a cancelled copy never commits and its clean-up removes what it wrote.
ct.ThrowIfCancellationRequested();
Commit(project, project.ReadBundle(), media, row.Folder, row.DisplayTitle); Commit(project, project.ReadBundle(), media, row.Folder, row.DisplayTitle);
RemoveStale(project, media, frames); RemoveStale(project, media, frames);
} }
@@ -600,6 +603,9 @@ internal sealed class WorkspaceCopyJobHandler(ChronosDatabase db, ArchiveService
// The working state is the editor's meanwhile: it is held only while the media index and the positions move. // The working state is the editor's meanwhile: it is held only while the media index and the positions move.
using (await project.LockAsync(LockWait, ct).ConfigureAwait(false)) using (await project.LockAsync(LockWait, ct).ConfigureAwait(false))
{ {
// The commit point: a cancel that came while the copy waited (a query it did not stop, the lease) wins here,
// so a cancelled copy never commits and its clean-up removes what it wrote.
ct.ThrowIfCancellationRequested();
Commit(project, project.ReadBundle(), media, folder, sequence.DisplayTitle); Commit(project, project.ReadBundle(), media, folder, sequence.DisplayTitle);
RemoveStale(project, media, frames); RemoveStale(project, media, frames);
} }
@@ -111,7 +111,7 @@ public sealed class DesktopScheduleHostTests(TestContext context)
// Chronos was closed for two days: the missed copy is made once at start (catch-up, as the housekeeping's run; the // Chronos was closed for two days: the missed copy is made once at start (catch-up, as the housekeeping's run; the
// scan has none and just moves on; the workspace clean-up, with catch-up too, runs once as well). // scan has none and just moves on; the workspace clean-up, with catch-up too, runs once as well).
fx.Clock.Advance(TimeSpan.FromDays(2.5)); fx.Clock.Advance(TimeSpan.FromDays(2.5));
Assert.Equal(3,await scheduler.RunDueAsync()); Assert.Equal(3, await scheduler.RunDueAsync());
var job = (await fx.Db.Jobs.ListByScheduleAsync(backup.Id)).Single(); var job = (await fx.Db.Jobs.ListByScheduleAsync(backup.Id)).Single();
Assert.Equal((JobKind.Backup, JobPriority.Background, JobState.Queued), (job.Kind, job.Priority, job.State)); Assert.Equal((JobKind.Backup, JobPriority.Background, JobState.Queued), (job.Kind, job.Priority, job.State));
Assert.Equal(0, await scheduler.RunDueAsync()); Assert.Equal(0, await scheduler.RunDueAsync());
@@ -74,7 +74,10 @@ public sealed class WorkspaceOpenPolicyTests(TestContext context)
UiLanguage.Apply("en"); UiLanguage.Apply("en");
var settings = new AppSettings var settings = new AppSettings
{ {
Language = "en", FirstRunCompleted = true, CheckForUpdates = false, WorkspaceDefaultMedia = BundleMedia.Originals, Language = "en",
FirstRunCompleted = true,
CheckForUpdates = false,
WorkspaceDefaultMedia = BundleMedia.Originals,
}; };
var services = new AppServices(environment, settings, () => { }, new NoDialogs()); var services = new AppServices(environment, settings, () => { }, new NoDialogs());
await services.AttachAsync(await ChronosDatabase.OpenAsync(DatabaseOptions.Sqlite(environment.DatabasePath)), startEngine: true); await services.AttachAsync(await ChronosDatabase.OpenAsync(DatabaseOptions.Sqlite(environment.DatabasePath)), startEngine: true);