Commit Graph

7 Commits

Author SHA1 Message Date
Jonas Bark
f793a2b3f7 feat(workout): WorkoutRepository for local .fit file storage
Adds PastWorkout model, WorkoutRepository (save/list/delete) with UTC-stamped filenames, and wires it into Core.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:52:44 +02:00
Jonas Bark
838e97cdcf feat(workout): WorkoutRecorder with idle/recording/paused state machine
Implements WorkoutRecorder with start/pause/resume/stop transitions, 1 Hz
sampling loop via configurable tick timer, active duration tracking that
excludes pause time, and WorkoutResult with summary. Wires recorder into Core.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:52:44 +02:00
Jonas Bark
9b0a471161 feat(workout): encode samples to FIT activity file
Implements FitFileWriter.encode() which converts WorkoutSamples and a
WorkoutSummary into a standards-compliant FIT Activity file with
FileId → Event(start) → Records → Event(stop) → Lap → Session → Activity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:52:43 +02:00
Jonas Bark
c1e0beeed5 refactor(workout): rename sum→aggregate with max flag; add WorkoutSummary doc 2026-04-24 11:52:43 +02:00
Jonas Bark
3192b951e2 feat(workout): add WorkoutSample and WorkoutSummary with tests 2026-04-24 11:52:43 +02:00
Jonas Bark
8e11d18e0a chore(workout): trim unused test imports and clarify TrainerMetrics test name 2026-04-24 11:52:43 +02:00
Jonas Bark
5bdc4e626a feat(workout): add TrainerMetrics adapter over bike definitions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:52:43 +02:00