On the Loop path the predictive low alarm reads the same array the chart draws, so a display setting switches a safety alarm off with no indication in the alarm UI.
AlarmTask.alarmPredictionData() returns predictionData when the device is Loop. That array is only populated in DeviceStatusLoop behind Storage.shared.downloadPrediction.value, and its length is predictionToLoad * 12, both of which live under Graph Settings. So:
- turning off prediction download leaves the array empty, and
LowBGCondition skips the whole predictive branch on its !isEmpty guard, so the alarm silently degrades to a plain low alarm
- setting Hours of Prediction below 1 shortens the alarm's look-ahead below whatever the user picked in the alarm editor, again with no indication
Neither is visible from the alarm screen, which still shows the predictive minutes the user chose.
The Trio and OpenAPS path is not affected. DeviceStatusOpenAPS keeps the full predBGs arrays and only uses predictionToLoad to bound a min and max scan, so the alarm gets its own series independent of the graph settings.
Fixing it properly probably means the alarm keeping its own copy of the Loop forecast rather than borrowing the chart's, the way the OpenAPS path already does. Happy to put a PR together if that sounds like the right shape.
On the Loop path the predictive low alarm reads the same array the chart draws, so a display setting switches a safety alarm off with no indication in the alarm UI.
AlarmTask.alarmPredictionData()returnspredictionDatawhen the device is Loop. That array is only populated inDeviceStatusLoopbehindStorage.shared.downloadPrediction.value, and its length ispredictionToLoad * 12, both of which live under Graph Settings. So:LowBGConditionskips the whole predictive branch on its!isEmptyguard, so the alarm silently degrades to a plain low alarmNeither is visible from the alarm screen, which still shows the predictive minutes the user chose.
The Trio and OpenAPS path is not affected.
DeviceStatusOpenAPSkeeps the fullpredBGsarrays and only usespredictionToLoadto bound a min and max scan, so the alarm gets its own series independent of the graph settings.Fixing it properly probably means the alarm keeping its own copy of the Loop forecast rather than borrowing the chart's, the way the OpenAPS path already does. Happy to put a PR together if that sounds like the right shape.