fix(web): reconcile a settled modal save, not just a settled toggle
Review round 6 on #2091. The modal writer recorded its write but threw away the settled result, so the mixed-writer overlap was still broken: the modal's flush is in flight with `paginatedLists: true` when the sidebar toggle fails and rolls back to the stale entry's `false`, then the save lands. It is the settled state, but nothing re-applied it — so with the list reload also failing, disk held `true` while the override and the live client sat on `false`. Both writers now share the reconciliation as well as the record: a settled write for the still-active server re-applies its value to the override and the live client. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UL9retfvAXRgvi6EWk4SY4 Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
a935de08dc
commit
2fd6280cdb
1 changed files with 57 additions and 1 deletions
|
|
@ -4228,7 +4228,16 @@ function App() {
|
|||
// reads keep failing. Both settings writers feed the same per-server
|
||||
// record, so a rollback in either takes the most recent write for that
|
||||
// server, not just the most recent write *of its own kind*.
|
||||
write.landed(value);
|
||||
//
|
||||
// And the reconciliation is shared too, for the mixed-writer overlap: a
|
||||
// toggle failing while this save is in flight rolls the UI and the live
|
||||
// client back to a baseline this save then replaces on disk, so a settled
|
||||
// save has to re-apply itself exactly as a settled toggle does (#2089).
|
||||
const settled = write.landed(value);
|
||||
if (settled && activeServerIdRef.current === id) {
|
||||
setPaginatedListsOverride(value.paginatedLists ?? false);
|
||||
inspectorClient?.setServerSettings(value);
|
||||
}
|
||||
},
|
||||
// Surface failures via toast — the modal usually closes
|
||||
// immediately on user dismiss, so a silent fail-on-flush would
|
||||
|
|
|
|||
Loading…
Reference in a new issue