docs(uns): clarify HasLazyChildren + cluster EntityId, add tie-break test (review I1/I2/M2)

This commit is contained in:
Joseph Doherty
2026-06-08 12:18:37 -04:00
parent d9082e22e3
commit 3e8941bce4
2 changed files with 15 additions and 2 deletions
@@ -40,7 +40,12 @@ public sealed class UnsNode
/// <summary>Badge count. For equipment this is tag + virtual-tag count; for container nodes it is the direct child count.</summary>
public int ChildCount { get; set; }
/// <summary>True when this node has children that are loaded lazily (equipment with <see cref="ChildCount"/> &gt; 0).</summary>
/// <summary>
/// Gets a value indicating whether this node has children that load lazily (equipment with tags/virtual tags).
/// Structural nodes (Cluster/Area/Line) always carry <c>false</c> even when they have eager children, so a
/// renderer must decide whether to show an expand chevron with <c>Children.Count &gt; 0 || HasLazyChildren</c>,
/// not on <c>HasLazyChildren</c> alone.
/// </summary>
public bool HasLazyChildren { get; init; }
/// <summary>Eagerly-materialised children. Empty for lazy-loaded equipment until expanded.</summary>
@@ -162,7 +167,7 @@ public static class UnsTreeAssembly
? cluster.Name
: $"{cluster.Site} ({cluster.Name})",
ClusterId = cluster.ClusterId,
EntityId = cluster.ClusterId,
EntityId = cluster.ClusterId, // Cluster's own logical id IS its ClusterId — EntityId mirrors it for uniform navigation.
HasLazyChildren = false,
};
node.Children.AddRange(areaNodes);