feat(editor): settings both sides changed on the server ask before anything is overwritten
BRIEF §14.5 asks for an explicit conflict prompt when both sides changed. A save of a server sequence that meets settings someone changed to other values on the server now stops (the change stays pending) and the editor asks: Keep mine saves the editor's values over the server's, Take server (the safe default) shows the server's values as one undoable step, so Ctrl+Z brings the editor's back. Both first take in what only the server changed. Settings changed on one side only still merge silently; a reload after an analysis never merges over a conflicting pending change. The Export "Sync" box moves under Save to so neither is cut in longer languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
13 files changed
+311
-32
No files matched your search
@@ -44,6 +44,9 @@ internal sealed class FakeRemoteSequenceApi(Sequence sequence, IReadOnlyList<Gui
|
||||
/// <summary>Thrown by the next read of a job (a failure the editor's event listener does not expect).</summary>
|
||||
public Exception? FailNextJobRead { get; set; }
|
||||
|
||||
/// <summary>Thrown by the next edit before it reaches the server (the connection dropped).</summary>
|
||||
public Exception? FailNextEdit { get; set; }
|
||||
|
||||
/// <summary>Someone else edits the settings before each of the next edits reaches the server (it is refused with 409).</summary>
|
||||
public Queue<Func<string?, string>> EditsBefore { get; } = new();
|
||||
|
||||
@@ -78,6 +81,11 @@ internal sealed class FakeRemoteSequenceApi(Sequence sequence, IReadOnlyList<Gui
|
||||
lock (_gate)
|
||||
{
|
||||
Check(id);
|
||||
if (FailNextEdit is { } failure)
|
||||
{
|
||||
FailNextEdit = null;
|
||||
throw failure;
|
||||
}
|
||||
if (EditsBefore.TryDequeue(out var theirs))
|
||||
{
|
||||
SettingsJson = theirs(SettingsJson);
|
||||
|
||||
Reference in new issue
Block a user