trails/apps/journal/app/lib/connected-services/providers
Ullrich Schäfer 6eea6af673
feat(journal): harden FIT→GPX conversion (pause/session segmentation, validation, sport)
Implements the fit-parsing-hardening change. The shared converter now:
- splits output into <trkseg>s on timer stop/start events, falling back to
  record gaps > 5 min, so downstream moving-time never bridges a pause;
- slices records into per-session windows (multisport → one activity, one
  segment per session), single-session behavior unchanged;
- validates records: finite/in-range coordinates required, timestamp
  required, non-finite altitude dropped (point kept), prefers
  enhanced_altitude;
- returns { gpx, sport }, mapping FIT session sport/sub-sport to a Journal
  SportType (first session wins), consumed by the Wahoo importer + webhook
  and Garmin importer as a fallback when the provider sends no type.

Tests drive the converter via mocked fit-file-parser output (segmentation,
validation, sport mapping, no-GPS) per the chosen fixtures approach.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 00:03:25 +02:00
..
garmin feat(journal): harden FIT→GPX conversion (pause/session segmentation, validation, sport) 2026-07-17 00:03:25 +02:00
komoot fix(journal): remove ineffective dynamic imports 2026-05-24 12:05:08 +02:00
wahoo feat(journal): harden FIT→GPX conversion (pause/session segmentation, validation, sport) 2026-07-17 00:03:25 +02:00
index.ts feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00