Repository navigation
Description
Problem
When asked for "Show Menu" (AXShowMenu), the macOS engine's perform_secondary_action answers ok as soon as the Accessibility call returns success. It never checks that a menu appeared (native/engine/Sources/Engine/SecondaryAction.swift, performSecondaryAction: guard performed == .success). An app can accept the AX action and still show no menu, for example while a menu it timed out on is still running. The agent is then told the menu is open when it is not: ok with no effect, cua's hard-failure class. The owner's rule is that cua refuses input an app ignores.
Where it came from
cua #171 M4's Linux release gate, 2026-11-14 (rulings 684 and 685). The Linux engine had the same shape. Its right-button fallback in click_element and its perform_secondary_action showContextMenu both answered ok on the request. Under load, Chrome got into a state where it ignored showMenu, and both would have reported a false success. The Linux candidate 3 now makes every context-menu caller confirm, with the same detection copy uses, that a menu appeared within the menu wait, or refuse. That changes the earlier vendor-matching behavior (§7.2) and is recorded in the Linux spec's Decision Log. The macOS engine still has the vendor-style behavior.
What to build
- After AXShowMenu succeeds, confirm that a menu appeared for the element's app: an AXMenu under the element or the app, or the app's AXFocusedUIElement inside a new AXMenu, within a short bounded wait. If none appears, refuse with a plain reason ("the menu could not be confirmed"). Answer ok only on a confirmed menu.
- Check whether a click_element right-button route that answers ok on posting, without a menu read-back, exists on macOS. Treat it the same way.
- Prove it per app family the macOS gate drives (AppKit, Chrome, Electron, Firefox, Safari/WebKit, Office or LibreOffice where available). A family whose menus never appear in its tree gets the plain refusal and a stated limit, not a false ok.
- Units on the fake AX (no menu → refuse; menu → ok), and one live check per family.
- Compare: this deliberately diverges from the vendor's answer. Record it in Independence 4: cua's own native accessibility engine (replace sky) measured against a native baseline #117's Decision Log, and make sure
compare --engineson macOS treats it as intended, not as a parity break.
Not in scope
Other secondary actions (Increment, Raise, …) and whether each has an observable effect worth confirming. That is a separate question, to be ticketed if it turns up.
Activity
SSFSKIM commentedon Nov 14, 2026
Design input from the Linux fix (cua #171, ruling 687, 2026-11-14). A web page or Electron app that handles contextmenu itself (preventDefault plus its own HTML menu, as in Docs-style apps) shows no native menu, so confirming a menu would refuse a request that actually worked. Linux answers with the existing 'sent, effect not seen' family, not a refusal: a named menuUnconfirmed (showContextMenu was sent, no menu was seen within 1 s, the app may have shown its own or ignored it; observe before any retry), next to clickUnconfirmed and scrollUnconfirmed. It also assesses accepting a newly showing ARIA role=menu node, found through events, as confirmation. macOS should do the same: menuUnconfirmed rather than a refusal, an AXMenu (including a web page's ARIA menu, which Chrome and Safari expose as AXMenu) counted as confirmation, and a preventDefault page as a negative control.
SSFSKIM commentedon Nov 15, 2026
[board] in-progress: Taken by cursor235 per design 1ea561bc:733; build offline while Actions is locked
Engine: Show Menu's wait checks its deadline at every read, and an un…
Probe #374: stop at the budget with a summary, and look for a target …
Probe #374: a push to the kit is the smoke run and registers the work…
Probe #374: close menus without counting as the user, and locate menu…
Engine: a Show Menu's menu is the element's or an ancestor's AXMenu, …
Engine: a host walk cut short establishes no hosts, so the page's own…
Probe #374: the ruling's negative controls, the oracle read 1.2 s aft…
Docs: a successful Show Menu means a menu appeared, not which one (refs
Evidence: #374's full hosted run, candidate 7ad0362 against main (refs …
Merge origin/main (9d8508e, cua 0.28.2) into fix/374-menu-unconfirmed…
Plugin 0.28.3 for #374's Show Menu confirmation (refs #374)
Parity docs oracle: agent-cursor's fourth paragraph carries #374's Sh…
SSFSKIM commentedon Nov 17, 2026
[board] in-review: PR #391, gate green 44018067059
macOS engine: Show Menu answers ok only once a menu opens, else menuU…
SSFSKIM commentedon Nov 17, 2026
[board] done: Landed via PR #391 (cua 0.28.3)
Merge origin/main (c7eee72) into fix/354-type-readback (refs #354)