Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Status-item NSMenu (MenuBarExtra .menu): opens but can't be inspected via Accessibility or dismissed

Geschlossen
#193 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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

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.

  1. desktop_menubar_click on the status item returned completed. It listed an opened window (window_id 7393, layer 101) with "inspectable": true.
  2. desktop_inspect {pid, window: 7393} in Accessibility mode failed even after its automatic retry:
    internalError: Exact window 7393 returned no usable Accessibility elements. Warning: AX tree incomplete at incomplete accessibility read. Retry once after a short wait.
    
    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.
  3. 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.
  4. 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_inspect it 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. Or inspectable should 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_click that 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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus githubnext/desktop-tools

Alle Issues in githubnext/desktop-tools

Ähnliche Issues

Weitere Issues zu Swift

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.