Status-item NSMenu (MenuBarExtra .menu): opens but can't be inspected via Accessibility or dismissed
Maintainer antworten meist innerhalb von 1 Tag
Ein zugehöriger Pull Request wurde bereits gemerged.
- #215 von @iamnbutler — gemerged
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- swift
- Bereich
- accessibility, desktop
Rechercherichtung
Start by tracing the desktop_menubar_click and desktop_inspect entry points and how they handle NSMenu windows in Accessibility and pixels modes. Reproduce the reported SwiftUI MenuBarExtra case on macOS and inspect the accessibility snapshot and dismissal behavior. Done means menu items and submenus can be inspected, or the menu can be dismissed without activating an item, with inspectable accurately reflecting whether inspection works.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What happened
I was checking a SwiftUI MenuBarExtra with .menuBarExtraStyle(.menu), which is a native NSMenu with a submenu, in an app I'd just built (Yap). The agent could open the menu, but it couldn't read or close it.
desktop_menubar_clickon the status item returnedcompleted. It listed an opened window (window_id7393, layer 101) with"inspectable": true.desktop_inspect {pid, window: 7393}in Accessibility mode failed even after its automatic retry:
The menu was open and drawn on screen at that moment. The agent couldn't list the menu items, open the submenu by element, or press a toggle.internalError: Exact window 7393 returned no usable Accessibility elements. Warning: AX tree incomplete at incomplete accessibility read. Retry once after a short wait.desktop_inspect … mode: "pixels"worked, and the screenshot was correct. But a pixel snapshot refuses key actions, so the agent couldn't send Escape to close the menu. Its only choices were clicking a menu item, which runs that action, or leaving the menu open.- Clicking the status item again didn't close the menu. Each click reported a new window opening (7392, 7393, then 7397). The last one appeared at a different x (1882 instead of 1834). By the next
desktop_inspectit had already disappeared (window_gone), and the menu eventually closed by itself.
Expected
- The open menu's items show up in an Accessibility snapshot as
AXMenuItems, with their titles, enabled state and checkmarks, and a way to open a submenu. Orinspectableshould be false when the window can't actually be inspected. - There is some way to close an open menu without choosing an item, such as Escape from a pixel snapshot of a menu window, or a
desktop_menubar_clickthat closes the status item's menu when it's already open.
Environment
macOS (Darwin 27.0.0). The target app is a SwiftUI MenuBarExtra in an LSUIElement app, Swift 6. Reported by an agent in Claude Code on 2026-10-22.
- Vorherrschende Sprache
- Swift
- Sterne
- 0
- Forks
- 0
- Ø Merge
- 39 Min.
- Gemergte PRs (30 T.)
- 162
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus githubnext/desktop-tools
-
Accessibility inspect returns far-offscreen elements, blowing the budget on long pagesEvtl. vergeben @iamnbutler hat das vor 1 Tag übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
githubnext/desktop-tools#178 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
githubnext/desktop-tools#143 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
githubnext/desktop-tools#129 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 8/100
githubnext/desktop-tools#5 · 11 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in githubnext/desktop-tools
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
deltachat/deltachat-ios#3411 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 14 Tagen
-
a:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
vorssaint/vorssaint-utils#3527 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug iOS UI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
devsoc-unsw/freerooms-mobile#278 ·