Skip to content

fix: restore Windows UI Automation elements - #2

Merged
dttxorg merged 3 commits into
mainfrom
agent/fix-windows-uia-list-materialization
Aug 19, 2026
Merged

fix: restore Windows UI Automation elements#2
dttxorg merged 3 commits into
mainfrom
agent/fix-windows-uia-list-materialization

Conversation

@dttxorg

@dttxorg dttxorg commented Aug 19, 2026

Copy link
Copy Markdown
Owner

What changed

  • Materialize the Windows UI Automation Generic.List[object] with .ToArray() before returning it from PowerShell.
  • Keep virtual/offscreen UIA elements while omitting non-finite pixel bounds, so Infinity never corrupts the JSON transport.
  • Absorb the native runner's late asynchronous stdin EPIPE and defer to the authoritative helper close/result.
  • Add source regressions, Windows PowerShell 5.1 smoke coverage, and a real Windows window-observation assertion requiring a non-empty UIA tree.
  • Prepare patch release 0.5.9.

Root cause

Windows PowerShell 5.1 throws System.ArgumentException: Argument types do not match when @(...) directly wraps this generic list. The helper's catch converted that exception into an empty element array, so every semantic Windows observation returned elementTotal: 0.

Once the list was correctly returned, CI also exposed UIA's non-finite virtual bounds: PowerShell serialized those as a bare Infinity token. The helper now preserves the semantic element and omits only unusable bounds.

Validation

  • Issue-specific baseline reproduces the old empty-tree path.
  • UIA non-finite geometry baseline reproduces the invalid-JSON path.
  • Native runner late-EPIPE regression: 30 consecutive targeted runs passed.
  • npm run check: 112 passed.
  • npm run pack:dry: package 0.5.9 generated successfully.
  • Rollback rehearsals restore the original SHA-256 and original failing behavior.
  • GitHub Actions CI run 32221093731: Ubuntu, macOS, and Windows all passed.
  • Windows PowerShell 5.1 parse/list-materialization and native desktop observation all passed.

Fixes #1

@dttxorg
dttxorg merged commit b59d1be into main Aug 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

observe always returns elementTotal: 0 — UI Automation semantic tree is never populated

1 participant