feat(sleep): day navigation on the Sleep > Day view#84
Merged
saksham2001 merged 4 commits intoJul 16, 2026
Conversation
Browse previous days from the Day view with a date stepper (chevrons + a tappable date that opens a graphical picker). Horizontal swipe stays reserved for the session carousel; days move only via the stepper. - dayOffset shifts the `now` passed to sleepRange/dayReferenceNight, so the 4 AM "last night" flip is preserved at every offset. - Forward capped at today; back to one week before the earliest recorded night (1-year floor). Carousel resets to page 1 on each day change. - Past days show the scripted coach, never today's mislabeled LLM summary. - Directional push transition (Reduce Motion -> crossfade), a selection haptic per change, a reserved subtitle line so the hero never jumps, a VoiceOver day + session-count announcement, and 44pt hit targets.
…ment Off-screen carousel pages weren't reachable by VoiceOver — a paged horizontal ScrollView doesn't advance element-to-element for VO, so a VO user was stuck on the first session. Expose the carousel as one adjustable element: swipe up/down steps between sessions and scrolls to the selected page, with a "N of M, <start> to <end>" value. Completes the carousel accessibility deferred from the initial day-navigation pass.
SleepView read sleep via a plain `SleepService.sleepRange(...)` call and only observed `CoachSummary` via @query, so after a background ring sync wrote new SleepSession/block rows the tab kept showing stale sleep until the user changed range or pulled to refresh. Observe `PulseDataChange.shared.token` (as Today and Vitals already do) so the body re-runs and re-fetches on each synced batch.
rgvxsthi
force-pushed
the
feat/sleep-day-navigation
branch
from
July 12, 2026 23:55
7ac7f4e to
0b8f86b
Compare
# Conflicts: # PulseLoop/Views/SleepView.swift
saksham2001
approved these changes
Jul 16, 2026
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.
Follow-up to #83 (stacked on it — the diff will narrow to just the day-nav commit once #83 merges).
Adds the ability to browse previous days on the Sleep → Day view, so the per-day session carousel isn't limited to today/last night.
‹ ›chevrons + a tappable date that opens a graphical picker. Horizontal swipe stays reserved for the session carousel; days move only via the stepper (no gesture conflict).dayOffsetshifts thenowpassed tosleepRange/dayReferenceNight, so the 4 AM "last night" flip is preserved at every offset.Designed via a UI / interaction / accessibility review pass. One optional a11y item intentionally deferred: making the carousel a VoiceOver adjustable element (swipe up/down between sessions).