diff --git a/frontend/src/components/GarminConnection.tsx b/frontend/src/components/GarminConnection.tsx index 4f09a27..3e68689 100644 --- a/frontend/src/components/GarminConnection.tsx +++ b/frontend/src/components/GarminConnection.tsx @@ -89,10 +89,17 @@ export function GarminConnection() { setError(null); try { await api.resetSync(); - refreshStatus(); + // Reset runs as a background sync job; wait for it to actually finish + // before reloading, otherwise other pages (e.g. Review Queue) would + // still show the just-deleted activities from their own stale state. + let status = await api.syncStatus(); + while (status.in_progress) { + await new Promise((resolve) => setTimeout(resolve, 300)); + status = await api.syncStatus(); + } + window.location.reload(); } catch (e) { setError(String(e)); - } finally { setBusy(false); } }