mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-09-07 15:07:17 +00:00
startSync() used to POST once and, on any 2xx, render a hardcoded "Presets: OK / Recents: OK / Sources: OK" regardless of what the response actually said -- exactly why a silent partial data loss (see the previous commit) would have looked like success to the user. Now: on a 409 (destructive) response, build a specific confirm message from the diff (e.g. "presets: 6 -> 5: Ici Roussillon") and gate via window.confirm(), matching the existing QuickFix confirm UX; on confirm, retry with ?confirmed=true. On success, render the actual per-resource counts from the response body instead of a canned string. Adds an HTTP-level regression test (TestHandleInitialSync_DestructiveSyncReturns409ThenAppliesWhenConfirmed) covering the same refuse-then-confirm flow through the real handler and router, complementing the lower-level setup package test. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>