Skip to content

Conversation

@MikePlante1
Copy link
Contributor

This PR adds Cannula Age and Insulin Age to the Minimed Settings View, to allow users to more easily see how long it's been since they've changed their infusion set and reservoir. The names and triggers are the same as those used to update CAGE and IAGE on Nightscout.

The lines will not appear in the view until a pump event triggers its update, so if you use steel cannulas and never issue a fixed prime, Cannula Age will never update or appear. Keep this in mind when testing, as you must issue a fixed prime (cannula fill) and/or rewind from the pump after building this PR in order for these lines to appear.

This PR also fixes issues with iOS 26, which did not display the Navigation Title (ie: Medtronic 723) at the top of the sheet, and did not display the Reservoir icon under Insulin Remaining.

It also reorganizes the Settings view and adds section titles to make things viewed/accessed more often at the top, and decreases the size of the pump image by a third.

Screenshots taken on an in-vivo iPhone 14 Pro Max running iOS 26.2 with this PR inside Trio v0.6.0.26:

@marionbarker marionbarker self-requested a review December 20, 2025 23:26
@marionbarker
Copy link
Contributor

marionbarker commented Dec 21, 2025

Test

✅ Successful test

Details

Built this version over an existing instance of Loop that was connected to an MDT 515 pump on an SE phone running iOS 18.7.2

Initially the 2 rows are not visible, as expected.

Did a fixed prime (as if changing cannula).

  • wait because I expect it takes time for Loop to figure out the pump had an event
  • watch data reading going past in the Xcode debug log
  • go to the Medtronic Screen and see there is now a Cannula age row under status: 0 days, 0 hours

Did a rewind (as if changing the reservoir)

  • wait for next loop, now see the Insulin age is added too: 0 days, 0 hours

@marionbarker
Copy link
Contributor

Test with different hardware

✅ Successfully repeated the test with an SE phone running iOS 26.2 and an MDT 523 pump.

@marionbarker marionbarker requested a review from ps2 December 21, 2025 05:03
Copy link
Contributor

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

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

Approved by Test.
Code review appeared reasonable.

Copy link
Contributor

@ps2 ps2 left a comment

Choose a reason for hiding this comment

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

LGTM. Just a comment about using frameworkImage.

.fill(fillColor)
.mask(
Image("reservoir_mask")
Image("reservoir_mask", bundle: Bundle(for: MinimedPumpSettingsViewModel.self))
Copy link
Contributor

Choose a reason for hiding this comment

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

We also have a helper for this:

Image(frameworkImage: "reservoir_mask")

@marionbarker
Copy link
Contributor

Final Test

I tested again with the updated syntax. It still works as expected for both Loop and Trio.

LGTM

@marionbarker marionbarker merged commit ff07802 into LoopKit:main Dec 24, 2025
@MikePlante1 MikePlante1 deleted the cage-iage branch December 24, 2025 23:30
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