Repository navigation
Add an early warning option to the temp target and override end alarms - #721
Merged
Merged
Conversation
The end alarms can now also fire a chosen number of minutes before the scheduled end, titled Temp Target Ending Soon or Override Ending Soon, and still fire normally when the event actually ends. Default is 0 which keeps the current behavior. Overrides keep their unclamped scheduled end so indefinite or long overrides do not warn incorrectly. Includes unit tests for both conditions.
Member
Author
…y-warning # Conflicts: # LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift
…y-warning # Conflicts: # Tests/AlarmConditions/Helpers.swift
…y-warning # Conflicts: # LoopFollow/Alarm/Alarm.swift # LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift # LoopFollow/Helpers/DataStructs.swift
snickerdoodleparent
pushed a commit
to snickerdoodle-co/LoopFollow
that referenced
this pull request
Nov 4, 2026
Brings in the Apple Watch app (loopandlearn#785), the end alarms' early warning (loopandlearn#721), the home screen TIR band with its shared period (loopandlearn#774), the range thresholds in one place with Extended Tight Range / TING 63–140 mg/dL (loopandlearn#791), the DST fix for the stats day loops (loopandlearn#795) and the fixes for explicit-null Nightscout fields (loopandlearn#797). Kept from this branch: the dynamic glucose colors (TIR band, graph, Live Activity) with the Target setting, the Weekend Profile overrides and remote commands, the BFU check before alarms, the TIR band shown by default. The older watch app (LoopFollowWatch Watch App, the phone's WatchComplication and WatchConnectivityManager) gives way to loopandlearn#785's. The Weekend Profile commands use ReturnNotificationInfo.loopFollow(), as loopandlearn#785 moved the helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UUzqfqfsM8BQYJ2yoRaLz8
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.

This adds an Early Warning setting to the Temp Target Ended and Override Ended alarms. It can be set from 0 to 30 minutes in steps of 5 and defaults to 0, which keeps the current behavior. With a lead time set, the alarm fires that many minutes before the scheduled end with the title Temp Target Ending Soon or Override Ending Soon, and then fires again as usual when it actually ends. Each firing happens at most once per event, and extending an active temp target or override arms a new warning for the new end time.
Overrides now carry their unclamped scheduled end next to the graph end date, which is capped to the display horizon. Indefinite Loop overrides have no known end and never trigger the early warning. The full screen alarm view shows the early warning title too.
Includes unit tests for both alarm conditions.
Screenshots