Repository navigation
fix(web): quick back-to-back settings changes no longer undo each other - #256
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
AadiJo
force-pushed
the
optimistic-settings-saves
branch
from
November 13, 2026 20:58
ff3d160 to
e345095
Compare
AadiJo
force-pushed
the
optimistic-settings-saves
branch
from
November 15, 2026 04:43
e345095 to
1022285
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing a setting before an earlier save was answered could undo the earlier change. Each save sends whole maps such as
providerInstances, built from the client's copy of the settings, and that copy only moved when the server's settings stream delivered. On a slow connection, turning Codex off and then Claude off in Settings > Providers left Codex back on.The settings hooks now apply patches that are sent and not yet answered, so every reader, and the next save, builds on them. Once a save is answered, the server's answer stands in until the settings stream delivers its own update. Without that, each saved change flips back for a moment, because the answer arrives just before the stream update. A save the server rejects is dropped again.
Proof: the new
apps/server/scripts/settings-save-race-e2e.tsholds the server's WebSocket replies, turns Codex off and then Claude off, and releases them. Before: both switches stayed on while held, and Codex ended up on with its saved entry gone. After: both read off at once, both save as off, and neither flips back while the answers arrive (3 of 3 runs). Typecheck,vp checkand the web suite (1900 tests) pass. A rejected save is not covered by a test.Known limitation: if a save's stream update were delivered after a later save's answer, the later change would show as undone until its own stream update arrives. The server publishes each save's update before it answers that save, and the app sends the next save only after that answer, so no ordinary sequence is known to produce this.
Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on high. Sol verdict: approved
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.