Record touch and keyboard acceptance with isolated SQL validation

This commit is contained in:
Joseph Doherty
2026-11-13 23:10:30 -05:00
parent 7ee65d9cd0
commit 75a1e6238e
29 changed files with 705 additions and 9 deletions
@@ -0,0 +1,33 @@
@page "/density-pilot"
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
<h1>Local Raw virtualization verification</h1>
<p>Actual RawTree with800 synthetic already-loaded tags. Local in-memory context contains fixture-only records; browser/protocol sessions and mutations reject calls.</p>
<div id="density-fixture">
<RawTree Roots="_roots" PickerMode="true" SelectedTagIds="_selected" OnSelectionChanged="SelectedChanged" ResolveDescendantTagIds="ResolveTags" />
</div>
<output id="selection-count">@_selected.Count selected</output>
<output id="selection-request-count">@_selectionRequests</output>
@code {
private readonly HashSet<string> _selected = [];
private int _selectionRequests;
private List<RawNode> _roots = Build();
[SupplyParameterFromQuery] public bool Deep { get; set; }
protected override void OnParametersSet() { if(Deep) _roots = DeepRoots(); }
private static List<RawNode> DeepRoots()
{
var leaf = new RawNode { Kind=RawNodeKind.Tag, Key="deep-tag", DisplayName="Deep synthetic tag " + new string('x',120), EntityId="deep-tag" };
for(int i=24;i>=0;i--)
{
var parent = new RawNode { Kind=RawNodeKind.Folder, Key="deep-"+i, DisplayName="Synthetic folder level " + i, Expanded=true, Loaded=true, HasLazyChildren=true };
parent.Children.Add(leaf); leaf=parent;
}
return [leaf];
}
private static List<RawNode> Build()
{
var root = new RawNode { Kind=RawNodeKind.Device, Key="dev:local", DisplayName="Synthetic device", EntityId="device-local", ClusterId="synthetic", DriverType="Modbus", Expanded=true, Loaded=true, HasLazyChildren=true };
root.Children.AddRange(Enumerable.Range(0,800).Select(i => new RawNode { Kind=RawNodeKind.Tag, Key="tag:local-"+i, DisplayName=$"Synthetic tag {i:000}", EntityId="tag-local-"+i, ClusterId="synthetic" }));root.ChildCount=root.Children.Count;return [root];
}
private void SelectedChanged() { }
private Task<IReadOnlyList<string>> ResolveTags(RawNode node) { _selectionRequests++; return Task.FromResult<IReadOnlyList<string>>(node.Children.Select(n => n.EntityId!).ToArray()); }
}