Repository navigation
fix(computer-use): resolve macOS accessibility targets - #1101
Conversation
|
@infer Can you review this? use /ponytail:ponytail-review /go /go-concurrency |
|
Model: I'm cooking...will get back to you soon... Pull Request✅ Infer Result: SuccessBelow is the combined review across all three requested lenses. Ponytail: ponytail-review
Go ReviewSound:
Nit:
if !ok {
if pid := b.pidForFrontmostApplication(); pid != 0 {
return b.axCreateApplication(pid), nil
}
return 0, fmt.Errorf(...)
}
return application, nilThis keeps Go Concurrency ReviewNo concurrency concerns. Every function added or modified in this diff is a synchronous FFI call to CoreFoundation, CoreGraphics, or Accessibility APIs. There are no goroutines, channels, Summary: The change is lean and focused. The fallback from Model: Tokens: 98,550 in · 3,292 out · 101,842 total (3 requests) Tool calls: 8 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
|
🎉 This PR is included in version 0.179.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Fix macOS accessibility target resolution when AX does not expose a focused application or when callers use a display name that differs from the CoreGraphics window-owner name.
Changes
AXFocusedApplicationto the PID of the frontmost layer-0 application windowTesting
go test ./internal/computer/infrastructure/accessibilitytask testtask precommit:runapp:i Term 2returned 19 elementsfrontmostreturned 14 elements for foreground iTerm2Related