fix: 避免恢复默认被尚未完成的旧调配同步覆盖

This commit is contained in:
星闌 committed 2026-10-11 16:11:00 +08:00
1 parent bc50cac01f
commit 19c854c1f7
5 files changed
+204 -3

No files matched your search

+14
View File
@@ -274,3 +274,17 @@ enemy: picking emitted a unit click with no definition, instead of the tile clic
engine-canvas regression retains the card/100 HP assertions and also covers another field refresh, live HP loss and
closing the card when the crate is destroyed. Device metadata supplied by the new entry still wins; changing fields
does not carry old devices across. Gameplay and allied targeting rules are unchanged.
### 29.15 Loadout sync preparation after a reset
`ui/loadoutSync.js` previously captured sanitised entries before awaiting backups, but assigned the request sequence
after that wait. With a saved non-default skill and potential, the loadout header's restore-all button remains
available while backups downloads (chess already ready, detail still hidden). A confirmed reset sends empty entries
and ops; the old preparation can then send the old skill with empty ops, leaving the browser showing zero changes
and synced while the session and next match use the old skill. Reproduced in production v0.2.4 using normal screen
controls in headless Chrome with a controlled backups HTTP download delay; no game-state or message injection.
Edits and welcomes now invalidate waiting preparation before it can send or report missing/failed data. Current
preparation, debounce/close flush, in-flight request ordering, deduplication and retry/lock semantics are retained.
`test/ui/loadout-sync-stale.test.js` covers reset, newer nonempty edits, debounce, stale failures, welcome and RATE
retry, with current missing-data and unrelated-screen-change controls. No gameplay rule or golden result changes.