Files
Heimdall/skills/dashboard-refresh-lifecycle/SKILL.md
T
arnaud.dartois 43e6752a31
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Successful in 17m33s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 5m5s
Heimdall Gitea / Build and scan agent image (push) Successful in 9m4s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m18s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 20m3s
Heimdall Gitea / CI policy (push) Successful in 3s
fix(web): make dashboard refresh disposal safe
Refs #298

Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-08 07:02:54 +01:00

1.4 KiB

name, description
name description
dashboard-refresh-lifecycle Maintain the Heimdall Web dashboard's post-render agent refresh loop and component shutdown behavior.

Dashboard refresh lifecycle

The dashboard starts its 15-second agent refresh only after the first interactive render. Keep the loop task and its CancellationTokenSource owned by the component. Capture the token once when starting the loop; do not read the mutable source inside the loop because disposal or a restart can replace it.

When the component is disposed, mark it disposed under the same synchronization used to start the loop, cancel the source, and let the loop finish before disposing that source. Handle a request cancellation as a normal shutdown, keep transient/401 load failures from escaping the renderer, and do not schedule StateHasChanged after disposal.

Acceptance

  • Exercise component disposal while a refresh is pending and confirm no renderer exception escapes.
  • Exercise an agent request failure (including unauthorized) and confirm dashboard rendering remains stable and no periodic work survives component disposal.
  • Run dotnet test tests/Heimdall.Web.Tests/Heimdall.Web.Tests.csproj.
  • For behavior changes, run the disposable Central + PostgreSQL Compose recipe from skills/compose-disposable-recipe/SKILL.md, then verify project resource and exact locally built image tag cleanup.