Files
swiftcontrol/lib/services/workout
Jonas Acker f98c45e1ca test(clock): let a test run phone steering, rides and the activity log on its clock
Three places read the wall clock directly, so on the fake test clock
what they showed depended on how fast the machine ran:

- phone steering integrates the gyroscope over the wall-clock time
  between samples, so the same samples turned the gauge by a different
  angle on every run. The device now takes that time from a clock seam
  (nowFn), DateTime.now by default;
- a ride's timer and summary are timed by the recorder's nowProvider,
  which is now settable, and core.workoutRepository can be swapped for
  one that keeps a ride off the disk;
- the activity log stamps and ages its entries ("just now", "5s ago")
  by activityLogClock, DateTime.now by default.

Nothing changes outside tests. A new test proves the steering angle
follows the samples' clock.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:08:54 +02:00
..
2026-04-28 10:38:04 +02:00