perf(ui): shared KPI cache, live-cache-backed alarm summary, coalesced debug renders

This commit is contained in:
Joseph Doherty
2026-08-14 20:53:38 -04:00
parent ee193cd2bb
commit 8c0b36b2fa
19 changed files with 1554 additions and 64 deletions
@@ -64,6 +64,14 @@ public class HealthPageTests : BunitContext
_comms.SetSiteCallAudit(siteCallAudit);
Services.AddSingleton(_comms);
// arch-review WP2.4 — the page no longer queries CommunicationService /
// IAuditLogQueryService per circuit; it reads the process-level memoized
// KPI cache. The real cache is registered here (not a substitute) so the
// scripted-actor seam above is still what actually answers.
Services.AddSingleton<IKpiSnapshotCache>(sp => new KpiSnapshotCache(
sp.GetRequiredService<CommunicationService>(),
sp.GetRequiredService<IServiceScopeFactory>()));
var aggregator = Substitute.For<ICentralHealthAggregator>();
aggregator.GetAllSiteStates()
.Returns(new Dictionary<string, SiteHealthState>());