Skip to content

Add color thresholds to the Info Display#693

Open
bjorkert wants to merge 2 commits into
devfrom
feature/info-display-color-thresholds
Open

Add color thresholds to the Info Display#693
bjorkert wants to merge 2 commits into
devfrom
feature/info-display-color-thresholds

Conversation

@bjorkert

@bjorkert bjorkert commented Jul 7, 2026

Copy link
Copy Markdown
Member

Closes #691.

Info Display rows can now turn yellow or red when their value crosses a user-set threshold — a purely visual cue, no alarm. Supported rows: IOB, COB, battery, pump battery, TDD, rec bolus, carbs today, and sensor/cannula/insulin ages. The concerning direction is fixed per metric (battery colors when low, ages when high) and in-range values read green.

Under the hood the parallel infoSort/infoVisible arrays are replaced by a single ordered [InfoDisplayItem] store (one-time migration via migrateStep10, plus a safety-net conversion in synchronizeInfoTypes). The Info Display settings screen is reworked into drill-in rows that stay reorderable while also opening a per-row detail (visibility + colors).

Individual info rows (IOB, COB, battery, pump battery, TDD, rec bolus,
carbs, and sensor/cannula/insulin ages) can now turn yellow or red when
their value crosses user-set thresholds — a visual cue only, with no
alarm. The concerning direction is fixed per metric (battery colors when
low, ages when high) and in-range values read green.

Replaces the parallel infoSort/infoVisible arrays with a single ordered
[InfoDisplayItem] store (migrated via migrateStep10), and reworks the
Info Display settings into drill-in rows that reorder and open a per-row
detail at the same time.
@bjorkert bjorkert linked an issue Jul 7, 2026 that may be closed by this pull request
Threshold entry now uses steppers with a per-type range and step, mirroring
the alarm editors, so values that need decimals (IOB, rec. bolus, the ages)
accept them. The old text fields re-parsed on every keystroke and swallowed
the decimal separator, making fractional thresholds impossible to enter.

Direction, unit, bounds and defaults move into a single InfoColorConfig per
type, so isColorable is simply "has a config".

The pump reservoir row is now colorable, low-is-concerning. Pumps that only
report "50+" count as exactly 50, matching what the reservoir alarm already
does with latestPumpVolume.
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

Successfully merging this pull request may close these issues.

New feaure idea: Info Display Color

1 participant