Skip to content

Fix Statistics hang on daylight saving fall-back days - #795

Merged
bjorkert merged 1 commit into
devfrom
fix/stats-dst-day-step
Oct 27, 2026
Merged

bjorkert merged 1 commit into
devfrom
fix/stats-dst-day-step

Conversation

@bjorkert

@bjorkert bjorkert commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Opening Statistics hung and was eventually killed when the selected period contained a day where the clock goes back an hour (25 October 2026 in Europe, 1 November 2026 in the US). The basal gap and temp basal adjustment loops advanced from the start of a day by a fixed 24 hours, which on a 25-hour day lands at 23:00 on the same date, so the loop never progressed and the gap loop kept appending entries. Both loops now step to the next day with the calendar.

@codebymini codebymini 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.

👍

@bjorkert
bjorkert merged commit 9de3e2f into dev Oct 27, 2026
2 checks passed
@bjorkert
bjorkert deleted the fix/stats-dst-day-step branch October 27, 2026 18:40
kristinkand added a commit to kristinkand/LoopFollow that referenced this pull request Oct 29, 2026
The watch app, its project entries and Fastfile follow dev's final loopandlearn#785, which is newer
than the test/watch-785 branch merged before. The hub's background refresh logic stays;
only the Bluetooth heartbeat's Silent Tune fallback leaves it, as on Integration. The
statistics fix is Integration's, which also steps by calendar day (loopandlearn#795).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UUzqfqfsM8BQYJ2yoRaLz8
akoi added a commit to akoi/LoopFollow that referenced this pull request Oct 30, 2026
Adapt upstream LoopFollow PR loopandlearn#795 to a shared calendar-day helper.
Preserves local Xcode 27.1 app icon fix and adds Europe/Stockholm DST tests.
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
snickerdoodleparent pushed a commit to snickerdoodle-co/LoopFollow that referenced this pull request Nov 4, 2026
…asals

The actual-basal calculation built a display calendar (reading the time zone
setting), sorted the basal profile and asked the calendar for midnight for each
temp basal in the period (about 288 a day with Trio), on the main thread. The
profile is now sorted once, and a small day cache asks the calendar only when a
timestamp leaves the day found last. Its day ends at the next calendar midnight,
as loopandlearn#795 steps the loop, so a 25-hour DST day still ends. Results are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UUzqfqfsM8BQYJ2yoRaLz8
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