Skip to content

fix: improve Maestro text tap targets#610

Merged
thymikee merged 1 commit into
callstackincubator:mainfrom
thymikee:codex/fix-maestro-tab-selector
May 28, 2026
Merged

fix: improve Maestro text tap targets#610
thymikee merged 1 commit into
callstackincubator:mainfrom
thymikee:codex/fix-maestro-tab-selector

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented May 28, 2026

Summary

Make Maestro tapOn target resolution safer for React Native/iOS tab surfaces.

  • resolve mutating Maestro interactions from a fresh raw snapshot instead of assertion-cached snapshots
  • remove the now-dead Maestro assertion snapshot cache API and cache writes
  • infer the missing selected tab slot when iOS exposes the active tab only as a tab-strip container label and exposes sibling tabs as children
  • keep concrete child matches preferred over inference, and keep large-container bias scoped to genuinely large text containers

Validation

  • pnpm exec vitest run --project unit src/daemon/handlers/__tests__/session-replay-vars.test.ts src/compat/maestro/__tests__/runtime-targets.test.ts src/compat/maestro/__tests__/runtime-interactions.test.ts src/compat/maestro/__tests__/runtime-geometry.test.ts
  • pnpm check:fallow --base 99e97c873e17d6438a57c8e3a143e1f930e815a7
  • pnpm check:quick
  • pnpm build
  • pnpm test:coverage
  • Local React Navigation iPhone 17 Pro validation with patched CLI: 5/5 tab/material-tab repro flows passed (material-top-tabs.yml, tab-view-auto-width-tab-bar.yml, tab-view-coverflow.yml, tab-view-scroll-adapter.yml, tab-view-scrollable-tab-bar.yml).

Note: navigator-layout.yml still fails locally and is intentionally left for a separate root-cause pass; speculative top-edge guards were removed from this PR.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ca1e2bad2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/compat/maestro/runtime-geometry.ts Outdated
largeTextContainerBias: {
minWidth: 120,
minHeight: 70,
minHeight: 40,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid forcing all 48pt text containers to the leading tab

When an iOS tab/header surface exposes a visible-text match as a full-width Other/ScrollView around 48pt tall, lowering this gate to 40 makes pointForMaestroTapOnTarget use the biased width of 168px, so every such label taps at about x=84 regardless of where the actual tab text is. This fixes leading labels, but tapOn for a center or trailing tab whose snapshot node has the same broad rect will now hit the wrong tab instead of the previous rect center; the bias needs to be constrained to cases where the label is known to be in the leading segment or derive the label's real rect.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the codex/fix-maestro-tab-selector branch from 5ca1e2b to ccdfc49 Compare May 28, 2026 16:12
@thymikee thymikee force-pushed the codex/fix-maestro-tab-selector branch from ccdfc49 to 618af90 Compare May 28, 2026 16:24
@thymikee thymikee merged commit 0dead15 into callstackincubator:main May 28, 2026
11 checks passed
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