fix(editor): read the proxy cache off the UI thread; the Sync gate is known before the job list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
2 files changed
+7
-3
No files matched your search
@@ -131,7 +131,9 @@ public sealed class SequenceViewModel : SectionViewModel
|
||||
return local;
|
||||
}
|
||||
var sync = services.Sync;
|
||||
if (sync.Server is not { } server || sync.Service?.OpenRemote(server, sequenceId) is not { } remote) throw new InvalidOperationException(Loc.L("Editor.Error.Missing"));
|
||||
// The proxy cache's index and files are read off the UI thread.
|
||||
if (sync.Server is not { } server || sync.Service is not { } service || await Task.Run(() => service.OpenRemote(server, sequenceId)) is not { } remote)
|
||||
throw new InvalidOperationException(Loc.L("Editor.Error.Missing"));
|
||||
// An editor whose saves the server refuses would only lose edits.
|
||||
if (!sync.Policy.CanEdit) throw new InvalidOperationException(Loc.L("Editor.Error.RemoteReadOnly"));
|
||||
var api = sync.ConnectEditor() ?? throw new InvalidOperationException(Loc.L("Editor.Error.Missing"));
|
||||
|
||||
Reference in new issue
Block a user