fix: improve Maestro text tap targets#610
Conversation
There was a problem hiding this comment.
💡 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".
| largeTextContainerBias: { | ||
| minWidth: 120, | ||
| minHeight: 70, | ||
| minHeight: 40, |
There was a problem hiding this comment.
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 👍 / 👎.
5ca1e2b to
ccdfc49
Compare
ccdfc49 to
618af90
Compare
Summary
Make Maestro
tapOntarget resolution safer for React Native/iOS tab surfaces.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.tspnpm check:fallow --base 99e97c873e17d6438a57c8e3a143e1f930e815a7pnpm check:quickpnpm buildpnpm test:coveragematerial-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.ymlstill fails locally and is intentionally left for a separate root-cause pass; speculative top-edge guards were removed from this PR.