fix(ui): move Razor comment outside <select> start tag in Health.razor (circuit crash, #291)

Pre-existing render-crash (introduced by eb4bce3e): a @* *@ comment between
attributes inside the site-health-trends <select> start tag rendered as an
invalid attribute name in a real browser (InvalidCharacterError on setAttribute),
tearing down the SignalR circuit whenever Site Health Trends renders. bUnit's
virtual DOM masked it; the live Playwright smoke (KpiTiles) caught it. Comment
moved outside the start tag.
This commit is contained in:
Joseph Doherty
2026-06-19 04:16:01 -04:00
parent 4b8986036e
commit 7bd081ba50
@@ -89,10 +89,10 @@
<h6 class="text-muted mb-0 me-3">Site Health Trends</h6> <h6 class="text-muted mb-0 me-3">Site Health Trends</h6>
@if (_trendSiteKeys.Count > 0) @if (_trendSiteKeys.Count > 0)
{ {
@* OnTrendSiteChangedAsync is async — Blazor wraps it in an EventCallback so the returned Task IS awaited; keep the Async signature, do not change it to a void/fire-and-forget handler. This comment MUST stay OUTSIDE the <select> start tag: a Razor comment placed between attributes renders as an invalid attribute name and crashes the SignalR circuit (InvalidCharacterError on setAttribute). *@
<select class="form-select form-select-sm" style="width:auto" <select class="form-select form-select-sm" style="width:auto"
data-test="site-health-trends-site" data-test="site-health-trends-site"
value="@_trendSiteId" value="@_trendSiteId"
@* Blazor wraps this async handler in an EventCallback, so the returned Task IS awaited — keep the Async signature; do not change it to a void/fire-and-forget handler. *@
@onchange="OnTrendSiteChangedAsync"> @onchange="OnTrendSiteChangedAsync">
@foreach (var key in _trendSiteKeys) @foreach (var key in _trendSiteKeys)
{ {