fix(ios): derive selected from the AX bridge traits word - #2768
Merged
Merged
Conversation
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.
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
The fix is correct at e3a6583. Deriving 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 Nothing is blocking. This is ready for review. |
|
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.
Summary
Restore the accessibility
selectedfact on iOS Simulator snapshots taken through the host AXbridge. When 0.21.0 made the bridge the default snapshot source (ADR 0004), its node reader decoded
the traits word into
enabledbut never intoselected. An active bottom tab, chosen segment, orchecked row published no
selectedfield, sois selected, aselected=trueselector, and aMaestro
selected:qualifier stopped matching — breaking the behaviorsnapshots.mdstill promises.The reader now reads the selected-trait bit of the same word, publishing
selected: trueonly whenset 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.
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 --runpasses (fallow + unit-core 1655). Device run of thechanged path:
agent-device test --maestro e2e/maestro/showcase-bottom-tabs.yml— the failingselected:case — on iPhone 17 / iOS 26.2 simulator6A23B12A-132C-45CF-ABCA-572E586FDB01, ReactNavigation 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 butfor a different reason — the bridge's omitted hittability / covered-duplicate tap resolution, not
selected. Recommend a follow-up on hittability evidence for bridge snapshots.