You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface a proactive battery-level warning when any connected BLE sensor's battery drops below a configurable threshold, so users have time to swap batteries before starting a workout.
Motivation
The app already receives battery status notifications via batteryStatusReceived() in WorkoutDialog, but there is no proactive alert when the battery is low — the user must notice the passive indicator. A low-battery warning prevents mid-workout dropouts caused by depleted sensors.
Acceptance Criteria
A configurable battery warning threshold (default: 20%, range: 5–50%) is present in the Trainer preferences tab
When a sensor reports a battery level at or below the threshold, a dismissable toast or overlay is displayed listing the affected sensor type and battery level (e.g. ''Heart Rate sensor battery: 15%'')
The warning fires: (a) immediately on connection if the reported level is already below threshold, and (b) at the moment the level crosses the threshold during a session
The warning does not re-appear for the same sensor within the same session unless the battery level drops a further 5%
Battery warnings are compatible with all supported sensor types: HR, cadence, speed, power, combined speed/cadence, oxygen
Battery status is shown persistently in a small indicator (coloured dot) in the sensor pairing area throughout the workout
Unit tests cover threshold boundary logic (at threshold, just above, just below) and suppression of repeated alerts
Summary
Surface a proactive battery-level warning when any connected BLE sensor's battery drops below a configurable threshold, so users have time to swap batteries before starting a workout.
Motivation
The app already receives battery status notifications via
batteryStatusReceived()inWorkoutDialog, but there is no proactive alert when the battery is low — the user must notice the passive indicator. A low-battery warning prevents mid-workout dropouts caused by depleted sensors.Acceptance Criteria