fix(editor): read inserted frames before a render embeds the project
A render queued before the editor had seen frames inserted under it (a sync download, an import of earlier photos, a scan without an event) embedded the project's positions in the old frame order. Render now checks first that the frames read are still the sequence's (ISequenceSource.FramesCurrentAsync: the row's frames version on this PC, the manifest on a server). On this PC the sequence is read again and the positions follow the frames; a server sequence whose frames changed turns outdated and the render is not queued. Reads of the sequence no longer overlap: a read waits for the one under way, saves that meet new frames read them through the same slot, and they save the project as it is once its positions followed. The frame on screen stays on its photo when frames are inserted or removed before it. Tests: the event-loss test waits for the listener's subscription before dropping the stream, and the conflict tests flush once more after the choice when a retry started before it was still failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
11 files changed
+351
-31
No files matched your search
@@ -44,6 +44,14 @@ public interface ISequenceSource : IAsyncDisposable
|
||||
/// <exception cref="EditorException">The sequence is gone, or its project cannot be read (corrupt, or written by a newer Titano).</exception>
|
||||
Task<SequenceContent> LoadAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the frames <see cref="LoadAsync"/> read last are still the sequence's, in the same order: frames inserted
|
||||
/// or removed since (a sync download, an import of earlier photos, a scan) moved the stored project's positions. A
|
||||
/// server sequence whose frames changed becomes <see cref="IsOutdated"/>.
|
||||
/// </summary>
|
||||
/// <exception cref="EditorException">The sequence is gone.</exception>
|
||||
Task<bool> FramesCurrentAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Frame <paramref name="index"/> in linear light, oriented, long edge at most <paramref name="maxLongEdge"/>; null
|
||||
/// when the frame cannot be read. The caller owns the buffer.
|
||||
|
||||
Reference in new issue
Block a user