Skip to content

Show the loop as open while a manual temp basal is running - #2649

Merged
ps2 merged 2 commits into
next-devfrom
fix/manual-temp-basal-open-loop
Nov 3, 2026
Merged

ps2 merged 2 commits into
next-devfrom
fix/manual-temp-basal-open-loop

Conversation

@ps2

@ps2 ps2 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

A manual temp basal stops automatic dosing, but the loop icon stayed closed and then went stale and red while it ran, as if the loop were failing. Loop Failure notifications also fired.

Automation now counts as active only when Closed Loop is on and no manual temp basal is running (DeviceDataManager.isAutomaticDosingActive). This is used for:

  • the status HUD loop icon
  • the loop status popup, which explains that dosing resumes when the manual temp basal is cancelled
  • the widget / Live Activity context
  • the watch

While a manual temp basal runs, the Loop Failure notifications are rescheduled from each loop cycle rather than from the last loop that dosed. They don't fire during the manual temp, but they still do if the loop stops running.

Tested in the simulator with the mock pump:

  • with a 1 h manual temp basal the HUD showed open and green, and the popup showed the manual temp basal text
  • the first Loop Failure notification moved from 20 min after the last dosing loop to 20 min after each cycle
  • after cancelling, the loop went back to closed and green, and the schedule followed the next successful loop

Reported by Butch Weaver in Zulip #development ("New UI").

ps2 added 2 commits November 2, 2026 20:19
A manual temp basal stops automatic dosing, but the loop icon stayed
closed and went stale and red while it ran, as if the loop were failing.
Treat automation as active only when Closed Loop is on and no manual temp
basal is running, for the status HUD, the loop status popup, the widget
and Live Activity context and the watch.
…nning

A manual temp basal blocks enacting, so lastLoopCompleted stops advancing
and the 20/40/60/120 minute Loop Failure notifications fired even though
the loop was still running. While a manual temp basal runs, schedule them
from each loop cycle instead, so they still fire if the loop stops.
@ps2
ps2 merged commit f7b08ca into next-dev Nov 3, 2026
@ps2
ps2 deleted the fix/manual-temp-basal-open-loop branch November 3, 2026 02:57
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.

1 participant