Loop icon indicating copy to clipboard operation
Loop copied to clipboard

The active insulin (IOB) is not correctly reported

Open sarusso opened this issue 7 months ago • 2 comments

Describe the bug The active insulin (IOB) reported by the UI is not the actual amount, but includes the planned one over the next 30 minutes (of basal insulin). This can be misleading, because:

  1. in temp basal only mode, the reported active insulin can be much higher than the actual value; and
  2. in both temp basal and automatic bolus modes, when the basal is reduced to prevent going below target, the reported active insulin is less than the actual value.

To Reproduce Steps to reproduce the behavior:

  1. Cause Loop to reduce the basal insulin when there is already some active insulin, for example by bolusign some units without any carb intake (in a simulator)
  2. Wait for Loop to reduce the basal insulin and check the reported active insulin

Expected behavior Loop should report as active insulin the insulin which is actually active "right now".

Loop Version

  • 3.6.0

sarusso avatar May 29 '25 22:05 sarusso

I believe this is as designed. The reported Active Insulin assumes no further action from Loop (in case communication is lost). Once a pump is commanded with a temporary basal rate, unless the temporary basal is interrupted, that amount will be delivered (or withheld). (Edited to change the phrase "insulin delivered" to "Active Insulin".)

I defer to @ps2 on this one. If he agrees, then I will close the two PR associated with this issue.

marionbarker avatar Jun 30 '25 13:06 marionbarker

I appreciate the explanation, but I have to respectfully disagree. IOB stands for “Insulin On Board”, not “Insulin Planned for Delivery.” If it stays like this, it’s just misleading.

As a possible solution, could we consider splitting IOB into two values? One for insulin actually delivered, and another for planned insulin, e.g.: 1.1U → 2.2U (which is what I did for myself). That would keep things safe and transparent, while improving clarity.

Also, on the design choice — can we open this up to broader discussion? Loop is an open-source, community-driven project, and it would be great to have a more inclusive dialogue on decisions like this.

sarusso avatar Jun 30 '25 13:06 sarusso