[Fix] Model settings repeatedly retry when a save fails - #2305
Merged
roomote-roomote[bot] merged 1 commit intoSep 7, 2026
Merged
Conversation
Contributor
daniel-lxs
approved these changes
Sep 7, 2026
daniel-lxs
marked this pull request as ready for review
September 7, 2026 03:18
roomote-roomote
Bot
deleted the
fix/model-settings-save-retry-2zq6caqicgljt
branch
September 7, 2026 03:26
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.
Related issue
No linked issue; maintainer-authorized model-settings recovery investigation.
Why this PR exists
A rejected model-settings save escaped the error handler and immediately retried the unchanged unsaved draft. One preset Apply generated 138 update attempts in a real local browser before the probe was stopped.
What changed
Catch failed saves, restore the last saved draft when available, clear queued retry state, and show the existing generic failure message. Explicitly stop automatic retries after transport or validation failure, including when no saved baseline exists. Successful queued-save behavior is unchanged, and a later deliberate edit can retry normally.
How it was tested
Base
d95a5fd045ff82f81d458256a6a871ec9cda611a; exact head84f0e5eacbaadf6ba775af7464c7d63f8ccb7d65./settings/modelsstimulus: select a mapping preset and Apply while the browser abortstaskModels.updaterequests. Baseline produced 138 attempts before closure. Final diff produced exactly one attempt, the error toast, and restoration of all 16 observed controls. A second deliberate Apply at mobile width produced one additional attempt (total 2), again restored controls. Counts remained stable over bounded two-second observation windows.pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/web exec vitest run src/components/settings/ModelSettingsSection.test.tsx.Screenshots
Actual local desktop UI with injected save-request failure:
Actual local mobile UI after a second deliberate action under the same failure:
Related PRs
Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changesetFull pre-push static gates passed; exact full formatting-inclusive lint and full tsc were not both run. No changeset added in this bounded fix.