SIGN IN SIGN UP

fix(alerts): fire threshold notifications automatically

Settings has had full support for temperature/battery threshold alerts
since v1.9 — per-component thresholds, notify toggles, a cooldown, and
a working Test Notification button — but nothing ever compared a live
reading against its threshold during normal operation. The firing
logic (pending_alerts(), tauri-plugin-notification) never survived the
egui migration; only the settings UI and test button were ported.

Adds alerts::pending_alerts, a pure function (11 unit tests) that
compares the latest PollStats against Settings.thresholds — exceeds
for CPU/GPU/RAM/disk temps and battery power draw (discharge only),
drops-below for battery charge. RigStatsApp::check_alerts calls it
whenever new stats arrive, gates on notify_on_warn/notify_on_crit,
tracks a per-"<component>_<level>" cooldown (alert_cooldowns), and
fires on a background thread so the multi-second notification script
never stalls a UI frame.

Generalized the Test Notification button's PowerShell NotifyIcon
balloon-tip script into windows::settings::send_notification so both
paths share one implementation.

Verified end-to-end: lowered the CPU warn threshold below the live
reading, confirmed a notification process launched automatically
within one poll tick and did not repeat inside the cooldown window.

Closes #179
D
Daniel Valfridsson committed
650229c7f4e1adc85dd50023c0aad6acd04646df
Parent: 30924e3