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

@@ -99,6 +99,21 @@ public sealed class TitanoClient : IDisposable
public Task<SequenceManifest> GetManifestAsync(Guid id, CancellationToken ct = default) =>
GetAsync($"api/v1/sequences/{id}/manifest", ProtocolJson.Default.SequenceManifest, ct);
/// <summary>The full deep-analysis report of a sequence (<c>analysis.json</c>); null when it was never deep-analysed.</summary>
public async Task<string?> GetAnalysisReportAsync(Guid sequenceId, CancellationToken ct = default)
{
using var response = await SendRawAsync(new HttpRequestMessage(HttpMethod.Get, $"api/v1/sequences/{sequenceId}/analysis/report"), ct).ConfigureAwait(false);
try
{
await EnsureSuccessAsync(response, ct).ConfigureAwait(false);
}
catch (TitanoApiException ex) when (ex.Status == HttpStatusCode.NotFound && ex.Error.Details == "analysis")
{
return null;
}
return await response.Content.ReadAsStringAsync(ct).ConfigureAwait(false);
}
public Task<Page<FrameDto>> ListFramesAsync(Guid sequenceId, string? cursor = null, int limit = 1000, CancellationToken ct = default) =>
GetAsync($"api/v1/sequences/{sequenceId}/frames?limit={limit}{Q("cursor", cursor)}", ProtocolJson.Default.PageFrameDto, ct);
+6 -2
View File
@@ -32,14 +32,18 @@ public sealed record Page<T>(IReadOnlyList<T> Items, string? NextCursor, long? T
/// <summary><c>POST /api/v1/sequences</c>.</summary>
public sealed record CreateSequenceRequest(string? Title, string? CameraHint);
/// <summary><c>PATCH /api/v1/sequences/{id}</c>. <see cref="ExpectedSettingsVersion"/> enables conflict detection (409).</summary>
/// <summary>
/// <c>PATCH /api/v1/sequences/{id}</c>. <see cref="ExpectedSettingsVersion"/> enables conflict detection (409).
/// <see cref="HeroFrameId"/> names the frame the sequence shows (one of its own; <see cref="Guid.Empty"/> clears it).
/// </summary>
public sealed record UpdateSequenceRequest(
string? Title,
IReadOnlyList<string>? Tags,
int? Rating,
string? Notes,
string? SettingsJson,
int? ExpectedSettingsVersion);
int? ExpectedSettingsVersion,
Guid? HeroFrameId = null);
public sealed record FrameDto(
Guid Id,