feat(P8): integrate phase 5 (workspace stills, strings, prune)

Wire the phase 5 parcels into one working whole.

- Save frame works in a workspace project. WorkspaceSequenceSource now
  makes still jobs (IProjectStills) routed like its renders: with the
  originals on this PC, a WorkspaceRender still into exports/; with
  proxies only, the home's still job with the portable settings and the
  project id. The tooltip for a source that saves no frames is now a real
  string.
- The Export footer has Save project file again for library sequences;
  workspace projects keep it in their project menu only.
- Sync render downloads are hashed and compared with the server's
  sha256 (one retry, then the job fails without filing the file), and
  uploads and downloads carry the render kind, so a saved frame no longer
  counts as a recent preset.
- Add the missing en/it strings: still frame out of the sequence
  (Core and both job handlers), keyframes not applicable, workspace
  stills, Videos refresh / clear sequence / play-from-server tips, the
  videos-folder creation error, and the admin panel kind labels, play
  and trash tips.
- Delete the export history, batch and card strings no longer used from
  English and prune them from every culture.
- Videos: the sequence chip clears only the sequence filter (desktop and
  admin panel), the desktop remembers cards or list, and a Refresh button.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-05 03:16:52 +01:00
1 parent c4924c122e
commit 6d87a1bc6d
111 files changed
+459 -754

No files matched your search

@@ -633,10 +633,13 @@ public sealed class SyncTransferTests(TestContext context)
var remote = f.Remote.Add("Star trails", photos);
var render = new FakeRender(Guid.CreateVersion7(), "Star trails 4K.mp4", "4K HEVC", [.. Enumerable.Range(0, 5000).Select(i => (byte)i)]);
remote.Renders.Add(render);
var still = new FakeRender(Guid.CreateVersion7(), "Star trails - 0002.png", "PNG", [.. Enumerable.Range(0, 700).Select(i => (byte)(i * 5))], RenderKind.Still,
Recorded: string.Empty);
remote.Renders.Add(still);
await f.Sync.LinkAsync(f.Server, remote.Id, local.Id, f.Ct);
await f.RefreshAsync();
var entry = await f.EntryAsync("Star trails");
Assert.Equal((SyncStatus.InSync, 1, 5000L), (entry.Status, entry.Link!.ExportsToGet, entry.Link.ExportsToGetBytes));
Assert.Equal((SyncStatus.InSync, 2, 5700L), (entry.Status, entry.Link!.ExportsToGet, entry.Link.ExportsToGetBytes));
var engine = await f.StartEngineAsync();
var job = await f.Sync.EnqueueDownloadAsync(engine, f.Server, remote.Id, "Star trails", SyncDownloadMode.Exports, null);
@@ -647,7 +650,43 @@ public sealed class SyncTransferTests(TestContext context)
var file = f.Archive.Paths.FromRelative(fetched.OutputPath);
Assert.Equal(Path.Combine(f.Archive.Paths.Sequence(local.Folder).Exports, "Star trails 4K.mp4"), file);
Assert.SequenceEqual(render.Bytes, await File.ReadAllBytesAsync(file, f.Ct));
Assert.Equal((render.Sha256, (string?)null), (fetched.Sha256, fetched.Kind), "the server's hash, checked on arrival");
// A still the server has not hashed: its kind, and the hash of what arrived.
var saved = Assert.Contains(await f.Db.Renders.ListBySequenceAsync(local.Id, f.Ct), r => r.Id == still.Id);
Assert.Equal((Convert.ToHexStringLower(System.Security.Cryptography.SHA256.HashData(still.Bytes)), RenderKind.Still), (saved.Sha256, saved.Kind));
Assert.Equal(0, (await f.EntryAsync("Star trails")).Link!.ExportsToGet);
// A file unlike the hash the server records is fetched again, then refused: nothing is filed.
var damaged = new FakeRender(Guid.CreateVersion7(), "Star trails 1080p.mp4", "1080p", [1, 2, 3, 4], Recorded: new string('a', 64));
remote.Renders.Add(damaged);
remote.UpdatedAt = DateTimeOffset.UtcNow.AddSeconds(1);
job = await f.Sync.EnqueueDownloadAsync(engine, f.Server, remote.Id, "Star trails", SyncDownloadMode.Exports, null);
var failed = await f.Archive.WaitForAsync(job.Id, JobState.Failed);
Assert.Equal(Loc.L("Errors.Sync.Hash", "Star trails 1080p.mp4"), failed.Error);
Assert.Null(await f.Db.Renders.GetAsync(damaged.Id, f.Ct));
Assert.False(File.Exists(Path.Combine(f.Archive.Paths.Sequence(local.Folder).Exports, "Star trails 1080p.mp4")));
}
[Test]
public async Task ASentRenderKeepsItsKind()
{
await using var f = await SyncFixture.CreateAsync(context);
var photos = f.NewPhotos(2);
var local = await f.LocalAsync("Harbour", photos);
var remote = f.Remote.Add("Harbour", photos);
await f.Sync.LinkAsync(f.Server, remote.Id, local.Id, f.Ct);
var exports = f.Archive.Paths.Sequence(local.Folder).Exports;
Directory.CreateDirectory(exports);
byte[] bytes = [.. Enumerable.Range(0, 900).Select(i => (byte)(i * 11))];
await File.WriteAllBytesAsync(Path.Combine(exports, "Harbour - 0001.png"), bytes, f.Ct);
var still = await AddRenderAsync(f, local, "Harbour - 0001.png", bytes.Length, RenderKind.Still);
await f.RefreshAsync();
var engine = await f.StartEngineAsync();
var job = await f.Sync.EnqueueSendExportsAsync(engine, f.Server, local);
await f.Archive.WaitForAsync(job.Id, JobState.Done);
var sent = Assert.Contains(remote.Renders, r => r.Id == still.Id);
Assert.Equal(RenderKind.Still, sent.Kind);
}
[Test]
@@ -1016,7 +1055,7 @@ public sealed class SyncTransferTests(TestContext context)
Assert.Contains(Loc.L("Archive.Log.ProxiesSent", 3, 0), done.LogTail);
}
private static async Task<Render> AddRenderAsync(SyncFixture f, Sequence local, string name, long bytes)
private static async Task<Render> AddRenderAsync(SyncFixture f, Sequence local, string name, long bytes, string? kind = null)
{
var render = new Render
{
@@ -1032,6 +1071,7 @@ public sealed class SyncTransferTests(TestContext context)
Bytes = bytes,
Created = DateTimeOffset.UtcNow,
ProducedBy = "studio",
Kind = kind,
};
await f.Db.Renders.InsertAsync(render, f.Ct);
return render;