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

@@ -58,7 +58,7 @@ func TestHealth(t *testing.T) {
}
}
func TestWorkoutKindList_ReturnsSevenSeededTypesWithPaceFields(t *testing.T) {
func TestWorkoutKindList_ReturnsEightSeededTypesWithPaceFields(t *testing.T) {
s, _ := newTestServer(t)
rec := doJSON(t, s.Router(), http.MethodGet, "/api/workout-kinds/", nil)
if rec.Code != http.StatusOK {
@@ -68,8 +68,8 @@ func TestWorkoutKindList_ReturnsSevenSeededTypesWithPaceFields(t *testing.T) {
if err := json.Unmarshal(rec.Body.Bytes(), &kinds); err != nil {
t.Fatalf("unmarshal: %v", err)
}
if len(kinds) != 7 {
t.Fatalf("expected 7 seeded kinds, got %d", len(kinds))
if len(kinds) != 8 {
t.Fatalf("expected 8 seeded kinds, got %d", len(kinds))
}
for _, k := range kinds {
if k.PaceMinSecPerKm != nil || k.PaceMaxSecPerKm != nil || k.ExpectedHRZone != nil {