Negative carb entry incorrectly limited by max carb setting
Description
When attempting to reduce current COB (Carbs On Board) by entering a negative carb value, the input is incorrectly constrained by the configured maximum carb entry limit. This prevents valid negative adjustments even when COB would remain positive after the deduction.
Steps to Reproduce
- Set maximum carb entry limit to 36g
- Accumulate COB of e.g. 45g (via multiple entries)
- Attempt to enter
-40g carbs to reduce COB
Expected Behavior
- Negative carb entries should be allowed as long as resulting COB ≥ 0
- The max carb limit should only apply to positive carb entries
Actual Behavior
- Entry of
-40g is blocked because it exceeds the max carb limit (36g)
- User cannot reduce COB in a single step even though resulting COB would remain positive
Impact
- Forces users to split corrections into multiple steps
- Introduces unnecessary friction in manual COB adjustments
Suggested Fix
- Apply max carb limit only to positive carb entries
- Allow negative carb inputs up to current COB value (i.e., prevent COB < 0, but not restrict by max carb setting)
Workaround
- Reduce COB in multiple steps (e.g.,
-36g then -4g)
Additional Context
This scenario occurs when COB exceeds the configured max carb limit due to multiple prior entries.
Negative carb entry incorrectly limited by max carb setting
Description
When attempting to reduce current COB (Carbs On Board) by entering a negative carb value, the input is incorrectly constrained by the configured maximum carb entry limit. This prevents valid negative adjustments even when COB would remain positive after the deduction.
Steps to Reproduce
-40gcarbs to reduce COBExpected Behavior
Actual Behavior
-40gis blocked because it exceeds the max carb limit (36g)Impact
Suggested Fix
Workaround
-36gthen-4g)Additional Context
This scenario occurs when COB exceeds the configured max carb limit due to multiple prior entries.