feat(api): reshape /api/sync/status for phase-aware progress
Replaces detail_fill_progress ({Done, Total}) with progress ({Phase,
Done, Total}), and adds workouts_pending (mirroring
activities_pending_details) from the new CountActivitiesMissingWorkout.
Frontend types updated to match -- GarminConnection.tsx is intentionally
left broken by this commit alone; it's fixed in the next commit that
adds SyncModal.
This commit is contained in:
@@ -173,7 +173,7 @@ export interface ProgressionPoint {
|
||||
|
||||
export interface SyncRun {
|
||||
ID: number;
|
||||
Kind: "backfill" | "incremental";
|
||||
Kind: "backfill" | "incremental" | "full";
|
||||
StartedAt: string;
|
||||
FinishedAt: string | null;
|
||||
ActivitiesFetched: number;
|
||||
@@ -194,15 +194,17 @@ export interface SessionInfo {
|
||||
garmin_connected: boolean;
|
||||
}
|
||||
|
||||
export interface DetailFillProgress {
|
||||
export interface SyncProgress {
|
||||
Phase: "idle" | "discovering" | "activities" | "workouts";
|
||||
Done: number;
|
||||
Total: number;
|
||||
}
|
||||
|
||||
export interface SyncStatus {
|
||||
in_progress: boolean;
|
||||
detail_fill_progress: DetailFillProgress;
|
||||
progress: SyncProgress;
|
||||
activities_pending_details: number;
|
||||
workouts_pending: number;
|
||||
last_run?: SyncRun;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user