Repository navigation
chore(scripts): Verify the macOS Settings window through the Accessibility API - #626
Merged
Merged
Conversation
omesser
force-pushed
the
chore/verify-settings-macos
branch
from
September 11, 2026 02:31
ce93839 to
29a8dbe
Compare
This was referenced Sep 11, 2026
…ing it Verifying the AppKit Settings window meant launching, clicking the tray, clicking a tab, taking a screenshot and looking at it - minutes per observation, and the freeze state was a guess until someone typed into a field. Every question the verification asks is a string or a boolean the Accessibility tree already holds, so ask that instead: both passes, including a live Harness attach, take under twenty seconds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A non-editable NSTextField is demoted from AXTextField to plain AXStaticText, so the matcher walked past the frozen row and read the next control it recognised - the disabled Clear key button, which answers false and made the freeze checks pass for the wrong reason. Take the line straight after the label whatever its role. Adds `pick`, which changes a popup in place, for the states that only exist between two launches. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
omesser
force-pushed
the
chore/verify-settings-macos
branch
from
September 11, 2026 16:09
7e10ea9 to
8364b1c
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
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
Checking AppKit Settings meant launching the app, opening the window, and staring at a screenshot. Freeze state was a guess until someone typed into a field. The Accessibility tree already holds the strings and booleans those checks ask for.
Scope
scripts/ax-settings.swiftpresses the tray Settings row, tabs, and popups by name, then dumps the tree as one line per control.scripts/verify-settings-macos.shruns two passes in throwaway HOMEs, one with no Harness and one withAI_BUDDY_HARNESSset, and greps that dump.Does not change the Settings renderer. Does not add a CI job. Runtime source switch in one window is #635.
Tradeoffs
The freeze oracle is
AXValuesettability, notAXEnabled.freeze_or_bindusessetEditable(false), which leaves the field enabled and looking live. AppKit also demotes a frozenNSTextFieldtoAXStaticText, so a matcher that waits forAXTextFieldwalks into the next row.The Harness pass waits to open Settings until the child logs attached.
draw()re-applies freeze (#593), but a background attach does not draw.Blast Radius
macOS only, and only when someone runs the script. CI does not. A wrong grep fails the script, not the product.
Verification
A green no-Harness run PASSes section order
AI > AI source > Model / API > Last user turn, live Base URL and Model, the AI-brain state line, and nois the Director's mind. The Harness pass reports SKIP, not failure, when the named CLI is missing or not signed in. Grant Accessibility to the terminal that runs it.— Cursor agent (Grok), on @omesser's behalf.