fix(desktop): preserve incomplete MoA edits - #63867
Conversation
|
Closing with credit — this was fixed on main via PR #64976, but you found and fixed this bug first (a day before the PR we salvaged, #64158, was opened). Your implementation had the same correct shape the merged fix ended up with: cancel the pending autosave while a slot is incomplete, save only once every provider/model pair is complete, and guard against stale save responses overwriting newer edits. The merged version additionally hardens the backend ( Apologies for not catching your PR during the duplicate sweep before salvaging — you were the earliest submitter on the client-side fix and we've noted that in #64976. #63658 is being closed as fixed as well. Thanks for the sharp work, and we hope to see more contributions from you. |
What does this PR do?
Fixes #63658.
Changing a MoA reference or aggregator provider clears its model while the user chooses a replacement. The Desktop previously autosaved that incomplete slot, and the normalized response could remove the row from the UI and
config.yaml.This change keeps incomplete edits in the local draft, saves only after every provider/model pair is complete, and ignores older save responses when the user has already made a newer edit.
Related Issue
Fixes #63658
Type of Change
Changes Made
How to Test
npm --workspace apps/desktop run test:ui -- src/app/settings/model-settings.test.tsx # 11 passed npm --workspace apps/desktop run typecheck npx eslint src/app/settings/model-settings.tsx src/app/settings/model-settings.test.tsx npm --workspace apps/desktop run build npm audit --workspace apps/desktop git diff --checkThe targeted ESLint command exits successfully. The full Desktop lint still reports four existing import-order errors in files outside this PR.
Checklist