mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 00:12:18 +00:00
Offer the previous session of the same sport from the workout page
"How does this compare to last time?" is the most likely next question after reading a workout, and answering it meant going back to the list and scanning for the one before. Resolve the previous session server-side, through the same canonical picker the list uses, so the link can never land on a duplicate row recorded by a second watch, and render it beside the own-history average line. Null when nothing older exists, and then no link is shown. The stats card's hand-rolled heading moves to the icon-less TileHeader while the file is open.
This commit is contained in:
1 parent
76b407b6de
commit
a61cdae437
13 files changed
+177
-14
No files matched your search
@@ -199,6 +199,12 @@ const workoutDetailResponse = z
|
||||
// a provider reachable. Reading this endpoint never generates one.
|
||||
aiInsight: workoutActivityInsight.nullable(),
|
||||
canonicalId: z.string(),
|
||||
/**
|
||||
* The canonical session before this one in the same sport, or null when
|
||||
* this is the first on record. Resolved through the same source-priority
|
||||
* picker as the list, so the id always addresses a row the list shows.
|
||||
*/
|
||||
previousWorkoutId: z.string().nullable(),
|
||||
})
|
||||
.meta({ id: "WorkoutDetailResponse" });
|
||||
|
||||
|
||||
Reference in new issue
Block a user