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

+5 -1
View File
@@ -430,7 +430,11 @@
ToolTip="{Binding SendAgainToolTip}" ToolTipService.ShowOnDisabled="True" Margin="0,0,6,0"
Visibility="{Binding HasUnsent, Converter={StaticResource BoolToVisibility}}" />
<TextBlock Text="{l:Loc Editor.Render.NotSent}" Style="{StaticResource Text.Faint}" FontSize="{StaticResource Size.Chip}" VerticalAlignment="Center"
ToolTip="{Binding UnsentToolTip}" Visibility="{Binding HasUnsent, Converter={StaticResource BoolToVisibility}}" />
ToolTip="{Binding UnsentToolTip}" Visibility="{Binding HasUnsent, Converter={StaticResource BoolToVisibility}}" Margin="0,0,12,0" />
<!-- A .chronos project file that opens this sequence with these settings (BRIEF §18); a workspace project has it in its project ▾ menu. -->
<Button Style="{StaticResource Button.Link}" Content="{l:Loc Editor.ProjectFile.Save}" Command="{Binding SaveProjectCommand}"
ToolTip="{Binding SaveProjectToolTip}" ToolTipService.ShowOnDisabled="True"
Visibility="{Binding Editor.HasProject, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
</WrapPanel>
</StackPanel>
</Border>
+2 -2
View File
@@ -266,8 +266,8 @@ public sealed class EditorSession : IAsyncDisposable
/// <summary>
/// A source can save one frame as an image (owner review 1, R8, "Save frame"): a sequence of this PC or of a server, or a
/// source that makes its own still jobs (<see cref="IProjectStills"/>). A workspace project renders at its home with
/// its portable settings (<see cref="IProjectRenders"/>) and saves no frame until it makes still jobs of its own.
/// source that makes its own still jobs (<see cref="IProjectStills"/>, a workspace project). A source that renders
/// elsewhere (<see cref="IProjectRenders"/>) without still jobs of its own saves none.
/// </summary>
public bool CanSaveFrames => Source is IProjectStills or not IProjectRenders;
+5 -3
View File
@@ -696,7 +696,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
/// <summary>
/// Why the frame under the cursor cannot be saved now (<see cref="RenderMenu.SaveFrameBlockedReason"/>): out of date or
/// read-only, no frame the render keeps under the cursor, a workspace project, no right to render on the server or a
/// read-only, no frame the render keeps under the cursor, a source that saves no frames, no right to render on the server or a
/// server too old for still jobs (format 3), a wrong file name; null when it can.
/// </summary>
public string? SaveFrameBlockedReason
@@ -705,7 +705,9 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
{
var hasFrame = FrameCount > 0 && !Session.Project.ExcludedFrames.Contains(CurrentIndex) && !Session.Content.NotRenderable().Contains(CurrentIndex);
string? server = null;
if (IsRemote && Session.CanSaveFrames)
// A workspace project saving the frame on this PC from its originals (phase 5c) uses this PC's engine: the
// server's format does not decide, as for its renders.
if (IsRemote && Session.CanSaveFrames && Session.Source is not IProjectRenders { RendersLocally: true })
{
var sync = Shell.Services.Sync;
server = !sync.CanRender ? Loc.L("Tooltips.Editor.Render.NoRight", ServerName)
@@ -836,7 +838,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
if (Session.StillRequests(RenderExport with { Batch = [] }, codec, index) is not [_, ..] requests) return;
foreach (var request in requests) await Session.SubmitAsync(request);
var label = requests[0].Label + Loc.Separator + EditorText.Position(index, FrameCount);
if (IsRemote) Shell.Notify(Loc.L("Editor.Still.Queued"), label);
if (IsRemote && Session.Source is not IProjectRenders { RendersLocally: true }) Shell.Notify(Loc.L("Editor.Still.Queued"), label);
else Shell.Notify(Loc.L("Editor.Still.Queued"), label, Loc.L("Shell.Nav.Jobs"), Loc.L("Tooltips.Nav.Jobs"), () => Shell.Navigate(SectionKey.Jobs));
}
+5 -1
View File
@@ -80,10 +80,14 @@ public static class ExportRules
/// <summary>Only the hardware codecs have a rate control, a keyframe interval and B-frames to choose.</summary>
public static bool HasRateControl(VideoCodec codec) => !VideoCodecInfo.IsManaged(codec);
/// <summary>Why <paramref name="codec"/> has no rate control or keyframe interval to choose; null when it has.</summary>
/// <summary>Why <paramref name="codec"/> has no rate control to choose; null when it has.</summary>
public static string? RateControlBlocked(VideoCodec codec) =>
HasRateControl(codec) ? null : Loc.L("Tooltips.Export.RateControlNA", Loc.L("Export.Codec." + codec));
/// <summary>Why <paramref name="codec"/> has no keyframe interval to choose (as it has no rate control); null when it has.</summary>
public static string? KeyframesBlocked(VideoCodec codec) =>
HasRateControl(codec) ? null : Loc.L("Tooltips.Export.KeyframesNA", Loc.L("Export.Codec." + codec));
/// <summary>
/// Why <paramref name="codec"/> with <paramref name="profile"/> takes no B-frames (Baseline, MJPEG, GIF, APNG and the
/// image sequences); null when it does.
+1 -1
View File
@@ -476,7 +476,7 @@ public sealed class ExportTab : EditorTab
}
}
public string KeyframesToolTip => ExportRules.RateControlBlocked(Resolved.Codec) ?? Loc.L("Tooltips.Export.Keyframes");
public string KeyframesToolTip => ExportRules.KeyframesBlocked(Resolved.Codec) ?? Loc.L("Tooltips.Export.Keyframes");
/// <summary>Auto (the preset's), then 0 to 4.</summary>
public IReadOnlyList<Choice> BFrameChoices { get => _bFrameChoices; private set => Set(ref _bFrameChoices, value); }
@@ -126,6 +126,8 @@ public sealed class RemoteSequenceSource : ISequenceSource
Bytes = r.Bytes,
Created = r.Created,
ProducedBy = r.ProducedBy,
Sha256 = r.Sha256,
Kind = r.Kind,
}).ToList();
var (deep, otherFrames) = Report(report, frames.Count);
return new SequenceContent(sequence, frames, project, LightAnalyzer.Analyze(frames), deep, context.SourceWidth, context.SourceHeight, null, renders, [])
+1 -2
View File
@@ -287,8 +287,7 @@ public static class RenderMenu
if (outdated) return Loc.L("Tooltips.Editor.Outdated", server);
if (readOnly) return Loc.L("Tooltips.Export.StillReadOnly");
if (!hasFrame) return Loc.L("Tooltips.Export.StillNeedsFrame");
// Missing key Tooltips.Export.StillWorkspace (a workspace project saves no frame yet): the closest reason until P8 adds it.
if (!sourceSavesFrames) return Loc.L("Tooltips.Export.StillReadOnly");
if (!sourceSavesFrames) return Loc.L("Tooltips.Export.StillWorkspace");
if (serverReason is not null) return serverReason;
return nameError is null ? null : Loc.L("Tooltips.Editor.Render.NameError", nameError);
}
@@ -11,6 +11,7 @@ using Chronos.Core.Localization;
using Chronos.Core.Model;
using Chronos.Core.Project;
using Chronos.Core.Render;
using Chronos.Core.Video;
using Chronos.Data;
using Chronos.Data.Archiving;
using Chronos.Data.Archiving.Jobs;
@@ -74,7 +75,7 @@ public sealed class WorkspaceServerHome(Func<IRemoteSequenceApi?> connect, Func<
/// are read from the server when it can be reached (else the copy the workspace took), and "Update media" is offered when
/// the server's frames moved, or it has the proxy of a frame a thumbnail stands in for.
/// </summary>
public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders
public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders, IProjectStills
{
private const int JobsListed = 200;
@@ -292,6 +293,8 @@ public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders
Bytes = r.Bytes,
Created = r.Created,
ProducedBy = r.ProducedBy,
Sha256 = r.Sha256,
Kind = r.Kind,
}).ToList() ?? [];
renders = [.. renders.Concat(UnsentOf(session.Project, home.SequenceId)).OrderByDescending(r => r.Created)];
var (deep, otherFrames) = ServerReport(report, session.Project.AnalysisPath, frames.Count);
@@ -618,6 +621,35 @@ public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders
];
}
/// <summary>
/// "Save frame" of a workspace project (owner review 1, R8, decision 12), routed as its renders are: media holding the
/// originals save the frame on this PC into the project's <c>exports/</c> (a <see cref="JobKind.WorkspaceRender"/> still,
/// recorded in its ledger and sent home after, naming the head version when it holds these settings); media of proxies
/// have the home save it from its originals (this PC's archive, or the server). Either way the job carries the project's
/// portable settings (positions parked by photo, placed on the frames that render) and the project, the frame by its
/// position in the media and by its photo, whose hash wins at a home whose frames are in another order.
/// </summary>
public IReadOnlyList<ArchiveJobRequest> StillRequests(Sequence sequence, ProjectSettings project, ExportSettings export, VideoCodec codec, int frameIndex,
string? photoSha256, int sourceWidth, int sourceHeight)
{
ArgumentNullException.ThrowIfNull(sequence);
ArgumentNullException.ThrowIfNull(project);
ArgumentNullException.ThrowIfNull(export);
var portable = ProjectContent.ToPortable(project with { Export = export }, Photos);
var request = ProcessingJobs.Still(sequence, export, codec, frameIndex, photoSha256, sourceWidth, sourceHeight, project with { Export = export });
var parameters = JsonSerializer.Deserialize(request.ParametersJson!, ProtocolJson.Default.RenderJobParameters)!
with
{ SettingsJson = portable, ProjectId = ProjectId, ProjectVersionId = null };
if (RendersLocally && Workspace is { } workspace)
{
var head = HeadVersion(portable);
var json = JsonSerializer.Serialize(parameters with { ProjectVersionId = head }, ProtocolJson.Default.RenderJobParameters);
var home = workspace.Home;
return [WorkspaceJobs.Render(home.SequenceId, request.Label ?? sequence.DisplayTitle, _sync.Store.Root, ProjectId, head, json, home.IsArchive ? null : home.Server)];
}
return [request with { ParametersJson = JsonSerializer.Serialize(parameters, ProtocolJson.Default.RenderJobParameters) }];
}
/// <summary>The id of the newest version the workspace holds when it holds <paramref name="portable"/> (any line ends); null otherwise.</summary>
private Guid? HeadVersion(string portable)
{
@@ -657,6 +689,8 @@ public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders
ProducedBy = Environment.MachineName,
ProjectId = e.ProjectId,
ProjectVersionId = e.ProjectVersionId,
Sha256 = e.Sha256,
Kind = e.Kind,
}),
];
}