Skip to content

Settings sidebar: put the automation id on the row's button (fixes RC settings-home smoke) - #1937

Merged
r3dbars merged 1 commit into
mainfrom
claude/fix-settings-home-smoke
Sep 29, 2026
Merged

r3dbars merged 1 commit into
mainfrom
claude/fix-settings-home-smoke

Conversation

@r3dbars

@r3dbars r3dbars commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Why the RC failed

packaged-app-smoke --run-ui-smoke failed settings-home 2 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 .writing expectation.

On a fresh runner the badge shows. SettingsSidebarRow put .accessibilityIdentifier(page.automationIdentifier) on its HStack. SwiftUI copies that onto each child (the Label and the badge), and the plain Button that merges them into one AXButton joins the two ids with a dash. So the Writing button's AXIdentifier was transcripted.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 as AXInspector.snapshotNodes (depth 12, 2000 nodes):

Before:

[3] AXButton id=probe.sidebar.today           desc=Today
[3] AXButton id=probe.sidebar.writing-probe.sidebar.writing  desc=Writing, New

After (id on the Button):

[3] AXButton id=probe.sidebar.today    desc=Today
[3] AXButton id=probe.sidebar.writing  desc=Writing, New

Same depth either way, so depth wasn't the problem.

Fix

New SettingsSidebarButton in TranscriptedSettingsSidebar.swift owns the Button and puts the id on it, the single element AX exposes per row. SettingsSidebarRow no longer sets it. The smoke is unchanged. The badge is still read as "Writing, New".

Checks

  • bash build.sh --no-open: passed
  • run-tests.sh --filter FocusOrderContract (25), --filter UIAutomationSurface (338), --filter OverlayScreenSharePrivacy (26): passed
  • check-source-pins.py --changed-only: passed (the pinned .accessibilityIdentifier(page.automationIdentifier) stays in the sidebar file)
  • Not run: the packaged UI smoke itself (it needs the RC runner, and I didn't launch the real app). The next RC run is the real proof.

🤖 Generated with Claude Code

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".
@r3dbars

r3dbars commented Sep 29, 2026

Copy link
Copy Markdown
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).

@r3dbars
r3dbars merged commit 61b8d2e into main Sep 29, 2026
8 checks passed
@r3dbars
r3dbars deleted the claude/fix-settings-home-smoke branch September 29, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant