Repository navigation
docs: wait for a slow first screen after a navigating tap on Android - #112
Draft
cryptotavares wants to merge 4 commits into
Draft
cryptotavares wants to merge 4 commits into
cryptotavares wants to merge 4 commits into
Conversation
…ile observation" This reverts commit 3f17950.
This branch has not been deployed
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.
Part of the mm CLI v2 effort (ticket
P1-52). Follows the #88 review by seaona.Problem
The review of #88 asked to keep the
launchobservation as the settle baseline. Thenmm launchfollowed by an Explore tap would get the #88 transition retry. That change was built and measured live (Android emulator, MetaMask Mobile dev build, Metro), and then dropped:main(671c50f), 10 of 10launch→ Explore taps returned the whole old Home (242 nodes), not a torn Home. The fix: retry a mobile observation while the screen is still tearing down #88 retry only handles a torn Home.launchalso costs one more snapshot: observation p50 490 ms → 1388 ms (Explore tap), 479 ms → 1375 ms (open-tab tap).describe-screenbefore the tap does not help: 3 of 10 showed Explore.click --observe nonefollowed bydescribe-screenshowed the old Home in 10 of 10 tries.The cause is how long the screen takes to mount. The first Explore mount after an app restart takes about 2 s:
flowchart LR T["mm click Explore<br/>(tap works)"] --> O["+0.5 s click observation<br/>old Home, whole"] O --> D["+0.6 s describe-screen<br/>old Home"] D --> W["+1.3 s<br/>Home torn or whole"] W --> E["+1.9–2.3 s<br/>Explore appears"] O -.->|"new advice"| WF["mm wait-for --testid explore-safe-area"] WF --> E classDef new fill:#fff3cd,stroke:#d39e00 classDef stop fill:#f8d7da,stroke:#c82333 class WF new class O,D stopYellow boxes are new. Red boxes return the old screen.
Other tabs, on
main:launch→click)So the problem is not only Explore: it hits slow first mounts. Later taps in the Social runs failed because the Social onboarding sheet covers the tab bar, so they are left out.
screenChangedis not a reliable signal here. It wastruein 9 of the 10describe-screen-first tries. In 5 of those 9, the only change was the tapped tab's press feedback (about 3 px).What changes
SKILL.md, observationsmm wait-for --testid <id>. Do not tap again.SKILL.md,mm clickfalsemeans the screen looks the same as before the click"truedoes not prove that the app navigated.screenChangedis left out of the first click aftermm launch.README.md, mobile settlewait_foron the new screen's test ID.Docs only. The commits on this branch add the launch baseline (
3f17950), revert it (7d09014), then add the docs. The net diff touchesREADME.mdandSKILL.mdonly. No CHANGELOG entry.Review: read the new
SKILL.mdparagraph first.Testing
CI=1 yarn testpasses (61 files, 2251 tests; all files 97.98 % statements).yarn lintandyarn buildpass.Medium_Phone_API_36.1, dev client 8.19.0, Metro 8085, read-only tab taps only. Before =main671c50f(includes fix: retry a mobile observation while the screen is still tearing down #88), installed with yalc. Each try restarts the app (mm cleanupforce-stops it), unlocks it, then runs a newmm launchthat attaches to the unlocked app.launch→clickmainlaunch→clicklaunch→describe-screen→clickmainlaunch→click --observe none→describe-screenmainOut of scope / follow-ups
clickflag such as--expect-testid <id>that makes the observation wait for that test ID. It costs nothing when unused. This needs its own ticket.