Computer use CLI for AI agents
Rust accessibilityaccessibility-apiai-agentsautomationclicomputer-usecomputer-use-agentcomputer-use-agentsdesktop-automationmacosmcprust
{
"probe": "07-hittest",
"question": "do the hit-test primitives 2.6 needs behave correctly against occluded, zero-size and minimized targets",
"stack": "managed-System.Windows.Automation AutomationElement.FromPoint, cross-checked with Win32 WindowFromPoint",
"scope": "system",
"safety": "both windows are launched by this probe at deterministic --pos origins; nothing else on the desktop is touched, moved or raised.",
"occlusion": {
"question": "at a point covered by a second window, does ElementFromPoint return the occluder or the covered target",
"why": "2.6\u0027s occlusion gate decides whether an element is actually clickable. If ElementFromPoint answered with the covered element the gate would have no primitive to build on and every actionability check would be a guess.",
"underWindowTitle": "AgentDesktop Scratch WinForms [u6-under]",
"overWindowTitle": "AgentDesktop Scratch WinForms [u6-over]",
"underWindowRect": "100,100,776,559",
"overWindowRect": "260,180,776,559",
"raiseMethod": "ShowWindow(SW_MINIMIZE) then ShowWindow(SW_RESTORE) on the probe-owned over window. SetForegroundWindow is never called (KTD5).",
"overlapRect": "260,180,616,479",
"probePoint": "568,420",
"probePointInsideUnder": true,
"probePointInsideOver": true,
"elementFromPoint": {
"resolved": true,
"controlType": "Pane",
"automationId": "tbSlider",
"className": "WindowsForms10.msctls_trackbar32.app.0.34f5582_r8_ad1",
"topLevelWindow": "AgentDesktop Scratch WinForms [u6-over]",
"rect": "284,387,320,45"
},
"win32WindowFromPointRootTitle": "AgentDesktop Scratch WinForms [u6-over]",
"resolvedToOccluder": true,
"resolvedToOccluded": false,
"win32AgreesWithUia": true,
"titleEvidenceNote": "the two windows are distinguished by the --tag switch, so the identity that proves which window answered survives KTD9 normalization - process ids and window handles do not.",
"verdict": "ok - ElementFromPoint returned the occluder"
},
"zeroSize": {
"question": "what does a 0x0 control look like to a hit test, and is it reachable at all",
"controlId": 1007,
"automationId": "btnZeroSize",
"reachableByGetDlgItem": true,
"win32Rect": "248,271,0,0",
"win32ClassName": "WindowsForms10.BUTTON.app.0.34f5582_r8_ad1",
"win32IsWindowVisible": true,
"foundByFindFirstAutomationId": false,
"controlViewNodeCount": 24,
"rawViewNodeCount": 24,
"fromHandleResolved": true,
"fromHandleControlType": "Pane",
"fromHandleRect": "\u003cempty\u003e",
"fromHandleIsOffscreen": false,
"elementFromPointAtItsOrigin": {
"resolved": true,
"controlType": "Window",
"automationId": "frmScratchMain",
"className": "WindowsForms10.Window.8.app.0.34f5582_r8_ad1",
"topLevelWindow": "AgentDesktop Scratch WinForms [u6-under]",
"rect": "100,100,776,559"
},
"priorEvidence": "U7 recorded this control as absent from BOTH the COM RawView and ControlView walks of the same fixture. The rows above are the managed-side confirmation plus the two things the COM census could not answer: whether the control is still reachable by handle, and what a hit test at its coordinates returns.",
"consequence": "a zero-size control is addressable through Win32 and through AutomationElement.FromHandle, but it can be enumerated by no tree walk and hit by no point. Any Windows actionability check that treats \"not hit-testable\" as \"does not exist\" will be right about the click and wrong about the element."
},
"minimized": {
"question": "what does a minimized window report, and what does a hit test at its former coordinates return",
"priorEvidence": "U3 measured that minimizing degenerates geometry in two different shapes: only the TOP-LEVEL window reports an empty rect, while descendants report REAL dimensions anchored at -32000, and every node still reports IsOffscreen false. An occlusion gate testing emptiness or IsOffscreen alone accepts both as visible.",
"pointProbed": "130,380",
"pointChoice": "a point inside the under window but outside the over window, so the only thing that can change the answer is the minimize itself",
"topLevelRectBefore": "100,100,776,559",
"topLevelRectAfterMinimize": "\u003cempty\u003e",
"topLevelRectAfterRestore": "100,100,776,559",
"topLevelIsOffscreenBefore": false,
"topLevelIsOffscreenAfterMinimize": false,
"descendantAutomationId": "btnAction",
"descendantFoundAfterMinimize": true,
"descendantRectBefore": "340,235,104,26",
"descendantRectAfterMinimize": "-31768,-31896,104,26",
"descendantIsOffscreenBefore": false,
"descendantIsOffscreenAfterMinimize": false,
"win32IsIconic": true,
"elementFromPointBefore": {
"resolved": true,
"controlType": "Pane",
"automationId": "pnlScroll",
"className": "WindowsForms10.Window.8.app.0.34f5582_r8_ad1",
"topLevelWindow": "AgentDesktop Scratch WinForms [u6-under]",
"rect": "124,363,340,180"
},
"elementFromPointAfterMinimize": {
"resolved": true,
"controlType": "Pane",
"automationId": "1",
"className": "SysListView32",
"topLevelWindow": "Program Manager",
"rect": "0,0,1639,732"
},
"elementFromPointAtDescendantAnchor": {
"resolved": true,
"controlType": "Pane",
"automationId": "",
"className": "#32769",
"topLevelWindow": "\u003cno-top-level-reached\u003e",
"rect": "0,0,1639,732"
},
"hitTestFreedTheCoordinates": true,
"gateConsequence": "ElementFromPoint is the one primitive here that degrades cleanly: after the minimize the coordinates resolve to whatever is genuinely on top instead of to the minimized window. Emptiness and IsOffscreen do not - the top-level rect empties while its descendants keep real dimensions at -32000, and IsOffscreen stays false on both. 2.6 should gate on a hit test, and where it must reason about geometry it has to test the -32000 anchor explicitly, because a -32000 rect is neither empty nor offscreen by either property.",
"rectRecordingNote": "every rect here is a comma-joined string. As numeric x/y/width/height keys the KTD9 normalizer would bucket them to 8 px, which rounds -32000 into a neighbouring bucket and erases exactly the anchor this row exists to record."
}
}