Loop icon indicating copy to clipboard operation
Loop copied to clipboard

Bug: Carbohydrate Entries typed starting with decimal points are misinterpreted

Open marionbarker opened this issue 9 months ago • 1 comments

Describe the bug When entering values in the add carbohydrates screen, if a leading decimal point is entered it is discarded and user may not notice.

For example: Enter .05 g of carbohydrates, the . is discarded, as is the 0 and the entry remains as 5 g.

Problem was noticed when user "accidentally hit Add Carb Entry instead of Bolus to perform a 0.05U bolus".

Attach an Issue Report N/A

To Reproduce Steps to reproduce the behavior:

Expected behavior If someone types ".05" vs "0.05", expect to have the same value be entered.

This only happens in the Carbohydrate screen. The bolus entry screen behaves correctly.

Phone

  • iOS 18.3

Loop Version

  • Loop 3.4.4

marionbarker avatar Apr 11 '25 04:04 marionbarker

I noticed in health, if a user types '.' as the first character, it becomes "0.", and they can type a '1', after that and it becomes 0.1. Something like that makes sense, I think.

This issue should be very rare to cause problems. First, attempting to enter < 1g is very unusual, and second, the UI does provide feedback about how it's being interpreted, before any dosing info is displayed, and then we have all the mitigations in the next bolus screen showing what Loop will do. There's a lot to gloss over before this becomes a dosing error, on top of an already rare situation.

And it sounds like the mitigations in place did allow the user to catch the error in the original bug report.

ps2 avatar Apr 22 '25 14:04 ps2