Repository navigation
fix(verify): Pick from the webview <select> menu the AX tree never publishes - #801
Merged
Merged
Conversation
omesser
force-pushed
the
fix/settings-webview-select-popup
branch
from
September 17, 2026 00:56
dabe2fd to
d3e9282
Compare
Owner
Author
|
Overlaps this change. I rebased #802 onto #800 and grafted the menu-layer race and type-select from here (the Mac-measured path), plus node/row_live tests this branch does not have. If 802 looks right after review, this one can close as the duplicate. I am not closing it from here. — Cursor agent (Coder), on @omesser's behalf. |
5 tasks done
…blishes The menu draws; accessibility never sees it. Measured in #797. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comments only. No statement changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
omesser
force-pushed
the
fix/settings-webview-select-popup
branch
from
September 17, 2026 01:04
d3e9282 to
defa7c1
Compare
This was referenced Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ax-settings pickcannot change the AI source in the webview Settings window, which is one of the three root causes behind the five failed assertions in #706's step 7 evidence run. A run that cannot pick reaches only the Model API state, so half of Settings is unverifiable.#797 asked first whether the menu draws at all, because the two answers have very different severities. It draws. The measurement is on #797: pressing the popup puts a window on the menu layer, 547 points wide, which is the
<select>'s own width, and a still taken while it is up shows all nine options withModel APIchecked. Nobody is blocked from switching AI source by hand. This is a verification gap, and #797 has been retitled to say so.What cannot see that menu is the accessibility tree, and the menu is absent from every route rather than filed somewhere unexpected. Not under the popup (
popup children while open = []), not under the application (APP-CHILD-ROLES ["AXWindow", "AXWindow", "AXWindow", "AXMenuBar", "AXMenuBar"]), and not by hit test, whereAXUIElementCopyElementAtPositionreturnskAXErrorFailureat three points inside the menu's own window from both the application element and the system-wide element. The app is not merely slow to answer: while the menu tracks, reading the popup'sAXValuereturns in 0 ms. In WKWebView a<select>popup is presented by WebKit's own popup proxy rather than by anNSPopUpButton, and that path publishes nothing to accessibility. The native renderer'sNSPopUpButtondoes publish itsAXMenu, which is the only reasonpickhas ever worked.What changed
scripts/ax-settings.swiftonly. No product code, andscripts/verify-settings-macos.shis untouched.Two repairs to
pick, both in the instrument.It now knows two kinds of popup menu. After the press it races the existing subtree search against a new window on the menu layer, rather than waiting the AX search out first, which on the webview never resolves. AppKit's menu wins that race and is pressed exactly as before. WebKit's menu draws without publishing anything, so the option is typed instead: macOS menus select by typed prefix, which keeps this the press-by-name the rest of the file is built on where the tree offers no element to press. Typing only ever happens once a menu is up, and a tracking menu holds the keyboard, so the characters cannot land in the page.
When neither happens,
picknow dies withthe <label> popup drew no menuinstead ofhas no option. That distinction is the observation #797 needed a human with a screenshot to make, and the script now makes it itself.Its closing check re-resolves the popup by label. The webview rebuilds its whole tree on a source change, which leaves the element captured before the pick reporting
nilwhile a freshly resolved one reportsHarness · claude. The check read the stale one and would have failed on a pick that worked.This branch is rebased onto #800. Both fixes are live and neither was taken wholesale:
pickresolves its window through #800's sharedsettledWindow(titled:)accessor, and it now does so inside the per-call resolver above, so every re-resolution is gated and not only the first. #800's separate top-levelguard let window = settledWindow(…)line is therefore gone, folded into that one call site rather than left beside it as a second settle path.What this deliberately does not do: no hand-built dropdown, and nothing that lowers the overlay. #706's plan rejects the first and scopes the second to its own issue, and neither is needed. The menu already draws above the overlay panel, which is evidence for artefact 5.
How to verify
The baseline moved while this was in review. #800 landed and its settle gate is now on
main, so every number below was re-measured on the rebased headdefa7c15againstorigin/mainat2c2450b1, on onetarget/debug/ai-buddybuild from that tree. The earlier numbers in this description were taken before #800 and no longer describe this branch.Native, unchanged assertions,
scripts/verify-settings-macos.shnot modified in this branch:That is the recorded baseline exactly, same two SKIPs, unchanged by the rebase.
The
pickrepro, driven the way the verify script drives it. The before side isorigin/main's ownax-settings.swift, so it already carries #800's gate and the failure is this branch's to fix and nothing else's:After, on
defa7c15:swiftc -O scripts/ax-settings.swiftcompiles clean with no warnings.pre-commit run --files scripts/ax-settings.swiftpasses, including the swiftc typecheck hook.Notes
Step 7 artefact 1 moves but does not close. The webview run now reaches both AI-source states, which it never did before. All three runtime switches happen (
Harness · claude,Model API,Harness · claude again), and the run ends on the same two Harness SKIPs as native, which the step 7 evidence comment named as the marker of actually getting there.Re-measured on the rebased head, the webview run is 12 PASS / 2 SKIP / 6 FAIL / exit 1, against 9 / 0 / 5 in the step 7 evidence run. It read 11 / 2 / 7 when measured on the pre-#800 base earlier in this pull request; the one failure that went away between those two is
could not dump the Presence tab, which is #800's gate doing its job and not this branch. FAIL is still higher than the original 5 because the run now travels further: every one of the 6 isrow_livelanding on WebKit's duplicatedAXStaticTextlabel node, and three of them sit in a block the original run never reached. That is cause 1, whose fix means changing the script's awk row addressing, which is yours to decide and out of scope here.#634 may be the second repair above, not this one. #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, and the closing check here was the only thing reading one. That is a hypothesis from the shape. It was not reproduced: #634 needs an attached Harness, and no Harness answered on this host.Not verified anywhere in this change: Windows and Linux.
ax-settings.swiftis macOS-only.Closes #797
Refs #706, #634, #779, #800
🤖 Generated with Claude Code
— Claude Code agent, on @omesser's behalf.