From 268a7f7ac86331806b57dbbed5fb8a5529f2e0e7 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sat, 5 Sep 2026 17:21:52 +0200 Subject: [PATCH] fix(player): don't report a successful stereo-pair mutation as failed refreshDevices() now throws on a failed /api/devices fetch (needed by removeDeviceAndRefresh's success/failure contract), but StereoPair's run() awaited it inside the same try that already notified success -- so a refresh/device-list-fetch hiccup after a successful create/rename/ dissolve rolled the UI back into an "operation failed" error state even though the mutation itself succeeded. Isolate the post-success refresh so its failure only surfaces as its own, separate notice. Co-Authored-By: Claude Sonnet 5 --- .../soundtouchweb/static/js/components/StereoPair.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/service/soundtouchweb/static/js/components/StereoPair.js b/pkg/service/soundtouchweb/static/js/components/StereoPair.js index 9fbe5d84..5102597b 100644 --- a/pkg/service/soundtouchweb/static/js/components/StereoPair.js +++ b/pkg/service/soundtouchweb/static/js/components/StereoPair.js @@ -163,8 +163,15 @@ export function StereoPair({ deviceId, device, devices, onChanged, notify }) { setShowPicker(false); onSuccess?.(); notify?.(successMessage); - await onChanged?.(); - await refresh(); + try { + await onChanged?.(); + await refresh(); + } catch (_) { + // The mutation itself already succeeded and was notified + // above; a failure here only means the device list/local + // view didn't refresh, not that the operation failed. + notify?.('Stereo pair updated, but the device list failed to refresh'); + } } catch (_) { if (isCurrentMutation()) { await recoverFromFailure('Stereo-pair operation failed');