Repository navigation
Description
What happens
Open Settings as a webview (AI_BUDDY_SETTINGS_WEBVIEW=1) and click the AI source dropdown. The two choices, Model API and Harness, cannot be found anywhere on screen by the accessibility tools the verify scripts drive. Nothing can pick one, so the Harness half of Settings is unreachable from an automated run.
The native Settings window does not have this problem. The same pick succeeds there.
What is measured
From the step 7 run on 7d296120 (evidence comment):
- The dropdown itself is present and correct:
AXPopUpButton|AI source|Model API||true|false. AXPresson it returns success.- After the press, a search of the popup's own subtree finds no menu.
- After the press, a search of the entire application element finds only the system menu bar and ai-buddy's own tray menu. No source-options menu anywhere.
So the options are unreachable everywhere, not merely attached somewhere unexpected.
What is not known
Whether the menu draws on screen and is invisible to the accessibility tree, or never opens at all. AXPress reported success, so the script never fell back to a synthesized click, and no one has watched this happen with their own eyes.
Those two possibilities have different severities:
- Menu draws, accessibility cannot see it. A verification problem. Users are fine, automated runs are not.
- Menu never opens. A user-facing bug. Nobody can switch AI source in the webview Settings at all.
Settling that is the first job here, before any fix.
Why this matters now
Step 7 of #706 cannot close without it. The AI-source pick is what drives the Settings window through both of its states, so a run that cannot pick reaches only Model API. The step 7 evidence run failed five assertions and this is one of the three root causes.
This is also the shape of #634, whose root cause is still unknown, and #706's own plan lists <select> behaviour in WKWebView above the overlay as artefact 5 and names #634 explicitly.
Suggested first move
Watch it happen. Open the webview Settings by hand with the flag on, click the dropdown, and say whether a menu appears. That one observation splits the two cases above and decides whether this is a product bug or a verification gap.
If the menu does draw, the next question is why AXPress leaves nothing in the tree, and whether a synthesized click at the element's frame behaves differently.
Related
- refactor(settings): Replace the three native Settings renderers with one webview #706 (Settings webview migration; this blocks step 7 artefacts 1 and 5)
- macOS Settings Off pick does not leave the Harness popup #634 (same shape, root cause unknown)
- test(macos): Descend into the AXWebArea in the Settings AX dump #779 (landed the
AXWebAreadescent that made this visible)
— Claude Code agent, on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
omesser commentedon Sep 17, 2026
The menu draws. This is a verification gap, not a product bug.
Pressing the AI source
<select>in the webview Settings opens a normal macOS popup menu with all nine options on it. Nobody is blocked from switching AI source. The accessibility tree cannot see that menu, andscripts/ax-settings.swift pickis the only thing that breaks.Everything below was measured on
db52e2df, in a worktree, on onetarget/debug/ai-buddybuild. The screen was unlocked and the native path was run first in the same session as a control, becauseAXWindowson this Mac has degraded mid-session before.How it was settled
The repo's rule is to script GUI checks and assert on an AX dump. That rule cannot answer this one question, because the AX dump is the instrument under suspicion. So the answer comes from a screenshot and from
CGWindowListCopyWindowInfo, which reads the window server directly and needs no Accessibility grant. Everything after this went back to scripted assertions.A probe listed every on-screen window owned by the app, pressed the popup, and listed them again.
A window appears at layer 101, the menu layer, 547 points wide. That is the select's own width to the point, from the
POPUP frameline above it.MENUSis the count ofAXMenuelements anywhere under the application element, and it does not move.The still taken 1.5s after the press shows the menu open over the desktop below the Settings window, with all nine rows drawn and
Model APIchecked and highlighted:Model API,Harness · claude,Harness · codex,Harness · cursor-agent,Harness · grok,Harness · hermes,Harness · opencode,Harness · pi,Harness · Custom. That still is local to this Mac and is not attached here.The same probe against the native window, run first as the control:
Both draw a menu. Only the native one publishes an
AXMenufor it.Why the tree cannot see it
The menu is absent from every route, not merely filed somewhere unexpected.
popup children while open = [].APP-CHILD-ROLES ["AXWindow", "AXWindow", "AXWindow", "AXMenuBar", "AXMenuBar"].AXUIElementCopyElementAtPositionat three points inside the menu's own window returnskAXErrorFailurefrom both the application element and the system-wide element.This is not the app failing to answer. While the menu is up, reading the popup's
AXValuereturnsModel APIin 0ms. The process is responsive and the menu is not in its tree. In WKWebView, WebKit's own popup proxy presents a<select>popup rather than anNSPopUpButton, and that path publishes nothing to accessibility. The native renderer'sNSPopUpButtonpublishes itsAXMenuunder itself, which is the only reasonpickhas ever worked.What breaks
pickpresses the popup, searches the popup's subtree for the option, finds nothing, and dies.The same command on the native window, same build, same session:
One consequence is worth recording, because it explains why one failed pick costs five assertions rather than one.
pickdies with the menu still tracking, and while a menu tracks the webview publishes no subtree at all. The next dump is a bare window shell:Every later assertion in the run is reading that.
Where the fix goes
In
scripts/ax-settings.swift, not in the product. Two things are wrong withpickand both are the instrument's.pickalready uses everywhere else. That works when measured. The popup readsHarness · claudeafterwards.AXUIElementcaptured before the pick then reportsnilwhile a freshly resolved one reportsHarness · claude. The check has to re-resolve the popup by its label.The second point may also be all that #634 ever was. #634 is a native
pick Harness Offthat exited 0 while a fresh dump still readclaude, which is what reading a stale element after a rebuild looks like. That is a hypothesis from the shape, not something reproduced here. #634 needs an attached Harness and is closed.Nothing here argues for lowering the overlay or for hand-building a dropdown. The menu draws above the overlay already. Artefact 5 of #706 asked whether the
<select>popup survives the overlay panel, and on this evidence it does.scripts/verify-settings-macos.shis untouched and stays that way. Its row addressing is a separate question and yours.— Claude Code agent, on @omesser's behalf.
[-]bug(settings): The AI source dropdown opens no reachable menu in the webview Settings[/-][+]bug(verify): The webview AI source menu draws but ax-settings pick cannot see it[/+]fix(verify): Pick from the webview <select> menu the AX tree never pu…
fix(verify): Pick from the webview <select> menu the AX tree never pu…
omesser commentedon Sep 17, 2026
Shipped on main via #801
#801 merged (
b08980ba). On main now, inscripts/ax-settings.swiftonly:pickraces the nativeAXMenuItemsearch against a new window on the menu layerthe <label> popup drew no menuwhen neither path appearsMeasured on the PR (rebased on #800): native verify still baseline green; webview
picktoHarness · claudeand back toModel APIboth exit 0.Acceptance met. This issue stays closed.
— Cursor agent (Coder), on @omesser's behalf.
omesser commentedon Sep 17, 2026
Fix landed via #801
The verification gap (menu draws; AX cannot see WebKit’s
<select>menu;picktype-selects once a menu-layer window appears) is onmainvia #801 (b08980ba).#802 was a parallel branch for the same change; closed as duplicate after #801 merged (conflicted, weaker settle path). Closing this issue.
— Cursor agent (Coder), on @omesser's behalf.