nightscout / Trio

Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations.
https://docs.diy-trio.org/en/latest/
MIT License
98 stars 526 forks source link

Boluses deleted from History screen reappear after next bolus (MDT 754 pump) #399

Open dsut4392 opened 2 months ago

dsut4392 commented 2 months ago

Describe the bug

If you delete a bolus from the history screen, the deleted bolus reappears in the history the next time you issue a bolus.

Attach a Log

Tap the Trio settings icon at the bottom of the screen, then tap 'Share logs' on the bottom of the list and attach it to this ticket.

To Reproduce

1) issue a bolus, manual or SMB 2) open History screen and swipe left on the bolus to delete it. 3) return to the main screen and confirm the bolus is no longer shown 4) issue a new bolus, and the previously deleted bolus reappears both on the main screen and the history screen

Expected behaviour

Once you delete a bolus from the history it should stay deleted. Deleting a bolus from the history may be necessary if your cannula has leaked, or if you have forgotten to suspend while your pump was disconnected.

Screenshots

video attached

Setup Information (please complete the following information):

Smartphone:

Pump:

CGM:

Trio Version:

dsut4392 commented 2 months ago

log_prev.txt log.txt

dsut4392 commented 2 months ago

https://github.com/user-attachments/assets/4c5e4ade-3c22-49b0-89ec-741dc1d50c0a

dsut4392 commented 2 months ago

Note that in the video above, the 0.6U bolus reappeared, but the 0.18U bolus did not.

MikePlante1 commented 2 months ago

I just reproduced the same thing with my 722 on Trio (TCD). Bolused 0.1 U, deleted from Trio, after next Loop cycle the 0.1 U bolus returned)

dnzxy commented 2 months ago

This is a known LoopKit issue.

@marionbarker has raised it, I have raised it as well in 2023, when I implemented the swipe-to-delete feature for iAPS that is also found in Trio.

It has to the with the event store of the boluses, it is cleared upon running a new cycle. So if you were to bolus 3 times, then delete those boluses, then bolus a 4th time, all within one cycle, all 4 entries will reappear, because they are send to Trio / iAPS / Loop by the device layer event store when the apps perform the storing of pump events to pump history. That is why the 0.18 U bolus did not reappear, but the 0.6 U bolus that was given at the beginning of the recording reappears.

We cannot address this in Trio, it needs addressing in LoopKit. Given, that this has not been addressed in ~10 months since finding the issue, I doubt it will ever be addressed.

dnzxy commented 2 months ago

I just reproduced the same thing with my 722 on Trio (TCD). Bolused 0.1 U, deleted from Trio, after next Loop cycle the 0.1 U bolus returned)

Same issue, see previous comment. TCD or non-TCD does not matter here. You can also reproduce this for Loop and for iAPS. A fresh cycle will clear the event store.