Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#193 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #215 @iamnbutler による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
swift

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Swift
スター
0
フォーク
0
平均マージ
39分
マージ済み PR(30日)
162

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

githubnext/desktop-tools のほかの issue

githubnext/desktop-tools の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。