Skip to content

Don't send the prime again once the pod is past priming - #228

Closed
ps2 wants to merge 2 commits into
devfrom
fix/prime-resend
Closed

ps2 wants to merge 2 commits into
devfrom
fix/prime-resend

Conversation

@ps2

@ps2 ps2 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

During pod setup, prime() could send the 2.6 U prime bolus again after the pod had already finished priming. The pod then took that bolus as the cannula insertion bolus.

This happened in an issue report from a DASH pod:

  1. The prime ran normally.
  2. In the insert cannula step, the initial basal schedule command timed out, so it was left unacknowledged.
  3. The user returned to setup through the Pair Pod button in settings, which always opens the prime screen.
  4. prime() read the pod's status and saw basal initialized. It only treats priming and priming completed as done, so it sent the prime again. The pod started cannula insertion with 2.6 U instead of 0.5 U.
  5. A third prime was sent while that bolus ran. The pod faulted with 0x31 (049).

Changes:

  • prime() returns right away, without sending anything, when the pod reports basal initialized, inserting cannula or a running state.
  • The Pair Pod button opens insert cannula when priming is finished and the pod is attached. Reopening pod setup already did this (determineInitialStep).

Test: testPrimeAfterThePodHasMovedOnSendsNoPrime. OmniTests: 213 tests, 0 failures.

When the initial basal schedule went unacknowledged during pod setup,
the Pair Pod button in settings reopened the prime screen. prime() then
asked the pod for status, saw basal initialized, and sent the 2.6 U prime
bolus again because it only recognized priming and priming completed.
The pod took that bolus as the cannula insertion bolus. In IR-J7SKK8AG a
third prime sent while that bolus ran faulted the pod with 0x31 (049).

prime() now returns right away when the pod reports progress past
priming. The Pair Pod button opens insert cannula when priming is done
and the pod is attached, as reopening pod setup already does.
# Conflicts:
#	OmniTests/PodCommsSessionTests.swift
@itsmojo

itsmojo commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Here's some additional description items related to this unacknowledged initial basal schedule command failure.

2a. The unacknowledged command puts up a Unable to Reach Pump modal with a Learn More button.
2b. Clicking on this button displays a Unable to Reach Pod modal with a blue Access Omnipod Screen and a red Discard Pod button
2c. Clicking on the blue button take you to the Omnipod DASH view (i.e., step 3).

3a.. In this view there is an inappropriate Pair Pod button instead of a Finish Setup button for this partially setup pod.
3b. If the user taps on Pair Pod, the app can recover and display a Comms Recovered modal.
3c. When the comms are recovered, the flow can go directly to the Pair Pod view without any of the checking that is done by OmniUICoordinator.determineInitialStep() when going thru the HUD that would either select the .insertCannula view if the priming has finished and the podAttachment has been confirmed (which it was in this case) or to the .pairAndPrime view to finish the prime operation.

4a. The current prime() checking was written assuming that it could only be called OmniUICoordinator.determineInitialStep() which would be sure only go to the .pairAndPrime view if the setup had not progressed to the .insertCannula view. The newer Unable to Reach Pod view allows a user to go to the pump view to run commands manually for comms recovery, but this view has no determineInitialStep() like checking for the .podActivating case when Pair Pod is tapped and so prime() gets called with pod states it was not able to gracefully handle.

Besides making prime() able to gracefully handle being called any time, the more general problem that this failure shows is that the Pump View needs to be updated to behave reasonably with an unacknowledged command recovery during pod setup (e.g., display Finish Setup, properly vector to the correct screen, have all commands work as well as the pod allows fur a partially set up pod). All of this will be handled in another PR.

@itsmojo

itsmojo commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Obsoleted by OmnpodKit PR #231

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve by Claude code review and test build using Loop main.

If we prefer 228 over 231, I'll add an approval here.

@marionbarker

Copy link
Copy Markdown
Contributor

close this PR in favor of PR #231

@dnzxy
dnzxy deleted the fix/prime-resend branch December 2, 2026 23:59
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.

3 participants