activity: store detailed heart data for workouts and sleep - #1898
Draft
sahil7886 wants to merge 6 commits into
Draft
activity: store detailed heart data for workouts and sleep#1898sahil7886 wants to merge 6 commits into
sahil7886 wants to merge 6 commits into
Conversation
Add a buffered system DataLogging stream for one-second workout heart-rate readings. The normal activity session remains the authoritative workout summary. A terminal record carries the exact stop time. Co-authored-by: GPT-5.6 <noreply@openai.com> Signed-off-by: Sahil Shaikh <sahilshaikh2705@gmail.com>
Co-authored-by: GPT-5.6 <noreply@openai.com> Signed-off-by: Sahil Shaikh <sahilshaikh2705@gmail.com>
Co-authored-by: GPT-5.6 <noreply@openai.com> Signed-off-by: Sahil Shaikh <sahilshaikh2705@gmail.com>
Buffer accepted PPI, periodic BPM, and motion inputs locally during the detected sleep interval. Co-authored-by: GPT-5.6 <noreply@openai.com> Signed-off-by: Sahil Shaikh <sahilshaikh2705@gmail.com>
Prevent motion-summary overflow. Use a robust nonzero session ID so DataLogging replay remains idempotent after a reboot. Co-authored-by: GPT-5.6 <noreply@openai.com> Signed-off-by: Sahil Shaikh <sahilshaikh2705@gmail.com>
Add the sleep-capture source and test fakes. This lets Activity and Workout unit tests link the telemetry paths. Signed-off-by: Sahil Shaikh <sahilshaikh2705@gmail.com> Co-authored-by: GPT-5.6 <noreply@openai.com>
sahil7886
force-pushed
the
activity/sleep-workout-telemetry
branch
from
August 20, 2026 02:15
1496944 to
9574f5f
Compare
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.
Summary
This change saves detailed heart data during a built-in Workout and during detected sleep.
A user can start a Workout as usual. The watch keeps one heart-rate value each second. On watches that support HRV, it also keeps accepted pulse-to-pulse interval (PPI) values. The watch stores this data locally. It does not need a phone connection while the Workout runs.
During a detected overnight sleep period, the watch stores accepted PPI values, one heart-rate value every 30 seconds, and a 30-second motion summary. The normal activity session stays the main Workout summary. These new records add detail to that summary.
Before this change
After this change
What this enables
A companion or analysis tool can:
This change records and transfers the new detail. It does not add a user-facing chart or insight by itself. A companion-side consumer must read these streams to present the data.
Implementation
User effect
Validation