feat: add opt-in default messaging timeout for new elements - #1
Conversation
Every accessibility operation is synchronous IPC tied to the target process's event loop, so a wedged target blocks the caller until the message times out. The system default is 6 seconds, far longer than a user-facing operation can afford. setMessagingTimeout(_:) only binds a single native handle, so it does not propagate to elements obtained later from that one -- each attribute lookup returns a distinct native reference. Bounding a whole session therefore meant calling it at every construction site, including sites inside this library that callers cannot reach. Apply the timeout in init(_:) instead, the single chokepoint every element funnels through. Defaults to 0 (system default), so behavior is unchanged unless a caller opts in. Only fresh storage is seeded; elements reusing a known native reference keep the timeout they already have. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesDefault messaging timeout
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Summary
UIElement.defaultMessagingTimeoutso callers can opt in to a session-wide messaging timeout applied at element construction0(system default), so behavior is unchanged unless opted inTest plan
swift testpasses on the PR0.5.0and confirm the Release workflow publishes notesSummary by CodeRabbit
New Features
Bug Fixes