merge: sequence editor with Export tab (preview through the render pipeline, section tabs, autosave with undo/redo)

Keeps the sync captures and sample server next to the editor's sample sunset;
the editor's capture runs last since it leaves an analysis running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 10:58:34 +00:00
commit 8feea5da10
53 files changed
+8622 -18

No files matched your search

+3 -2
View File
@@ -48,9 +48,10 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Job bar (DESIGN §4): current job, progress, time left, pause; "Ready" when idle. -->
<!-- Job bar (DESIGN §4): current job, progress, time left, pause; "Ready" when idle, hidden when idle in the editor. -->
<ui:JobBar Text="{Binding JobText}" Progress="{Binding JobProgress}" IsActive="{Binding IsJobActive}" IsIndeterminate="{Binding IsJobIndeterminate}"
StopCommand="{Binding StopJobCommand}" StopToolTip="{l:Loc Tooltips.Shell.PauseJob}" ActionGlyph="{StaticResource Icon.Pause}" />
StopCommand="{Binding StopJobCommand}" StopToolTip="{l:Loc Tooltips.Shell.PauseJob}" ActionGlyph="{StaticResource Icon.Pause}"
Visibility="{Binding IsJobBarVisible, Converter={StaticResource BoolToVisibility}}" />
<ContentControl Grid.Row="1" Content="{Binding Current}" Focusable="False" />
+64
View File
@@ -4,6 +4,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using Titano.App.DesignTime;
using Titano.App.Editor;
using Titano.App.Server;
using Titano.App.Settings;
using Titano.Core.Diagnostics;
@@ -118,6 +119,8 @@ public static class ScreenCapture
"server-conflict-confirm", theme);
SelectSyncFilter(shell, SyncFilter.All);
}
written += await CaptureEditorAsync(window, shell, sample, directory);
Log.Info("capture", $"{written} screenshot(s) written to {Path.GetFullPath(directory)}");
if (written == 0) Environment.ExitCode = 1;
}
@@ -154,6 +157,67 @@ public static class ScreenCapture
}
}
/// <summary>
/// The sequence editor on the synthetic sunset: every section in both themes (<c>sequence-&lt;tab&gt;-&lt;theme&gt;.png</c>,
/// the Camera tab with a keyframe selected, the Export tab as Export.html with the crop mask and no compare), then
/// the preview overlays, the waveform, the "what changed" toast of Optimise all and the busy state.
/// </summary>
private static async Task<int> CaptureEditorAsync(MainWindow window, ShellViewModel shell, SampleData sample, string directory)
{
var written = 0;
var id = await sample.FillEditorAsync();
shell.OpenSequence(id);
await shell.Sequence.OpenAsync(id);
if (shell.Sequence.Editor is not { } editor)
{
Log.Warning("capture", "The editor sample did not open");
return 0;
}
foreach (var camera in editor.Tabs.OfType<CameraTab>()) camera.SelectedKey = 1;
foreach (var theme in Themes)
{
ThemeManager.Apply(theme);
foreach (var tab in editor.Tabs)
{
editor.SelectedTab = tab;
editor.IsCompare = tab is not ExportTab;
editor.CurrentIndex = tab is ExportTab ? 40 : 45;
written += await SaveEditorAsync(window, editor, directory, "sequence-" + tab.Key.ToLowerInvariant(), theme);
}
editor.SelectedTab = editor.Exposure;
editor.IsCompare = true;
editor.ShowVectors = editor.ShowRegions = true;
written += await SaveEditorAsync(window, editor, directory, "sequence-exposure-overlays", theme);
editor.ShowVectors = editor.ShowRegions = false;
editor.Exposure.ChartMode = ExposureChart.Waveform;
written += await SaveEditorAsync(window, editor, directory, "sequence-exposure-waveform", theme);
editor.Exposure.ChartMode = ExposureChart.Luminance;
editor.OptimiseAllCommand.Execute(null);
written += await SaveEditorAsync(window, editor, directory, "sequence-optimise", theme);
editor.Session.Undo();
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
}
// Last, as it stays: an analysis of the sequence running (settings disabled, viewing tools live).
await sample.MarkAnalysingAsync(id);
await editor.AttachJobsAsync();
foreach (var theme in Themes)
{
ThemeManager.Apply(theme);
written += await SaveEditorAsync(window, editor, directory, "sequence-busy", theme);
}
return written;
}
private static async Task<int> SaveEditorAsync(Window window, EditorViewModel editor, string directory, string screen, AppTheme theme)
{
await Settle(window);
if (!await editor.WhenIdleAsync(TimeSpan.FromSeconds(30))) Log.Warning("capture", $"{screen} was still busy");
return await SaveAsync(window, directory, screen, theme);
}
private static async Task<int> SaveAsync(Window window, string directory, string screen, AppTheme theme, ShellViewModel? waitForThumbnails = null)
{
await Settle(window);
+24 -2
View File
@@ -45,6 +45,7 @@ public sealed class ShellViewModel : LocalizedViewModel
BottomSections = [Settings, About];
_current = Library;
Library.IsSelected = true;
Library.PropertyChanged += OnCurrentChanged;
NavigateCommand = new RelayCommand(p =>
{
@@ -95,7 +96,12 @@ public sealed class ShellViewModel : LocalizedViewModel
get => _current;
private set
{
if (Set(ref _current, value)) OnPropertyChanged(nameof(WindowTitle));
var previous = _current;
if (!Set(ref _current, value)) return;
previous.PropertyChanged -= OnCurrentChanged;
value.PropertyChanged += OnCurrentChanged;
OnPropertyChanged(nameof(WindowTitle));
OnPropertyChanged(nameof(IsJobBarVisible));
}
}
@@ -157,7 +163,17 @@ public sealed class ShellViewModel : LocalizedViewModel
: _queuedCount > 0 ? Loc.L("Shell.JobBar.Ready", _queuedCount) : Loc.L("Shell.JobBar.Idle");
public double JobProgress { get => _jobProgress; private set => Set(ref _jobProgress, value); }
public bool IsJobActive { get => _jobActive; private set => Set(ref _jobActive, value); }
public bool IsJobActive
{
get => _jobActive;
private set
{
if (Set(ref _jobActive, value)) OnPropertyChanged(nameof(IsJobBarVisible));
}
}
/// <summary>The job bar shows "Ready" when idle, except in the editor where it gives its 40 px to the preview (DESIGN §4).</summary>
public bool IsJobBarVisible => _jobActive || _current != Sequence;
public bool IsJobIndeterminate { get => _jobIndeterminate; private set => Set(ref _jobIndeterminate, value); }
/// <summary>Pauses the job the bar shows.</summary>
@@ -217,6 +233,12 @@ public sealed class ShellViewModel : LocalizedViewModel
public void ShowToast(Toast toast) => PendingToasts.Add(toast);
/// <summary>The section on screen renamed itself (the editor opened a sequence): the window title follows.</summary>
private void OnCurrentChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName is nameof(SectionViewModel.Title) or "" or null) OnPropertyChanged(nameof(WindowTitle));
}
/// <summary>A one-line notice with one action (job done, update available).</summary>
public void Notify(string title, string? message = null, string? actionText = null, string? actionToolTip = null, Action? action = null) =>
ShowToast(new Toast