Add Race workout kind with Garmin eventType auto-detection, sync-time running filter, and pill-based review queue filter

Race is the 8th fixed workout kind, seeded with a real (not placeholder)
rule since Garmin Connect's eventType.typeKey reports "race" for
manually-tagged race activities. Non-running activity types (padel,
cycling, strength training, ...) are now dropped at sync time instead of
being stored. The Review Queue's type filter is now clickable exclusive
pill buttons instead of a dropdown.
This commit is contained in:
2026-07-19 10:52:09 +02:00
parent dfc883acb6
commit 8ff3d62b2f
11 changed files with 158 additions and 27 deletions

View File

@@ -24,12 +24,20 @@ type ActivityType struct {
TypeKey string `json:"typeKey"`
}
// EventType mirrors the nested "eventType" object in get_activities(). Garmin
// Connect lets a user manually tag an activity's event type (Race, Training,
// Fitness, Recreation, ...); TypeKey is "race" for activities marked as races.
type EventType struct {
TypeKey string `json:"typeKey"`
}
// Activity mirrors the fields of interest from get_activities(); the full
// original object is kept in Raw for fields not modeled here.
type Activity struct {
ActivityID int64 `json:"activityId"`
ActivityName string `json:"activityName"`
ActivityType ActivityType `json:"activityType"`
EventType EventType `json:"eventType"`
BeginTimestamp int64 `json:"beginTimestamp"`
StartTimeGMT string `json:"startTimeGMT"`
StartTimeLocal string `json:"startTimeLocal"`