Skip to content

Fix day-only alarms never firing when night starts at midnight - #845

Merged
marionbarker merged 1 commit into
devfrom
fix/alarm-night-start-midnight
Nov 22, 2026
Merged

marionbarker merged 1 commit into
devfrom
fix/alarm-night-start-midnight

Conversation

@bjorkert

Copy link
Copy Markdown
Member

With Night starts set to 00:00 (or any time before Day starts), the check that decides whether an alarm may fire treated the whole day as night, so alarms set to Day never went off. The sound check already handled this case, so the two disagreed. Both now use a shared isNight helper on AlarmConfiguration. Unit tests cover the schedule itself and shouldFire for day and night alarms with a midnight night start.

Alarm activation used a day/night check that assumed night starts in the evening, so a night start at 00:00 made the whole day count as night and day-only alarms never fired. Both the activation and sound checks now use one shared isNight helper on AlarmConfiguration that handles a night start earlier than the day start.

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approve by successful test build onto iOS 18.7.8 and iOS 27.2.1 test phone; and Claude review.

@marionbarker
marionbarker merged commit 64d2687 into dev Nov 22, 2026
1 check passed
@marionbarker
marionbarker deleted the fix/alarm-night-start-midnight branch November 22, 2026 01:12
@bjorkert

Copy link
Copy Markdown
Member Author

Android: loopandlearn/LoopFollowAndroid#10

kristinkand added a commit to kristinkand/LoopFollow that referenced this pull request Nov 24, 2026
…oopandlearn#845, AlarmKit row loopandlearn#844, change reminders in hours loopandlearn#837, info table scrolling loopandlearn#840, fastlane agreement errors loopandlearn#819)

Remote profiles (loopandlearn#833) were already here from Jonas Björkert's
therapy-profiles branch: the conflicts in NSProfile, RemoteCommandRefresh,
PushNotificationManager and TrioRemoteControlView keep this branch's
additions (Trio's watch push token, the weekend Profile, the copy of a
command for Trio's watch app); profileCommandAnswered came in twice and is
kept once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BZnRiHc1U968YXyW3z6Jm
kristinkand added a commit to kristinkand/LoopFollow that referenced this pull request Nov 24, 2026
…oopandlearn#845, AlarmKit row loopandlearn#844, change reminders in hours loopandlearn#837, info table scrolling loopandlearn#840, fastlane agreement errors loopandlearn#819)

Remote profiles (loopandlearn#833) were already here from Jonas Björkert's
therapy-profiles branch: the conflicts in NSProfile, RemoteCommandRefresh,
PushNotificationManager and TrioRemoteControlView keep this branch's
additions (Trio's watch push token, the weekend Profile, the copy of a
command for Trio's watch app); profileCommandAnswered came in twice and is
kept once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BZnRiHc1U968YXyW3z6Jm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants