Merge backfill into Sync now, replace Full backfill with a destructive Reset all

Sync now now runs Backfill (resumes from the watermark, so a widened history
horizon is picked up automatically) then IncrementalSync then detail-fill, in
one click. "Full backfill" is gone -- in its place, "Reset all" (styled as a
destructive action, gated by a confirm dialog) wipes every synced activity
and its laps/kind assignments and rewinds the backfill watermark, so the next
sync performs a genuinely fresh pull instead of trying to patch up existing
rows with newer schema fields.
This commit is contained in:
2026-07-19 12:41:38 +02:00
parent af41aa0f7f
commit 7f7e4b10f0
10 changed files with 235 additions and 12 deletions

View File

@@ -36,7 +36,10 @@ export const api = {
// Sync
syncRun: () => request<{ status: string }>("/api/sync/run", { method: "POST" }),
syncBackfill: () => request<{ status: string }>("/api/sync/backfill", { method: "POST" }),
// Deletes every synced activity (and its laps/samples/kind assignments)
// and rewinds the backfill watermark -- destructive, gated by a
// confirmation in the UI.
resetSync: () => request<{ status: string }>("/api/sync/reset", { method: "POST" }),
syncRuns: () => request<SyncRun[]>("/api/sync/runs"),
syncStatus: () => request<SyncStatus>("/api/sync/status"),