Skip to content

Numbers typed with leading decimal points can be interpreted _very_ incorrectly #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
detreville opened this issue Apr 11, 2025 · 2 comments

Comments

@detreville
Copy link

detreville commented Apr 11, 2025

Numbers typed with leading decimal points can be interpreted very incorrectly

The user can type a number like .05 and Loop will interpret it as 5.

Issue Report
(No issue report from Loop is possible here.)

To Reproduce

  1. Go to Add Carb Entry (first screenshot below).
  2. Type . (second screenshot).
  3. Type 0 (third screenshot). Loop incorrectly drops the decimal point.
  4. Type 5 (fourth screenshot). Loop incorrectly interprets the number input as 5, not .05.
  5. Press Continue and you can receive 100x the amount of insulin input.

Expected behavior
Loop should not drop leading decimal points on numbers input.

Screenshots

Image

Image

Image

Image

Phone

  • iPhone 16 Pro
  • iOS 18.3

Loop Version

  • Loop v3.4.4 (57)
  • Repo: LoopKit/Loop

CGM

  • Device: Dexcom G7
  • Manager app: Dexcom F7 app

Pump

  • Manufacturer: Insulet
  • Model: Omnipod DASH® Pods (Gen 4)
  • Firmware version: not applicable

Additional context
This problem occurred in practice when I accidentally hit Add Carb Entry instead of Bolus to perform a 0.05U bolus. Had I not noticed Loop’s misinterpretation of my numeric input, I'd have received a bolus of about 0.6U instead of 0.05U. It is generally safe for the user to mistakenly hit Add Carb Entry instead of Bolus since the resulting bolus or basal reduction would be much smaller than intended, but it is definitely not safe if Loop misparses numeric inputs, here multiplying themt by 100x. When Insulet’s proprietary Omnipod 5 app had roughly the same bug 1½ years ago, the FDA ordered a Class 1 recall, “the most serious type of recall.”

https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfRes/res.cfm?ID=204607

@marionbarker
Copy link
Collaborator

Thank you for pointing this out.

@marionbarker
Copy link
Collaborator

I opened an Issue in the LoopKit / Loop repository as Loop Issue 2307: Bug: Carbohydrate Entries typed starting with decimal points are misinterpreted so we can track this issue properly. I'm closing the issue you opened under documentation.

Your write-up remains in GitHub, even though it is closed, and is cross referenced from the new Issue linked above.

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

No branches or pull requests

2 participants