feat(macos-helper): drive app sessions through accessibility actions - #3188
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Size Report
Startup median (7 runs, lower is better):
|
d6e4711 to
6ac9e42
Compare
|
Thanks for the PR. I reviewed 6ac9e42 and found one defect that needs a fix and one gap in evidence, so it is not ready to merge yet. All 19 checks pass on that commit, but CI only builds the helper and does not run the AX routes live. No conflicts. When the app's own hit test at (x,y) returns no text input and no pressable control role (a blank area, AXStaticText, or a Chromium wrapper group), The PR body describes live runs in prose only, and no helper output shows which route ran. Two branches have no evidence: the smallest-containing-control fallback near this line, and the AXEnhancedUserInterface fallback. The Swift tests cover only the vocabulary, scroll arithmetic and a role-set predicate, and Small notes. In This PR adds 801 net production lines, above the 700-line threshold, and it has no caller yet. Could the host pass back the identity of the node it chose from the app-surface snapshot (path or index plus window)? The helper could then act on that element directly. That would drop Before merge, please restrict the press and fill fallback to the hit-tested window, then attach the live helper output for the Chromium fallback route. |
6ac9e42 to
c0fabe6
Compare
|
Thanks. Addressed in Fallback window (fixed). Live evidence for the Chromium fallback route. Codex (Electron) in the background, T3 Code frontmost the whole time. The raw AXEnhancedUserInterface fallback. Codex rejects Small notes.
Element identity instead of x/y. I kept point dispatch and recorded why in ADR 0031 ("Pointer dispatch, not element identity"):
Splitting. The stack already moved the ghost cursor into #3195. This layer stays one concern, the helper's app surface, at 926 gross lines. A further split would leave the AX actions PR without the screenshot it is verified with. |
|
This PR is ready at c0fabe6. The earlier evidence gap is closed: the author's live run now covers the AX routes, and the size question is answered by keeping point dispatch to match ADR 0011. All 19 checks pass. CI builds the Swift helper but does not run the AX routes, so the live run in the author's comment is the only evidence for them. I did not reproduce that output. The AXEnhancedUserInterface fallback comes from one warm run, and the author says they did not repeat it cold. actionWindow, windowTitle and the snapshot warning have no Swift unit test because they need live AX. I read only the logical patch in the 6 PR files through the range-diff, and I did not read ADR 0031 in the stacked PR #3189. There are no conflicts. Not blocking, and you can take or leave it: in SnapshotTraversal.swift, enableRemoteAccessibilityTree returns true as soon as AXManualAccessibility or AXEnhancedUserInterface already reads true. If an earlier snapshot set the attribute but timed out before the web area filled in, every later snapshot skips both the wait and the warning. Returning hasPopulatedWebArea(appElement) in that case would fix it and adds no wait. Cubic has not reviewed this head yet, so please check its threads before merge. |
Add an `app` surface to the macOS helper so an app session can be served without XCTest Automation Mode while the app stays behind other windows: - snapshot targets the session app by bundle id and turns on the Chromium/Electron accessibility tree before traversal - press, fill, type, and scroll act through AXPress, focus, value, selected text, and scroll bar values; pointer actions with no accessibility equivalent are refused with a typed reason instead of posting process events an inactive app drops - screenshot captures the app's front window alone via ScreenCaptureKit Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c0fabe6 to
86a9c65
Compare
|
Summary
Adds an
appsurface to the macOS helper so a macOS app session can run without XCTest Automation Mode: no overlay, the app may stay behind other windows, and the user keeps the real pointer.snapshot --surface app --bundle-idwalks the session app. Chromium/Electron apps get their accessibility tree turned on; only the snapshot that turns it on waits (up to 1 s), and a tree that never populates adds awarningsentry.press/fill/type/scrollact through accessibility actions. When the app's hit test names no control (Chromium answers with wrapper groups), the helper takes the smallest control containing the point inside the hit window (or the front window), and responses carrywindowTitle. No pointer events are posted: inactive apps drop them while the post reports success.screenshot --surface appcaptures the on-screen front window alone.Nothing calls the surface yet; #3189 routes app sessions to it, #3195 adds the ghost cursor. 6 files.
Validation
pnpm check:affected --runpassed on86a9c656b;swift testpassed (vocabulary and scroll travel pinned tocontracts/fixtures).🤖 Generated with Claude Code