Skip to content

Bug: Carbohydrate Entries typed starting with decimal points are misinterpreted #2307

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

Open
marionbarker opened this issue Apr 11, 2025 · 1 comment

Comments

@marionbarker
Copy link
Contributor

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
@ps2
Copy link
Collaborator

ps2 commented Apr 22, 2025

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.

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