refactor(debugview): cosmetic polish — test-seam comment, default-arm comment, tighten severity assertion
This commit is contained in:
@@ -306,12 +306,9 @@
|
||||
private TreeView<DebugTreeNode>? _attrTree;
|
||||
private TreeView<DebugTreeNode>? _alarmTree;
|
||||
|
||||
/// <summary>
|
||||
/// Current-status enumeration of the live attribute dictionary. Read only on
|
||||
/// the render thread (CentralUI-021) — see <see cref="HandleStreamEvent"/>.
|
||||
/// The trees render from <see cref="AttributeForest"/>; this ordered view is
|
||||
/// the single render-thread reader of the raw dictionary.
|
||||
/// </summary>
|
||||
// Retained as a named enumeration target for DebugViewStreamRaceTests (reflection-based);
|
||||
// not consumed in the Blazor markup — the trees render from AttributeForest/AlarmForest.
|
||||
// Still enumerates the live _attributeValues dict on the render thread (CentralUI-021).
|
||||
private IReadOnlyList<AttributeValueChanged> FilteredAttributeValues =>
|
||||
string.IsNullOrWhiteSpace(_attrFilter)
|
||||
? _attributeValues.Values.OrderBy(a => a.AttributeName).ToList()
|
||||
@@ -565,6 +562,7 @@
|
||||
_alarmStates[al.AlarmName] = al;
|
||||
break;
|
||||
default:
|
||||
// Unknown event type — no re-render needed.
|
||||
return;
|
||||
}
|
||||
StateHasChanged();
|
||||
|
||||
@@ -202,7 +202,7 @@ public class DebugViewAlarmTableTests : BunitContext
|
||||
var leaf = binding.QuerySelector("ul[role='group'] li[role='treeitem']");
|
||||
Assert.NotNull(leaf);
|
||||
var leafMarkup = leaf!.OuterHtml;
|
||||
Assert.Contains("800", leafMarkup); // severity surfaced
|
||||
Assert.Contains("sev 800", leafMarkup); // severity surfaced
|
||||
Assert.Contains("Shelved", leafMarkup); // composite condition badge
|
||||
Assert.Contains("OPC UA", leafMarkup); // native kind badge
|
||||
Assert.Contains("Unacked", leafMarkup); // active + unacknowledged
|
||||
|
||||
Reference in New Issue
Block a user