Settings sidebar: put the automation id on the row's button (fixes RC settings-home smoke) - #1937
Merged
Merged
Conversation
The Release Candidate UI smoke failed at settings-home on a fresh runner: the Writing row's "New" badge is showing there. The identifier sat on the row's HStack, so SwiftUI copied it onto the Label and the badge, and the plain button that merges them joined the two. The Writing button read "transcripted.settings.sidebar.writing-transcripted.settings.sidebar.writing", and the smoke's exact match never found it. Once the badge is dismissed the row has one child again, which is why it passed locally. SettingsSidebarButton now owns the Button and puts page.automationIdentifier on it, the single element AX exposes for the row. A throwaway SwiftUI probe with the same row structure shows the joined id before and the clean id after, with the badge still read as "Writing, New".
Owner
Author
|
Coordinator review: APPROVE. Pure move of the identifier from the row HStack to its Button; action, style and selection unchanged. AX probe evidence in the PR explains the doubled id on fresh installs (badge shown). |
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 the RC failed
packaged-app-smoke --run-ui-smokefailedsettings-home2 of 2 on the Release Candidate runner. It's the first RC since #1871 added the Writing row, its "New" badge, and the smoke's.writingexpectation.On a fresh runner the badge shows.
SettingsSidebarRowput.accessibilityIdentifier(page.automationIdentifier)on its HStack. SwiftUI copies that onto each child (the Label and the badge), and the plainButtonthat merges them into one AXButton joins the two ids with a dash. So the Writing button's AXIdentifier wastranscripted.settings.sidebar.writing-transcripted.settings.sidebar.writing, and the smoke's exact match never found it. On the owner's Mac the badge is dismissed, the row has one child, and the id is clean.Evidence
A throwaway SwiftUI app with the same structure (VStack → ForEach →
Button { } label: { row }+.buttonStyle(.plain), same row modifiers and badge), dumped with the same BFS and child attributes asAXInspector.snapshotNodes(depth 12, 2000 nodes):Before:
After (id on the Button):
Same depth either way, so depth wasn't the problem.
Fix
New
SettingsSidebarButtoninTranscriptedSettingsSidebar.swiftowns the Button and puts the id on it, the single element AX exposes per row.SettingsSidebarRowno longer sets it. The smoke is unchanged. The badge is still read as "Writing, New".Checks
bash build.sh --no-open: passedrun-tests.sh --filter FocusOrderContract(25),--filter UIAutomationSurface(338),--filter OverlayScreenSharePrivacy(26): passedcheck-source-pins.py --changed-only: passed (the pinned.accessibilityIdentifier(page.automationIdentifier)stays in the sidebar file)🤖 Generated with Claude Code