feat(dashboard): make Galaxy browse and watch accessible

This commit is contained in:
Joseph Doherty
2026-11-13 18:19:08 -05:00
parent 5a1daab9ce
commit c9a6c31cb8
41 changed files with 1087 additions and 31 deletions
+53
View File
@@ -0,0 +1,53 @@
"""Actual BrowsePage/real projection/index; only cached synthetic metadata and fake redacted reads."""
import json,sys
from pathlib import Path
from playwright.sync_api import sync_playwright
ROOT=Path(__file__).resolve().parent
sys.path.insert(0,'/Users/dohertj2/.codex/worktrees/scada-ui-consistency/scadaproj/components/ui-theme/validation/theme-1.0.0/canary')
from browser_zoom import zoom_browser,set_browser_zoom
BASE=json.load(open('/tmp/mx-ui-browse-state.json'))['origin'];OUT=ROOT/'evidence/browse-confirmation';OUT.mkdir(exist_ok=True)
long='Pump01.'+'x'*200
results=[];errors=[]
def flow(page,touch=False,capture=None):
page.goto(BASE+'/browse-fixture');page.wait_for_selector('html[data-mx-ready="true"]');page.evaluate('document.fonts.ready')
page.get_by_role('button',name='Expand SyntheticPlant',exact=True).tap() if touch else page.get_by_role('button',name='Expand SyntheticPlant',exact=True).press('Enter')
page.get_by_role('button',name='Expand Pump01',exact=True).tap() if touch else page.get_by_role('button',name='Expand Pump01',exact=True).press('Space')
watch=page.get_by_role('button',name='Watch Pump01.PV',exact=True);watch.tap() if touch else watch.press('Space')
page.wait_for_function("document.querySelectorAll('.sub-table tbody tr').length===1")
watch.tap() if touch else watch.press('Space');assert page.locator('.sub-table tbody tr').count()==1
page.get_by_role('button',name='Watch '+long,exact=True).tap() if touch else page.get_by_role('button',name='Watch '+long,exact=True).press('Enter')
page.wait_for_function("document.querySelectorAll('.sub-table tbody tr').length===2")
assert long in page.locator('.sub-table').inner_text()
targets=page.locator('.tree-node-toggle,.tree-watch,.sub-actions-col button').evaluate_all('(es)=>es.map(e=>({name:e.getAttribute("aria-label")||e.textContent.trim(),width:e.getBoundingClientRect().width,height:e.getBoundingClientRect().height}))')
if capture:page.screenshot(path=str(OUT/f'expanded-{capture}.png'),full_page=False)
region=page.get_by_role('region',name='Watched attribute values',exact=True)
region.evaluate('(e)=>e.scrollLeft=0');region.focus();page.keyboard.press('Tab')
page.wait_for_function("document.querySelector('.sub-table').closest('[role=region]').scrollLeft>0")
assert page.get_by_role('button',name='Remove Pump01.PV',exact=True).evaluate('(e)=>e===document.activeElement')
search=page.get_by_role('searchbox',name='Filter Galaxy attributes');search.fill('PV')
page.get_by_test_id('browse-search-status').filter(has_text='2 matching attributes.').wait_for()
page.get_by_role('button',name='Watch Pump01.PV',exact=True).tap() if touch else page.get_by_role('button',name='Watch Pump01.PV',exact=True).press('Space');assert page.locator('.sub-table tbody tr').count()==2
search.fill('no-such-fixture');page.get_by_text('No attributes match',exact=False).wait_for()
page.get_by_role('button',name='Clear search',exact=True).tap() if touch else page.get_by_role('button',name='Clear search',exact=True).click()
page.wait_for_function("document.activeElement.id==='browse-search'")
assert page.locator('.sub-table tbody tr').count()==2
return {'viewport':page.evaluate('innerWidth'),'scroll':page.evaluate('document.documentElement.scrollWidth'),'coarse':page.evaluate("matchMedia('(pointer:coarse)').matches"),'targets':targets,'namedScrollRegions':page.get_by_role('region').count(),'workflow':['keyboardExpand','spaceWatch','repeatedWatchNoDuplicate','fullLongPathPreserved','searchWatchSameSubscription','noMatchClearFocus','subscriptionsRetained','namedScrollerTabReachesActions']}
with sync_playwright() as p:
with zoom_browser(p) as (ctx,worker):
page=ctx.new_page();page.on('pageerror',lambda e:errors.append(str(e)))
for width,zoom in [(1440,1),(1024,1),(390,1),(1440,2)]:
page.set_viewport_size({'width':width,'height':900});page.goto(BASE+'/browse-fixture');set_browser_zoom(worker,page,zoom)
result=flow(page,capture=f'{width}-zoom{zoom}');result['zoom']=zoom;result['dpr']=page.evaluate('devicePixelRatio');results.append(result)
page.screenshot(path=str(OUT/f'browse-{width}-zoom{zoom}.png'),full_page=False)
set_browser_zoom(worker,page,1)
browser=p.chromium.launch(channel='chromium',headless=True)
page=browser.new_page(viewport={'width':390,'height':844},is_mobile=True,has_touch=True)
page.on('pageerror',lambda e:errors.append(str(e)))
page.goto(BASE+'/browse-fixture');cdp=page.context.new_cdp_session(page);cdp.send('Emulation.setTouchEmulationEnabled',{'enabled':True,'maxTouchPoints':1})
assert page.evaluate("matchMedia('(pointer:coarse)').matches && navigator.maxTouchPoints===1")
result=flow(page,touch=True,capture='coarse390');results.append(result)
page.screenshot(path=str(OUT/'browse-coarse390.png'),full_page=False);browser.close()
assert all(r['scroll']<=r['viewport'] for r in results)
assert all(min(t['width'],t['height'])>=44 for r in results if r['coarse'] for t in r['targets'])
(OUT/'results.json').write_text(json.dumps({'cases':results,'errors':errors},indent=2))
print(json.dumps({'cases':len(results),'overflow':[(r['viewport'],r['scroll']) for r in results if r['scroll']>r['viewport']],'coarseBelow44':[t for r in results if r['coarse'] for t in r['targets'] if min(t['width'],t['height'])<44],'errors':errors},indent=2))
@@ -0,0 +1,6 @@
{
"cases": 5,
"overflow": [],
"coarseBelow44": [],
"errors": []
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

@@ -0,0 +1,278 @@
{
"cases": [
{
"viewport": 1440,
"scroll": 1440,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove Pump01.PV",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 2,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained",
"namedScrollerTabReachesActions"
],
"zoom": 1,
"dpr": 1
},
{
"viewport": 1024,
"scroll": 1024,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove Pump01.PV",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 2,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained",
"namedScrollerTabReachesActions"
],
"zoom": 1,
"dpr": 1
},
{
"viewport": 390,
"scroll": 390,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove Pump01.PV",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 2,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained",
"namedScrollerTabReachesActions"
],
"zoom": 1,
"dpr": 1
},
{
"viewport": 720,
"scroll": 720,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.671875
},
{
"name": "Collapse Pump01",
"width": 86.078125,
"height": 19.671875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.4609375
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.4609375
},
{
"name": "Expand Sibling01",
"width": 91.359375,
"height": 19.671875
},
{
"name": "Remove Pump01.PV",
"width": 66.515625,
"height": 27.4609375
},
{
"name": "Remove Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 66.515625,
"height": 27.4609375
}
],
"namedScrollRegions": 2,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained",
"namedScrollerTabReachesActions"
],
"zoom": 2,
"dpr": 2
},
{
"viewport": 390,
"scroll": 390,
"coarse": true,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 44
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 44
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 44
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 44
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 44
},
{
"name": "Remove Pump01.PV",
"width": 66.515625,
"height": 44
},
{
"name": "Remove Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 66.515625,
"height": 44
}
],
"namedScrollRegions": 2,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained",
"namedScrollerTabReachesActions"
]
}
],
"errors": []
}
@@ -0,0 +1,6 @@
{
"cases": 5,
"overflow": [],
"coarseBelow44": [],
"errors": []
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

@@ -0,0 +1,273 @@
{
"cases": [
{
"viewport": 1440,
"scroll": 1440,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 0,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained"
],
"zoom": 1,
"dpr": 1
},
{
"viewport": 1024,
"scroll": 1024,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 0,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained"
],
"zoom": 1,
"dpr": 1
},
{
"viewport": 390,
"scroll": 390,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 0,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained"
],
"zoom": 1,
"dpr": 1
},
{
"viewport": 720,
"scroll": 720,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.671875
},
{
"name": "Collapse Pump01",
"width": 86.078125,
"height": 19.671875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.4609375
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.4609375
},
{
"name": "Expand Sibling01",
"width": 91.359375,
"height": 19.671875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.4609375
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.4609375
}
],
"namedScrollRegions": 0,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained"
],
"zoom": 2,
"dpr": 2
},
{
"viewport": 390,
"scroll": 390,
"coarse": false,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.6875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 0,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained"
]
}
],
"errors": []
}
@@ -0,0 +1,52 @@
{
"viewport": 390,
"scroll": 390,
"coarse": true,
"targets": [
{
"name": "Collapse SyntheticPlant",
"width": 128.78125,
"height": 19.6875
},
{
"name": "Collapse Pump01",
"width": 86.09375,
"height": 19.6875
},
{
"name": "Watch Pump01.PV",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Watch Pump01.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"width": 56.546875,
"height": 27.46875
},
{
"name": "Expand Sibling01",
"width": 91.375,
"height": 19.687469482421875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
},
{
"name": "Remove",
"width": 66.515625,
"height": 27.46875
}
],
"namedScrollRegions": 0,
"workflow": [
"keyboardExpand",
"spaceWatch",
"repeatedWatchNoDuplicate",
"fullLongPathPreserved",
"searchWatchSameSubscription",
"noMatchClearFocus",
"subscriptionsRetained"
]
}
@@ -0,0 +1,13 @@
Determining projects to restore...
Restored /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/ZB.MOM.WW.MxGateway.Contracts.csproj (in 159 ms).
Restored /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj (in 198 ms).
Restored /Users/dohertj2/Desktop/MxAccessGateway/docs/ui-validation/host/MxUiCanary.csproj (in 198 ms).
ZB.MOM.WW.MxGateway.Contracts -> /tmp/mx-ui-browse-artifacts/bin/ZB.MOM.WW.MxGateway.Contracts/release_net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /tmp/mx-ui-browse-artifacts/bin/ZB.MOM.WW.MxGateway.Server/release/ZB.MOM.WW.MxGateway.Server.dll
MxUiCanary -> /tmp/mx-ui-browse-artifacts/bin/MxUiCanary/release/MxUiCanary.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:02.91
@@ -0,0 +1,9 @@
Determining projects to restore...
All projects are up-to-date for restore.
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
Passed! - Failed: 0, Passed: 7, Skipped: 0, Total: 7, Duration: 23 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
+18
View File
@@ -0,0 +1,18 @@
Determining projects to restore...
All projects are up-to-date for restore.
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.20] ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeAccessibilityTests.LazyNode_HasNamedNativeExpansionAndControlledRegion [FAIL]
Failed ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeAccessibilityTests.LazyNode_HasNamedNativeExpansionAndControlledRegion [1 ms]
Error Message:
Assert.Contains() Failure: Sub-string not found
String: "<div class="tree-node"><div class="tree-r"···
Not found: "aria-label="Expand Pump01""
Stack Trace:
at ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseTreeAccessibilityTests.LazyNode_HasNamedNativeExpansionAndControlledRegion() in /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/BrowseTreeAccessibilityTests.cs:line 23
--- End of stack trace from previous location ---
Failed! - Failed: 1, Passed: 1, Skipped: 0, Total: 2, Duration: 29 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
@@ -0,0 +1,9 @@
Determining projects to restore...
All projects are up-to-date for restore.
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
Passed! - Failed: 0, Passed: 12, Skipped: 0, Total: 12, Duration: 33 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
@@ -0,0 +1,13 @@
Determining projects to restore...
Restored /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/ZB.MOM.WW.MxGateway.Contracts.csproj (in 435 ms).
Restored /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj (in 446 ms).
Restored /Users/dohertj2/Desktop/MxAccessGateway/docs/ui-validation/host/MxUiCanary.csproj (in 446 ms).
ZB.MOM.WW.MxGateway.Contracts -> /tmp/mx-ui-browse3-artifacts/bin/ZB.MOM.WW.MxGateway.Contracts/release_net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /tmp/mx-ui-browse3-artifacts/bin/ZB.MOM.WW.MxGateway.Server/release/ZB.MOM.WW.MxGateway.Server.dll
MxUiCanary -> /tmp/mx-ui-browse3-artifacts/bin/MxUiCanary/release/MxUiCanary.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:02.56
@@ -0,0 +1,13 @@
Determining projects to restore...
Restored /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/ZB.MOM.WW.MxGateway.Contracts.csproj (in 139 ms).
Restored /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj (in 150 ms).
Restored /Users/dohertj2/Desktop/MxAccessGateway/docs/ui-validation/host/MxUiCanary.csproj (in 150 ms).
ZB.MOM.WW.MxGateway.Contracts -> /tmp/mx-ui-browse2-artifacts/bin/ZB.MOM.WW.MxGateway.Contracts/release_net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /tmp/mx-ui-browse2-artifacts/bin/ZB.MOM.WW.MxGateway.Server/release/ZB.MOM.WW.MxGateway.Server.dll
MxUiCanary -> /tmp/mx-ui-browse2-artifacts/bin/MxUiCanary/release/MxUiCanary.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:02.25
@@ -0,0 +1,9 @@
Determining projects to restore...
All projects are up-to-date for restore.
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
Passed! - Failed: 0, Passed: 12, Skipped: 0, Total: 12, Duration: 30 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
+20
View File
@@ -0,0 +1,20 @@
Determining projects to restore...
All projects are up-to-date for restore.
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Server.dll
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Release/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.21] ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseSearchAccessibilityTests.Search_HasPersistentLabelHintAndControlledResults [FAIL]
Failed ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseSearchAccessibilityTests.Search_HasPersistentLabelHintAndControlledResults [37 ms]
Error Message:
Assert.Contains() Failure: Sub-string not found
String: "\n\n<div class="dashboard-page-header"><div"···
Not found: "for="browse-search""
Stack Trace:
at ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseSearchAccessibilityTests.Search_HasPersistentLabelHintAndControlledResults() in /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/BrowseSearchAccessibilityTests.cs:line 30
at ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseSearchAccessibilityTests.Search_HasPersistentLabelHintAndControlledResults() in /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/BrowseSearchAccessibilityTests.cs:line 37
at ZB.MOM.WW.MxGateway.Tests.Dashboard.BrowseSearchAccessibilityTests.Search_HasPersistentLabelHintAndControlledResults() in /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/BrowseSearchAccessibilityTests.cs:line 37
--- End of stack trace from previous location ---
Failed! - Failed: 1, Passed: 0, Skipped: 0, Total: 1, Duration: 43 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
@@ -0,0 +1,5 @@
@namespace MxUiCanary.Components
@page "/browse-fixture"
@inject IJSRuntime JS
<ThemeShell Product="Synthetic MX browse"><ChildContent><p>Synthetic cached Galaxy and redacted fixture values. No COM or worker.</p><BrowsePage/></ChildContent></ThemeShell>
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
@@ -1,2 +1,2 @@
@namespace MxUiCanary.Components
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><base href="/"/><link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css"/><ThemeHead/><link rel="stylesheet" href="/css/site.css"/></head><body class="dashboard-body"><FixtureBody @rendermode="InteractiveServer"/><script>window.mxCanaryReady=()=>document.documentElement.dataset.mxReady='true';</script><script src="/_framework/blazor.web.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><base href="/"/><link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css"/><ThemeHead/><link rel="stylesheet" href="/css/site.css"/><HeadOutlet @rendermode="InteractiveServer"/></head><body class="dashboard-body"><FixtureRoutes @rendermode="InteractiveServer"/><script>window.mxCanaryReady=()=>document.documentElement.dataset.mxReady='true';</script><script src="/_framework/blazor.web.js"></script></body></html>
@@ -0,0 +1,2 @@
@namespace MxUiCanary.Components
<Router AppAssembly="typeof(FixtureRoutes).Assembly"><Found Context="route"><RouteView RouteData="route"/></Found></Router>
@@ -5,3 +5,5 @@
@using ZB.MOM.WW.Theme
@using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Shared
@using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Pages
@using Microsoft.AspNetCore.Components.Routing
+30 -1
View File
@@ -102,4 +102,33 @@ using ZB.MOM.WW.MxGateway.Server.Security.Authorization;
authenticationType: "test",
nameType: ClaimTypes.Name,
roleType: ClaimTypes.Role))));
}
}
// In-memory Galaxy projection and read-only fake values for the actual BrowsePage.
internal sealed class FixtureGalaxyCache : ZB.MOM.WW.GalaxyRepository.IGalaxyHierarchyCache
{
public ZB.MOM.WW.GalaxyRepository.GalaxyHierarchyCacheEntry Current { get; }
public FixtureGalaxyCache()
{
var plant = new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject { GobjectId = 1, TagName = "SyntheticPlant", BrowseName = "SyntheticPlant", IsArea = true };
var pump = new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject { GobjectId = 2, ParentGobjectId = 1, TagName = "Pump01", BrowseName = "Pump01" };
pump.Attributes.Add(new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyAttribute { AttributeName = "PV", FullTagReference = "Pump01.PV", DataTypeName = "Float" });
pump.Attributes.Add(new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyAttribute { AttributeName = new string('x', 200), FullTagReference = "Pump01." + new string('x', 200), DataTypeName = "Float" });
var sibling = new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject { GobjectId = 3, ParentGobjectId = 1, TagName = "Sibling01", BrowseName = "Sibling01" };
sibling.Attributes.Add(new ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyAttribute { AttributeName = "PV", FullTagReference = "Sibling01.PV", DataTypeName = "Float" });
ZB.MOM.WW.GalaxyRepository.Grpc.GalaxyObject[] rows = [plant, pump, sibling];
Current = ZB.MOM.WW.GalaxyRepository.GalaxyHierarchyCacheEntry.Empty with {
Status = ZB.MOM.WW.GalaxyRepository.GalaxyCacheStatus.Healthy, Sequence = 1,
Objects = rows, Index = ZB.MOM.WW.GalaxyRepository.GalaxyHierarchyIndex.Build(rows), ObjectCount = rows.Length, AttributeCount = 3,
LastSuccessAt = DateTimeOffset.UtcNow,
};
}
public Task RefreshAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task WaitForFirstLoadAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class FixtureLiveData : IDashboardLiveDataService
{
public Task<DashboardLiveReadResult> ReadAsync(IReadOnlyCollection<string> tagAddresses, CancellationToken cancellationToken) =>
Task.FromResult(new DashboardLiveReadResult(tagAddresses.Select(tag => new DashboardTagValue(tag, true, "[redacted]", "Float", 192, true, DateTimeOffset.UnixEpoch, null)).ToArray(), null, "synthetic-no-worker", null));
public Task<DashboardAlarmQueryResult> QueryAlarmsAsync(CancellationToken cancellationToken) =>
Task.FromResult(new DashboardAlarmQueryResult([], null, null));
}
+6
View File
@@ -10,6 +10,12 @@ builder.Services.AddSingleton<IDashboardSnapshotService, StubSnapshotService>();
builder.Services.AddSingleton<IDashboardSnapshotFeed, IdleSnapshotFeed>();
builder.Services.AddSingleton<IDashboardApiKeyManagementService, ManagingApiKeyService>();
builder.Services.AddSingleton<AuthenticationStateProvider, StubAuthenticationStateProvider>();
builder.Services.AddSingleton<ZB.MOM.WW.GalaxyRepository.IGalaxyHierarchyCache, FixtureGalaxyCache>();
builder.Services.AddSingleton<IDashboardBrowseService, DashboardBrowseService>();
builder.Services.AddSingleton<IDashboardLiveDataService, FixtureLiveData>();
builder.Services.AddSingleton<ZB.MOM.WW.GalaxyRepository.IGalaxyDeployNotifier, ZB.MOM.WW.GalaxyRepository.GalaxyDeployNotifier>();
builder.Services.AddSingleton<DashboardBrowseSearchIndex>();
builder.Services.AddScoped<DashboardCircuitConnectionTracker>();
var app = builder.Build();
app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(Path.GetFullPath("../../../src/ZB.MOM.WW.MxGateway.Server/wwwroot")) });
app.UseStaticFiles();app.UseAntiforgery();
@@ -0,0 +1,61 @@
# Keyboard, search and touch browse validation
MX-01, MX-03 and MX-07 implemented against the actual BrowsePage and recursive
BrowseTreeNodeView. Existing lazy projection, search index/debounce/cap,
subscription deduplication, read scope, cancellation and live-read paths are retained.
Only synthetic cached Galaxy metadata and redacted fake reads were exercised here.
No COM, SQL, worker, LDAP or live key/session operation was involved.
Each expandable node has one native named button, explicit expanded state and a
stable controlled container. Leaf objects do not advertise unavailable expansion.
Explicit Watch actions on hierarchy attributes and search hits call the same
AddTagAsync path as the retained mouse accelerators. A second Watch does not add
another subscription. Visible introductory copy now makes Watch the primary path.
The search has a persistent visible label, cached-metadata boundary hint and
controlled-results relationship. Its caller-owned polite result summary follows
user searches, not the two-second value poll. Clear search cancels the existing
search through its established setter and restores input focus after render.
Search does not touch watched values; no-match/clear preserves subscribed rows.
Named focusable hierarchy/search/table regions contain long content. Full 207-character
fixture references remain copyable and Watch stays at the tree's visible right edge.
Remove actions name their full tag; a keyboard user can Tab from the named table
scroller to a last-column action, which scrolls it into view. Pointer-coarse browse
controls have 44 px minimum hit areas; desktop row sizes retain their compact geometry.
The published Theme 1.0.1 supplies typography/tokens/focus; its package currently has
no generic coarse-pointer sizing utility, so these domain-specific sizes remain local
as allowed by the chapter's tree/control ownership. No shared-grid CSS was copied.
## Observed evidence
- Named expansion regression failed on the original generic toggle; leaf control
case remained green. Search label/hint/control regression failed before the field
contract. After implementation, 12 focused tree/search/projection/index tests pass.
Framework HtmlRenderer remains; no bUnit dependency was added.
- Actual synthetic routed fixture uses the production BrowsePage, recursive nodes,
DashboardBrowseService projection and real DashboardBrowseSearchIndex. Its singleton
cache/read providers are entirely in memory. The host now routes both native-dialog
and browse fixtures through a standard Router and provides HeadOutlet.
- One first batched inspection and one corrective confirmation cover 1440/1024/390px,
real 200% zoom (720 CSS px/DPR 2), and coarse-pointer 390px. All five final workflows pass:
keyboard expansion/Watch, repeated Watch with one row, preserved full long reference,
search-hit Watch without duplicate, no-match/Clear/focus and retained subscriptions.
Named scroller Tab reaches a full-context Remove action. No document overflow or
browser page errors. See `evidence/browse-confirmation/results.json` and images.
- The first touch-context request did not actually enable touch on this installed
Chromium: navigator.maxTouchPoints remained 0 and pointer:coarse was false. This
is visible in the first JSON and was not accepted as touch proof. Explicit browser
CDP touch emulation then establishes maxTouchPoints 1 and pointer:coarse=true.
`coarse-before.json` reproduces 19.7 px node/27.5 px Watch/Remove heights. The final
actual coarse mode reports 44 px heights; its primary expand/Watch/Clear path uses
touchscreen tap events. No CSS-only media override or screenshot relabeling.
- First/corrective screenshots were inspected together. The correction names scroll
regions, keeps Watch visible for long rows and expands only coarse-pointer targets.
Full gateway regression testing remains at the chapter phase boundary; current
evidence does not claim live COM/ACL integration or human screen-reader listening.
The shared Theme compatibility/native-dialog checkpoint is documented separately in
`technical-light-dialogs.md`. Fault-first overview, remaining token/state cleanup,
recoverable diagnostic behavior, rail vocabulary and shared Secrets release adoption
remain separate chapter tasks; this browse checkpoint does not close them.
@@ -24,10 +24,22 @@
<div class="section-heading">
<h2>Galaxy Hierarchy</h2>
</div>
<input class="form-control form-control-sm browse-search"
placeholder="Filter attributes by name or reference…"
@bind="Search"
@bind:event="oninput" />
<TechField Label="Filter Galaxy attributes" For="browse-search" HintId="browse-search-hint"
Hint="Search cached attribute names or references. Values are not searched.">
<div class="browse-search-controls">
<input @ref="_searchInput" id="browse-search" type="search" class="form-control form-control-sm browse-search"
placeholder="Name or reference…" aria-describedby="browse-search-hint" aria-controls="browse-results"
@bind="Search" @bind:event="oninput" />
<TechButton Variant="ButtonVariant.Secondary" Size="ButtonSize.Small" disabled="@(Search.Length == 0)" @onclick="ClearSearch">Clear search</TechButton>
</div>
</TechField>
<div id="browse-results" aria-busy="@(_searchPending ? "true" : "false")">
@if (!string.IsNullOrWhiteSpace(Search))
{
<p role="status" class="browse-search-note" data-testid="browse-search-status">
@(_searchPending ? "Searching cached attributes…" : _searchError is not null ? "Search unavailable." : $"{_searchMatches.Count} matching attribute{(_searchMatches.Count == 1 ? "" : "s")}{(_searchMatches.Count >= SearchResultLimit ? " shown; refine the filter for more specific results." : ".")}")
</p>
}
@if (_roots.Count == 0)
{
@@ -48,11 +60,11 @@
}
else if (_searchMatches.Count == 0)
{
<div class="empty-state">No attributes match &ldquo;@Search&rdquo;.</div>
<div class="empty-state">No attributes match &ldquo;@Search&rdquo;. Clear search to return to the hierarchy.</div>
}
else
{
<div class="browse-tree browse-search-results">
<div class="browse-tree browse-search-results" role="region" aria-label="Galaxy search results" tabindex="0">
@foreach (GalaxyAttribute hit in _searchMatches)
{
GalaxyAttribute row = hit;
@@ -72,6 +84,10 @@
{
<span class="attr-flag attr-flag-hist">hist</span>
}
<button type="button" class="btn btn-outline-secondary btn-sm tree-watch"
aria-label="@($"Watch {row.FullTagReference}")"
@ondblclick:stopPropagation="true"
@onclick="() => AddTagAsync(row.FullTagReference)">Watch</button>
</div>
}
</div>
@@ -88,7 +104,7 @@
<div class="alert alert-info browse-stale-banner" role="status"
@onclick="ClearStaleBanner">@_staleBanner</div>
}
<div class="browse-tree">
<div class="browse-tree" role="region" aria-label="Galaxy hierarchy" tabindex="0">
@foreach (DashboardBrowseNode root in _roots)
{
<BrowseTreeNodeView Node="root"
@@ -97,8 +113,9 @@
OnLoadChildren="LoadChildrenAsync" />
}
</div>
<div class="browse-search-note">Double-click a tag, or right-click for the menu.</div>
<div class="browse-search-note">Choose Watch to add an attribute. Double-click and the right-click menu are also available.</div>
}
</div>
</section>
<section class="dashboard-section browse-panel">
@@ -135,14 +152,13 @@
@if (_subscribed.Count == 0)
{
<div class="empty-state">
No tags subscribed. Right-click a tag in the hierarchy and choose
<strong>Add to subscription panel</strong> (or double-click it) to watch its
live value, quality and source timestamp here.
No tags subscribed. Choose Watch beside an attribute to see its live value, quality and source timestamp here.
Double-click and <strong>Add to subscription panel</strong> in the context menu are also available.
</div>
}
else
{
<div class="table-responsive">
<div class="table-responsive" role="region" aria-label="Watched attribute values" tabindex="0">
<table class="table table-sm dashboard-table sub-table">
<thead>
<tr>
@@ -151,7 +167,7 @@
<th scope="col">Type</th>
<th scope="col">Quality</th>
<th scope="col">Updated</th>
<th scope="col" class="sub-actions-col"></th>
<th scope="col" class="sub-actions-col">Actions</th>
</tr>
</thead>
<tbody>
@@ -183,6 +199,7 @@
<td class="sub-actions-col">
<button type="button"
class="btn btn-outline-secondary btn-sm"
aria-label="@($"Remove {key}")"
@onclick="@(() => RemoveTag(key))">Remove</button>
</td>
</tr>
@@ -209,6 +226,25 @@
}
@code {
private ElementReference _searchInput;
private bool _focusSearch;
private bool _disposing;
private void ClearSearch()
{
Search = string.Empty;
_focusSearch = true;
}
/// <inheritdoc />
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (!_focusSearch || _disposing) return;
_focusSearch = false;
try { await _searchInput.FocusAsync(); }
catch (Microsoft.JSInterop.JSDisconnectedException) { }
}
private const int SearchResultLimit = 300;
// Keystrokes inside this window coalesce into one search: typing a tag name no
@@ -653,6 +689,7 @@
/// <inheritdoc />
public async ValueTask DisposeAsync()
{
_disposing = true;
try
{
await _cts.CancelAsync().ConfigureAwait(false);
@@ -3,7 +3,7 @@
@*
Recursive Browse hierarchy node. Renders one Galaxy object, its child
objects (recursively, lazy-loaded on first expand), and its attributes as
right-clickable tag rows. Expansion state is local; children render only
explicitly watchable tag rows (with mouse accelerators). Expansion state is local; children render only
while expanded.
The expand triangle is shown whenever the server's child_has_children
@@ -16,27 +16,36 @@
<div class="tree-row @(Node.IsArea ? "tree-row-area" : "tree-row-object")">
@if (ShowToggle())
{
<button type="button" class="tree-toggle" @onclick="ToggleAsync" aria-label="Toggle">
@(_expanded ? "▾" : "▸")
<button type="button" class="tree-node-toggle" @onclick="ToggleAsync"
aria-label="@($"{(_expanded ? "Collapse" : "Expand")} {Node.DisplayName}")"
aria-expanded="@(_expanded ? "true" : "false")" aria-controls="@ChildrenId">
<span class="tree-toggle" aria-hidden="true">@(_expanded ? "▾" : "▸")</span>
<span class="tree-icon" aria-hidden="true">@(Node.IsArea ? "▣" : "◇")</span>
<span class="tree-name">@Node.DisplayName</span>
@if (!string.IsNullOrWhiteSpace(Node.Object.TagName)
&& !string.Equals(Node.Object.TagName, Node.DisplayName, StringComparison.Ordinal))
{
<code class="tree-tag">@Node.Object.TagName</code>
}
</button>
}
else
{
<span class="tree-toggle tree-toggle-empty"></span>
<span class="tree-toggle tree-toggle-empty" aria-hidden="true"></span>
<span class="tree-label tree-leaf-label">
<span class="tree-icon" aria-hidden="true">@(Node.IsArea ? "▣" : "◇")</span>
<span class="tree-name">@Node.DisplayName</span>
@if (!string.IsNullOrWhiteSpace(Node.Object.TagName)
&& !string.Equals(Node.Object.TagName, Node.DisplayName, StringComparison.Ordinal))
{
<code class="tree-tag">@Node.Object.TagName</code>
}
</span>
}
<span class="tree-label" @onclick="ToggleAsync">
<span class="tree-icon">@(Node.IsArea ? "▣" : "◇")</span>
<span class="tree-name">@Node.DisplayName</span>
@if (!string.IsNullOrWhiteSpace(Node.Object.TagName)
&& !string.Equals(Node.Object.TagName, Node.DisplayName, StringComparison.Ordinal))
{
<code class="tree-tag">@Node.Object.TagName</code>
}
</span>
</div>
<div id="@ChildrenId" class="tree-children" hidden="@(!_expanded)">
@if (_expanded)
{
<div class="tree-children">
@if (Node.LoadState == BrowseLoadState.Loading)
{
<div class="tree-load-status text-secondary">
@@ -81,19 +90,24 @@
{
<span class="attr-flag attr-flag-hist">hist</span>
}
<button type="button" class="btn btn-outline-secondary btn-sm tree-watch"
aria-label="@($"Watch {row.FullTagReference}")"
@ondblclick:stopPropagation="true"
@onclick="() => OnAddTag.InvokeAsync(row.FullTagReference)">Watch</button>
</div>
}
</div>
}
</div>
</div>
@code {
private readonly string ChildrenId = $"browse-children-{Guid.NewGuid():N}";
/// <summary>The hierarchy node this view renders.</summary>
[Parameter]
[EditorRequired]
public DashboardBrowseNode Node { get; set; } = null!;
/// <summary>Raised with a tag's full reference when the operator double-clicks it.</summary>
/// <summary>Raised with a tag's full reference when Watch or its mouse accelerator is activated.</summary>
[Parameter]
public EventCallback<string> OnAddTag { get; set; }
@@ -547,3 +547,22 @@ code {
.dashboard-native-dialog .modal-header, .dashboard-native-dialog .modal-footer { flex-shrink: 0; }
.dashboard-native-dialog.api-key-create-modal .modal-body { min-height: 0; max-height: none; overflow-y: auto; }
.dashboard-native-dialog .native-dialog-feedback { margin: 0; border-radius: 0; flex-shrink: 0; }
/* One native expansion target per node; Watch uses the existing subscription path. */
.tree-node-toggle {
display: flex; align-items: center; gap: .35rem; min-width: 0;
padding: 0; border: 0; background: transparent; color: inherit;
font: inherit; text-align: left; cursor: pointer;
}
.tree-leaf-label { cursor: default; }
.tree-watch { margin-left: auto; flex-shrink: 0; }
.browse-search-controls { display: flex; align-items: start; flex-wrap: wrap; gap: .5rem; }
.browse-search-controls .browse-search { flex: 1 1 12rem; min-width: 0; }
/* Domain tree/table containment; compact desktop rows retain their existing size. */
.browse-panel { min-width: 0; }
.tree-watch { position: sticky; right: 0; }
@media (pointer: coarse) {
.browse-layout button, .browse-search-controls .form-control { min-width: 44px; min-height: 44px; }
}
@@ -0,0 +1,58 @@
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using ZB.MOM.WW.GalaxyRepository;
using ZB.MOM.WW.GalaxyRepository.Grpc;
using ZB.MOM.WW.MxGateway.Server.Dashboard;
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Pages;
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
/// <summary>Persistent search semantics against real cache projection; interaction uses browser fixtures.</summary>
public sealed class BrowseSearchAccessibilityTests
{
/// <summary>The purpose and metadata-only boundary remain visible after typing.</summary>
[Fact]
public async Task Search_HasPersistentLabelHintAndControlledResults()
{
ServiceCollection services = new();
services.AddLogging();
services.AddSingleton<IGalaxyHierarchyCache, InMemoryCache>();
services.AddSingleton<IDashboardBrowseService, DashboardBrowseService>();
services.AddSingleton<IGalaxyDeployNotifier, GalaxyDeployNotifier>();
services.AddSingleton<DashboardBrowseSearchIndex>();
services.AddScoped<DashboardCircuitConnectionTracker>();
services.AddSingleton<IDashboardLiveDataService, NoWorkerLiveData>();
await using ServiceProvider provider = services.BuildServiceProvider();
await using HtmlRenderer renderer = new(provider, provider.GetRequiredService<ILoggerFactory>());
string html = await renderer.Dispatcher.InvokeAsync(async () =>
(await renderer.RenderComponentAsync<BrowsePage>()).ToHtmlString());
Assert.Contains("for=\"browse-search\"", html, StringComparison.Ordinal);
Assert.Contains("id=\"browse-search\"", html, StringComparison.Ordinal);
Assert.Contains("Filter Galaxy attributes", html, StringComparison.Ordinal);
Assert.Contains("aria-describedby=\"browse-search-hint\"", html, StringComparison.Ordinal);
Assert.Contains("id=\"browse-search-hint\"", html, StringComparison.Ordinal);
Assert.Contains("aria-controls=\"browse-results\"", html, StringComparison.Ordinal);
Assert.Contains("id=\"browse-results\"", html, StringComparison.Ordinal);
Assert.Contains("Clear search", html, StringComparison.Ordinal);
}
private sealed class InMemoryCache : IGalaxyHierarchyCache
{
public GalaxyHierarchyCacheEntry Current { get; }
public InMemoryCache()
{
GalaxyObject row = new() { GobjectId = 1, TagName = "SyntheticPump", BrowseName = "SyntheticPump" };
row.Attributes.Add(new GalaxyAttribute { AttributeName = "PV", FullTagReference = "SyntheticPump.PV" });
Current = GalaxyHierarchyCacheEntry.Empty with { Status = GalaxyCacheStatus.Healthy, Sequence = 1,
Objects = [row], Index = GalaxyHierarchyIndex.Build([row]), ObjectCount = 1, LastSuccessAt = DateTimeOffset.UnixEpoch };
}
public Task RefreshAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task WaitForFirstLoadAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
private sealed class NoWorkerLiveData : IDashboardLiveDataService
{
public Task<DashboardLiveReadResult> ReadAsync(IReadOnlyCollection<string> tags, CancellationToken cancellationToken) => Task.FromResult(DashboardLiveReadResult.Empty);
public Task<DashboardAlarmQueryResult> QueryAlarmsAsync(CancellationToken cancellationToken) => Task.FromResult(new DashboardAlarmQueryResult([], null, null));
}
}
@@ -0,0 +1,51 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using ZB.MOM.WW.GalaxyRepository.Grpc;
using ZB.MOM.WW.MxGateway.Server.Dashboard;
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Shared;
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
/// <summary>Initial recursive browse semantics; keyboard watch flow uses a real browser.</summary>
public sealed class BrowseTreeAccessibilityTests
{
/// <summary>A lazy object's visible toggle is named and describes its real collapsed state.</summary>
[Fact]
public async Task LazyNode_HasNamedNativeExpansionAndControlledRegion()
{
string html = await RenderAsync(new DashboardBrowseNode
{
Object = new GalaxyObject { BrowseName = "Pump01", TagName = "Area.Pump01" },
HasChildrenHint = true,
});
Assert.Contains("aria-label=\"Expand Pump01\"", html, StringComparison.Ordinal);
Assert.Contains("aria-expanded=\"false\"", html, StringComparison.Ordinal);
Assert.Contains("aria-controls=", html, StringComparison.Ordinal);
Assert.DoesNotContain("aria-label=\"Toggle\"", html, StringComparison.Ordinal);
}
/// <summary>Terminal objects do not advertise a meaningless expansion action.</summary>
[Fact]
public async Task LeafNode_DoesNotExposeUnavailableExpansion()
{
string html = await RenderAsync(new DashboardBrowseNode
{
Object = new GalaxyObject { BrowseName = "Leaf" },
});
Assert.DoesNotContain("<button", html, StringComparison.Ordinal);
Assert.Contains("Leaf", html, StringComparison.Ordinal);
}
private static async Task<string> RenderAsync(DashboardBrowseNode node)
{
ServiceCollection services = new();
services.AddLogging();
await using ServiceProvider provider = services.BuildServiceProvider();
await using HtmlRenderer renderer = new(provider, provider.GetRequiredService<ILoggerFactory>());
return await renderer.Dispatcher.InvokeAsync(async () =>
(await renderer.RenderComponentAsync<BrowseTreeNodeView>(ParameterView.FromDictionary(
new Dictionary<string, object?> { [nameof(BrowseTreeNodeView.Node)] = node }))).ToHtmlString());
}
}