Repository navigation
Combine sleep periods, simplify strap sync, preserve valid records - #6
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
allenlinsh
marked this pull request as ready for review
October 17, 2026 22:41
This branch was successfully deployed
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.
Motion kept only the longest sleep period ending on a date, hiding naps. Retain every period and combine all sleep on that wake date into one daily stage timeline, sleep total, and heart/breathing charts. Weekly totals and averages include all periods too; the schedule preserves the gaps between them. For example, 2h 10m plus 1h 37m displays as 3h 47m. Awake time and unrecorded gaps never count as sleep. Helio wins overlapping records, while Health can fill a separate missing period without duplication.
Move “sync now” beside “strap settings”; the sheet only manages the band key. Save valid sleep records when another record in the transfer fails, preserving the failed record’s previous copy and retry cursor. Clip stage overhangs of at most one minute to the declared session; larger or malformed ranges still fail. A long press on an error copies relative timing diagnostics without keys, packets, absolute timestamps or account information.
Validation: 93 iOS unit tests, the combined sleep and daily/weekly navigation UI flows, and a Release device build passed. The strap settings and Health access UI flows passed in the preceding commit. Synthetic coverage includes split sleep, combined stage totals, empty gaps, heart/breathing averages, duplicate fallback records, DST, close strap sessions, partially invalid transfers, replay and stage-edge clipping. Simulator screenshots were visually checked.
Hardware follow-up required: the reported stage-bounds screenshot does not reveal its actual minute offsets. The one-minute tolerance is not a confirmed diagnosis of that record. Verify direct sync with Zepp closed and compare the sessions on the real strap. No TestFlight build uploaded by this PR.