Skip to content

fix(ios): derive selected from the AX bridge traits word - #2768

Merged
thymikee merged 1 commit into
mainfrom
t3code/fix-react-navigation-maestro-regression
Sep 23, 2026
Merged

thymikee merged 1 commit into
mainfrom
t3code/fix-react-navigation-maestro-regression

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Restore the accessibility selected fact on iOS Simulator snapshots taken through the host AX
bridge. When 0.21.0 made the bridge the default snapshot source (ADR 0004), its node reader decoded
the traits word into enabled but never into selected. An active bottom tab, chosen segment, or
checked row published no selected field, so is selected, a selected=true selector, and a
Maestro selected: qualifier stopped matching — breaking the behavior snapshots.md still promises.
The reader now reads the selected-trait bit of the same word, publishing selected: true only when
set and omitting it otherwise so the bridge and the XCTest tree cannot be told apart. The traits word
is parsed once and feeds both facts. 3 files.

agent-device snapshot --platform ios   # active tab reports selected: true again
tapOn: { selected: true }              # Maestro matches the active control

The regression test pins bit 3 against the guest's real captured tab words (green; red against
pre-fix tree.ts).

Validation

Commit e3a65832f3. pnpm check:affected --run passes (fallow + unit-core 1655). Device run of the
changed path: agent-device test --maestro e2e/maestro/showcase-bottom-tabs.yml — the failing
selected: case — on iPhone 17 / iOS 26.2 simulator 6A23B12A-132C-45CF-ABCA-572E586FDB01, React
Navigation example: passes on this fix, fails on 0.21.0–0.21.12, passes on 0.19/0.20. Suite effect:
37/39 passing (was 36/39).

Unresolved and tracked separately: native-stack-prevent-remove.yml (tapOn a native alert button)
and native-stack-card-modal.yml (assertVisible under a pushed card) also regressed at 0.21.0 but
for a different reason — the bridge's omitted hittability / covered-duplicate tap resolution, not
selected. Recommend a follow-up on hittability evidence for bridge snapshots.

When 0.21.0 made the host AX bridge the iOS Simulator snapshot source, the bridge node reader mapped the traits word into enabled but never into selected, so a selected: selector or Maestro selected: qualifier stopped matching the active tab, segment, or checked row. Restore the fact by reading the selected-trait bit of the same word, publishing selected: true only when set and omitting it otherwise to match the XCTest tree. Pin the bit against the guest's real captured words and fold the traits parse into one shared source so a producer encoding change cannot drop it silently.
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.78 MB 4.78 MB +99 B
Package (unpacked) 4.78 MB 4.78 MB +99 B
Package (download) 1.43 MB 1.43 MB +45 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.6 ms 28.0 ms +0.4 ms
CLI --help 77.9 ms 80.3 ms +2.5 ms

@thymikee

Copy link
Copy Markdown
Member Author

The fix is correct at e3a6583. Deriving selected from the traits word's true-only/omit-otherwise shape matches how the bridge reports it, and the new unit test in tree.test.ts covers the bitmask change directly. All 18 checks are green.

I relied on the PR description for the Maestro validation against the react-navigation example app. One question: the XCTest runner side that produces the selected fact is not touched here. Does it already match this shape, or is a parity follow-up needed?

Nothing is blocking. This is ready for review.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 22, 2026
@thymikee
thymikee merged commit bd84308 into main Sep 23, 2026
18 checks passed
@thymikee
thymikee deleted the t3code/fix-react-navigation-maestro-regression branch September 23, 2026 05:39
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-23 05:39 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant