Skip to content

feat: Upload completed activities to Intervals.icu #150

@MaximumTrainer

Description

@MaximumTrainer

Summary

Extend the existing Intervals.icu integration to upload completed workout FIT files back to Intervals.icu after each session, alongside the existing read functionality (calendar, athlete profile, workout download).

Motivation

The current Intervals.icu integration is read-only. Users must manually export and upload FIT files to keep their Intervals.icu calendar up to date. Automating the write-back closes the loop and makes MaximumTrainer a first-class Intervals.icu client.

Acceptance Criteria

  • An Upload to Intervals.icu button appears on the post-workout panel when the Intervals.icu account is linked
  • Pressing the button calls POST /api/v1/athlete/{id}/activities with the FIT file as multipart data
  • The activity name and description are pre-populated from the workout name and description
  • Upload progress is shown with a spinner; success/failure status is displayed on completion
  • On success, the activity URL returned by the API is shown as a clickable link
  • Token refresh (using the stored OAuth2 refresh token) is performed automatically on expiry before upload
  • A Auto-upload to Intervals.icu on workout complete toggle is available in Preferences
  • Integration tests mock the Intervals.icu upload endpoint and verify the request body, headers, and token-refresh flow

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions