fix(ui): drop stale-site poll results on Alarm Summary site switch (plan R2-07 T7)

This commit is contained in:
Joseph Doherty
2026-07-13 10:55:25 -04:00
parent 1fcfa4fb16
commit d33337a834
2 changed files with 43 additions and 0 deletions
@@ -291,6 +291,13 @@
try
{
var result = await AlarmSummaryService.GetSiteAlarmsAsync(siteId);
// Stale-site guard (arch-review R2 N4): the operator may have switched sites
// while this fan-out was in flight — drop the result rather than labeling
// site A's alarms under site B's picker. Mirrors OnLiveAlarmsChanged (:374).
if (_selectedSiteId != siteId)
{
return;
}
_rows = result.Alarms;
_notReporting = result.NotReportingInstances;
_rollup = AlarmSummaryService.ComputeRollup(_rows);