👾 Open Computer Use – Open-Source Alternative to Codex Computer Use
Fix open panel file click
User Request
Investigate why
open-computer-usecould click directories in a macOS upload/open file panel but could not click files in the right-hand file list.
Changes
- [Open panel tree rendering]: Added
AXContents/AXVisibleChildrentraversal so native open panel column views expose visible file items instead of stopping at empty scroll areas. - [Modal window capture]: Updated window capture selection to prefer a frontmost overlapping modal/sheet window over a stale exact title match with the underlying main window.
- [List item click]: Made left click select native
AXListitems throughAXSelectedChildren, and made coordinate clicks try the smallest containing snapshot element before generic AX hit-test results. - [Regression coverage]: Added unit tests for modal window selection and visible-child list traversal.
- [Docs]: Updated
docs/ARCHITECTURE.mdwith the open panel traversal and list selection behavior.
Rationale
The live Nomi open panel exposed the sidebar through AXRows, but the file list was under AXScrollArea -> AXContents -> AXList -> AXVisibleChildren. The previous renderer did not traverse those attributes, so file rows were absent from the tool state. Coordinate clicks then hit generic sheet/list elements and could report success through focus-style fallbacks without selecting a file.
The fix keeps the preferred path semantic: surface the visible file items, select native list children through AX, and only use targeted mouse fallback after the more precise candidates fail.
Files
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swiftpackages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swiftpackages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/OpenComputerUseKitTests.swiftdocs/ARCHITECTURE.md
Validation
swift test- Live local CLI check with
OPEN_COMPUTER_USE_DISABLE_APP_AGENT_PROXY=1 .build/debug/OpenComputerUse call get_app_state --args '{"app":"Nomi"}'showedIMG_7605.JPG,IMG_7624.HEIC, andIMG_7753.JPGas file-list elements. - Live local CLI coordinate click changed the open panel preview from
IMG_7605.JPGtoIMG_7753.JPG, with theOpenbutton enabled.