A navigation while an awaited load was still running disposed the component
first; the continuation then created a timer / added a singleton handler that
nothing ever disposed, rooting the dead circuit for the life of the process.
- Health: refresh timer created under _timerLock only if not disposed.
- DataConnections: same for the health-poll timer; also stops before touching
the disposed CTS when disposed during the first load.
- Deployments: subscribe to IDeploymentStatusNotifier BEFORE the first load
(the handler only schedules a reload; the generation guard orders flights).
- PendingUpdatesHealthTiles: the Invalidated subscription and the poll timer are
both created under a lifetime lock after a disposed check; Dispose unsubscribes
only what was subscribed (covers a dispose during the auth-state await too).
- AlarmSummary: StartTimer/StopTimer/Dispose atomic under _timerLock; StartTimer
refuses after dispose (Topology.StartLiveUpdatesTimer idiom).
Tests (each fails on the pre-fix component): HealthPageTests, DataConnectionsPageTests,
DeploymentsPerFlightScopeTests, PendingUpdatesHealthTilesTests (x2),
AlarmSummaryRenderTests - dispose mid-load, release the load, assert no timer and
no handler left.
- Deployments: every LoadDataAsync flight reads through its own scope, so
overlapping flights (push reload, debounce, page/tile click) no longer
collide on the circuit DbContext; the generation guard still orders results.
- Sites: Deploy Artifacts (per site and to all sites) resolves
ArtifactDeploymentService from a fresh scope, so the post-fan-out record,
audit rows and revision stamp neither share the circuit context nor die
with the circuit.
- Topology: Diff and Enable/Disable/Delete resolve DeploymentService from
their own scope (like Deploy/Deploy all), so they cannot overlap the 15 s
live tick; drops the unused AreaService/InstanceService injections.
- New ScopedServiceExtensions.InNewScopeAsync helper.
Tests: DeploymentsPerFlightScopeTests, SitesPageTests
DeployToAllSites_RunsInItsOwnScope_DisposedAfterTheAction, TopologyPageTests
UI8_InstanceActions_RunOnTheirOwnScope (all fail on the pre-fix pages).