feat(editor): open server sequences with proxies, hero frame to the index, export sync and saved copies

Server sequences that are not in the local index open through a RemoteSequenceSource:
proxies from the cache, project from the server's settings with their version (a 409
merges again), analysis report from the server, analyses and renders posted as server
jobs (one per preset) and followed through the server's events. Set hero now reaches the
index (SequenceEdit.HeroFrameId) so the Library card shows it. The Export tab gains the
Sync option (remembered in the project) and restores "Save both" copies through undo.

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 11:38:11 +00:00
1 parent 90321a7e53
commit 2ff3a6503b
36 files changed
+1307 -116

No files matched your search

@@ -0,0 +1,33 @@
using Titano.Protocol;
using Titano.Protocol.Client;
namespace Titano.App.Editor;
/// <summary>
/// The server calls the editor of a server sequence makes (BRIEF §14.3): the sequence and its settings with their
/// version, the analysis report, jobs and events. Failures are <see cref="TitanoApiException"/>s (404 gone, 409 settings
/// changed meanwhile) or network exceptions. The editor disposes its connection when it closes.
/// </summary>
public interface IRemoteSequenceApi : IDisposable
{
Task<SequenceDto> GetSequenceAsync(Guid id, CancellationToken cancellationToken);
/// <summary>The settings JSON and its version, the frames and the renders.</summary>
Task<SequenceManifest> GetManifestAsync(Guid id, CancellationToken cancellationToken);
/// <summary>A 409 <see cref="TitanoApiException"/> means the settings version moved on the server.</summary>
Task<SequenceDto> UpdateSequenceAsync(Guid id, UpdateSequenceRequest request, CancellationToken cancellationToken);
/// <summary>The full deep-analysis report (<c>analysis.json</c>); null when the sequence was never deep-analysed.</summary>
Task<string?> GetAnalysisReportAsync(Guid id, CancellationToken cancellationToken);
Task<JobDto> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken);
Task<JobDto> GetJobAsync(Guid id, CancellationToken cancellationToken);
/// <summary>Jobs waiting or running on the server.</summary>
Task<IReadOnlyList<JobDto>> ListActiveJobsAsync(CancellationToken cancellationToken);
/// <summary>Server events until cancelled or the socket closes.</summary>
IAsyncEnumerable<ServerEvent> EventsAsync(CancellationToken cancellationToken);
}