Skip to content

fix: wake window not properly syncing#46

Open
james-008 wants to merge 19 commits into
mainfrom
feat-watch-wake-next-day
Open

fix: wake window not properly syncing#46
james-008 wants to merge 19 commits into
mainfrom
feat-watch-wake-next-day

Conversation

@james-008

Copy link
Copy Markdown
Collaborator

No description provided.

@austinkimchi austinkimchi deleted the feat-watch-wake-next-day branch April 9, 2026 17:30
@austinkimchi austinkimchi restored the feat-watch-wake-next-day branch April 9, 2026 17:35
@austinkimchi

austinkimchi commented Apr 9, 2026

Copy link
Copy Markdown
Member

Wanted to rename the branch but closes the PR. Reopened it with intent to fix wake window.

@austinkimchi austinkimchi reopened this Apr 9, 2026
@austinkimchi

Copy link
Copy Markdown
Member

This PR should have been opened with base feat-watch-wake-onset.

@austinkimchi austinkimchi added enhancement New feature or request needs testing A change that needs to be tested. labels Apr 9, 2026

@austinkimchi austinkimchi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a slight change in the logic of the allowed wake window.
From depending on fetching sleep score to depending on local HealthKit data.

SmartAlarmWidgetBridge.writeState(state)
}

private func wakeWindowDisplayComponents(for nextAlarmDate: Date?, calendar: Calendar = .current) -> (earliest: String, latest: String) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the wakeup time is only shown after midnight passes for the next session of sleep, as the current day for the next day's wakeup changes.

Image

I think this needs a more complex logic, where it changes after a set time of 12:00pm (noon) or after detecting the previous night's sleep from healthkit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is logic for this currently somewhere, but it shouldn't depend on fetching the sleep score. Instead, it should depend locally on whether the user slept (from HealthKit).

As it shows after sleep score was fetched.
Image

@james-008 james-008 requested a review from austinkimchi April 15, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs testing A change that needs to be tested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Settings "Allowed Wake Window" is not properly synced to the smart alarm page

2 participants