Repository navigation
feat: filter mobile status/nav bars and dev overlay; viewport from snapshot - #67
Draft
cryptotavares wants to merge 1 commit into
Draft
cryptotavares wants to merge 1 commit into
cryptotavares wants to merge 1 commit into
Conversation
cryptotavares
added this pull request to stack #63
October 25, 2026 09:32
cryptotavares
force-pushed
the
cryptotavares/mmcli-p1-13-mobile-snapshot
branch
from
October 25, 2026 09:39
3cc8aa9 to
52e4d72
Compare
cryptotavares
force-pushed
the
cryptotavares/mmcli-p1-13-mobile-snapshot
branch
from
October 25, 2026 09:47
52e4d72 to
9c6fb65
Compare
…apshot
Ticket P1-13.
- filterAppHierarchy (new src/platform/mobile-hierarchy.ts) runs once per
snapshot, before the a11y tree, testIds and generated locators are built,
so all of them agree:
- Android: drop top-level windows shaped like a bar (full width or
height, at most 15 % thick) whose ids are all `com.android.systemui:*`
(status bar: clock, signal, battery change on every snapshot; nav bar).
Other system windows (biometric prompt, consent dialogs, permission
dialogs, keyboard) stay. Flat hierarchies: drop only status/nav bar ids.
- iOS / Android: drop the Expo dev menu button (`gearshape.fill` plus its
"Tools" label). `MobilePlatformDriver` option `excludeDevOverlay`
(default true, new exported `MobilePlatformDriverOptions`).
- The testId viewport comes from the snapshot (iOS root frame, Android
extent of the top-level windows); getWindowSize() is called (and cached)
only when the snapshot has none. Before, every testId read made one extra
device call.
- Mobile settle: the time budget includes the first capture, and an
unchanged screen is not re-captured when the first capture already took
>= 1 s (MOBILE_SETTLE_SLOW_CAPTURE_MS). Busy screens still retry.
- Observations, describe_screen, list_testids and accessibility_snapshot
take one snapshot each (P1-08 captureScreen); tests lock that in.
cryptotavares
force-pushed
the
cryptotavares/mmcli-p1-13-mobile-snapshot
branch
from
October 25, 2026 09:54
9c6fb65 to
6136dc6
Compare
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.
Description
Mobile observations carried noise and made more device calls than needed:
com.android.systemui:*ids. The clock, signal and battery change between snapshots, so they made up most of the 35 login testIds, and unchanged screens never produced an empty diff.gearshape.fill+ "Tools") showed up as an app element on both platforms.getWindowSize()device call for the visibility check.Changes:
filterAppHierarchy(newsrc/platform/mobile-hierarchy.ts) runs once per snapshot. The a11y tree, testIds andgenerate_locatorsare all built from its output, so they agree.com.android.systemui:*. That covers the status bar and nav bar. Other system windows (biometric prompt, consent and permission dialogs, keyboard) stay. In a flat hierarchy, only status/nav bar ids are dropped.MobilePlatformDriveroptionexcludeDevOverlay(defaulttrue; typeMobilePlatformDriverOptionsis exported) turns this off.getWindowSize()is now only a cached fallback.MOBILE_SETTLE_SLOW_CAPTURE_MS); on Android one capture is anam instrumentrun;describe_screen,list_testidsandaccessibility_snapshottake one snapshot each (P1-08'scaptureScreen).Part of the mm CLI v2 effort: ticket
P1-13(Phase 1).Stacked on #66 (review that first).
Breaking changes
None. The constructor option is optional. Mobile testIds and trees no longer contain Android status/nav bar windows or the Expo dev menu button.
Consumer impact
test/e2e/playwright/llm-workflow/tests/llm-workflow/Proof
Tested with yalc builds in Mobile (dev client) on the iOS simulator and the Android emulator. Before = #66 build, after = this branch. Click and benchmark rows are 5 runs each; host load was 5–14.
com.android.systemuidescribe-screenroot windows / systemui nodesgenerate-locatorson loginobservationMsp50 / p95gearshape.fill)observationMsp50 / p95list-testids/describe-screentoolMs p50idb describe(window size) per click / describe / listAC3 ("Android click
observationMsroughly halves") is not met, and core cannot meet it.waitForElement+tapElement, in device-mcp / the Mobile agent-device helper) and 1 for the observation.Still noisy on Android:
ViewGroups. P1-14 (drop layout-only nodes) covers this.Toolbar/FloatingBarHostingViewnodes remain. They are most likely UIKit's floating bar per navigation controller, not the dev launcher. They are kept for now, pending a check on a release build.Unit tests
New tests:
mobile-hierarchy.test.ts:excludeDevOverlayoption, empty-container pruning;src/platform/__fixtures__/, excluded from the build), which reduces to 1 root and 0 systemui testIds.getWindowSizeat most once,generateLocatorsfiltered.