Repository navigation
Closed
Description
What happens
Window clearance and the app-menu widgets make synchronous Accessibility calls on the main actor. When an app is hung, each call waits for its timeout, and the bar stops responding meanwhile.
- Window clearance. Every app activation, launch or Space change schedules every running, unhidden app.
adjustWindowsthen reads the window list and several attributes of each window. Each call can wait up to 0.1 s on a hung app, so an app with many windows adds up. - Opening an app menu.
menuNeedsUpdatereads the title, enabled state, mark and children of every item, on the main thread. The 0.1 s timeout is set only on the app element.AXUIElementSetMessagingTimeoutapplies only to the element it is set on, so the menu items fall back to the global default of about 6 s per call.
Steps to reproduce
- Turn on Keep windows clear of StableBar, or add the app-menu widget.
- Make an app stop responding, for example by pausing it with
kill -STOP <pid>. - Switch apps, or open that app's menu from the bar.
Expected
The bar stays responsive. A hung app only delays its own windows or menu.
Environment
Found by reading the code on current main. No reporter environment.
Evidence
Read on main at 4160f7f. Not measured and not reproduced in a running app.
Diagnosis
- Sources/StableBar/WindowClearance.swift:139-170:
applicationsChangedschedules every running app (line 169). - Sources/StableBar/WindowClearance.swift:234-273:
adjustWindowsruns on the main actor (WindowClearanceis@MainActor). - Sources/StableBar/WindowClearance.swift:104-108: a 1-second timer calls
AXIsProcessTrustedwhile clearance is on. - Sources/StableBar/AppMenu.swift:117-139:
menuNeedsUpdatereads child elements on the main thread; the only timeout is set at line 61, on the app element in the detached read.
Related
- perf: keep the bar smooth while reading app menus and scrolling text #174 (22b4972) moved the menu-bar read off the main thread and noted "Opening a menu still reads its contents on the main thread." This issue covers that part and window clearance.
- fix: keep notification clearance from freezing the bar #129 bounded the Notification Center walk that froze the bar; banners already set a 0.1 s timeout on each element.
- Moving a widget while editing the bar freezes it for about a second #150 is about composing the configuration during edits, not Accessibility.
Triaged by Claude Code via T3 Code (Claude Opus 5.5).
Activity
stablebar-releases commentedon Oct 23, 2026
🎉 This issue has been resolved in version 0.6.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀