Repository navigation
Conversation
A separate Live Activity for a live-tracked workout, on the Lock Screen and in the Dynamic Island: - Lock Screen: sport, live heart rate, duration, GPS distance and average pace. A workout with no route shows duration + heart rate. - Dynamic Island: sport glyph + clock (compact leading), pace or HR (compact trailing), the three figures (expanded). It is its own activity type (WorkoutActivityAttributes) with its own switch, Settings > Live notifications > Workout (default on), so it works with the live-HR banner turned off. While it shows, the live-HR banner stands aside for it and a sync starts no new banner, the same as for a Lift Log session. The clock is Text(.timer) from the start shifted by paused time, so iOS counts it up between pushes; paused, it shows the frozen active time. Labels are localized and distance/pace unit-formatted app-side, since the widget extension has no string catalog or unit prefs. Pushes: pause/resume at once, changed HR/distance/pace at most every 5 s. AppModel.activeWorkoutIsGps becomes private(set) so the controller can apply the same GPS gate as the live workout screen's distance row. Not yet compiled: written on Windows, needs app-build.yml (iOS leg) or a local xcodebuild. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds a Live Activity for a live-tracked workout (a run, ride, walk, or any sport started from the workout picker) on the Lock Screen and in the Dynamic Island.
It is its own activity type (
WorkoutActivityAttributes) with its own switch, Settings › Live notifications › Workout (on by default), so it works with the Live HR banner turned off. While it shows, the Live HR banner steps aside and a sync starts no new banner, the same as for a Lift Log session.Details:
Text(.timer)from the start time shifted by paused time, so iOS counts it up by itself between pushes. While paused it shows the frozen active time.AppModel.activeWorkoutIsGpsbecomesprivate(set)so the banner uses the same GPS check as the live workout screen's distance row.iOS only: Live Activities have no Android counterpart. An ongoing-notification equivalent could follow separately.
Overlap with #2761
#2761 also adds a workout Live Activity (Start/Pause/Resume/End controls and a clock, part of training favorites). It does not show distance, pace or heart rate, which is the focus here. Both PRs use the names
WorkoutActivityAttributes/WorkoutLiveActivity, so whichever lands second needs adapting. I'm happy to rebase on top of #2761 and move distance, pace and heart rate into itsTrainingDisplay, or to keep this PR standalone, whichever the maintainers prefer.Type of change
How it was tested
Tools/i18n_audit.py --ciandTools/doc_comment_lint.pyreport nothing new.Screenshots
Lock Screen while running:
Paused:
Dynamic Island (compact), before the first pace:
Checklist
StrandDesigntokensStrand.xcodeproj/) or any secrets/keystoresRelated issues
Refs #757
Refs #1195