docs(uns): clarify HasLazyChildren + cluster EntityId, add tie-break test (review I1/I2/M2)
This commit is contained in:
@@ -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"/> > 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 > 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);
|
||||
|
||||
Reference in New Issue
Block a user