Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR corrects the language in alarm editor UI text to accurately reflect the underlying comparison logic. Several alarms use
<=or>=comparisons but their UI text implied strict<or>comparisons, which could mislead users about exactly when alarms would trigger.Problem
Most alarms use logic like
level >= limitorlevel <= limit, but the UI language in.footerstrings and titles often said "above" or "below" without indicating that the threshold value itself would also trigger the alarm.For example:
level <= limit(fires at 20% if threshold is 20%)Summary of Issues Found
<=<=>=>not>=>=>=>=>not>=<=<=Changes
PhoneBatteryAlarmEditor.swift
PumpBatteryAlarmEditor.swift
COBAlarmEditor.swift
RecBolusAlarmEditor.swift
MissedBolusAlarmEditor.swift
Logic Reference
level <= limitlevel <= limitcob >= thresholdrec >= thresholdcarb.grams > minCarbGr(ignores <=)bolus.units > minBolusU(ignores <=)Not Changed
The MissedBolus "Ignore low BG" section was already correct:
BG > threshold(strict greater than)Testing
Note - no logic has been changed (so there are all 4 options, >, <, >=, <=) - whether it should be standardised so all alarms are >= or <= and the text updated to reflect that?
Closes: #507