Skip to content

fix: add HIIT activity type support for Strava mapping#221

Open
paulsclaw wants to merge 3 commits into
mainfrom
fix/strava-hiit-classification
Open

fix: add HIIT activity type support for Strava mapping#221
paulsclaw wants to merge 3 commits into
mainfrom
fix/strava-hiit-classification

Conversation

@paulsclaw
Copy link
Copy Markdown
Collaborator

Description

Fixes the issue where HIIT activities uploaded via Strava are being misclassified as "lo cardio" instead of HIIT.

Root Cause

The StravaActivityMapper.ts didn't include HIIT in its sportTypeMapping. When a Strava activity has sport_type "HIIT", it was not matched to any activity type and fell through.

Changes

  • Added 'HIIT': ['HIIT'] mapping in StravaActivityMapper.detectActivityType()
  • Added test case for HIIT activity mapping
  • Added test case for HIIT activity type detection
  • All 11 tests pass

Testing

Ran npm test -- strava-mapping.test.ts - all tests pass (11 tests including 2 new HIIT tests)

- Add 'HIIT' to sportTypeMapping in StravaActivityMapper.ts
- Map Strava sport_type 'HIIT' to activity type 'HIIT'
- Add test case for HIIT activity mapping
- Add test case for HIIT activity type detection
- All existing tests continue to pass
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
march-fitness-2025 Ready Ready Preview, Comment Mar 18, 2026 10:36pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants