You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7da8d77
Browse filesBrowse the repository at this point in the historyBrowse files
Show an agent when the mirrored app is not in the foreground
A backgrounded iOS app keeps its whole accessibility tree, so the mirror still
draws every control and an agent would still click one — onto the springboard,
not the app. No signal in the node tree catches this: per-node hittable
oscillates while a screen animates into the background and settles back to its
foreground values, so a tree-only check is racy both ways.
Read the app's own XCUIApplication.state, which the runner now reports on each
snapshot (maestro-runner 5d782aa). It threads through as runner.Snapshot{Nodes,
AppState} on the settle seam and the server's TreeSource, and the tree payload
gains "foreground" and "appState". The page annotates the root name — "device
screen … — app not in foreground" — so it rides into an agent's snapshot, and
sets data-dd-foreground for tests. Annotated, never blocked: the tap still
forwards, because a wrong state read must not strand a caller. Empty state
(Android, or a runner that did not send one) reads as foreground.
go.mod moves to the tagged maestro-runner pseudo-version that carries appState
(no local replace). Coverage held: the testable seam is 100% (treePayload
foreground mapping, SnapshotState delegators); the engine SnapshotState methods
keep the e2e waiver. Verified: full suite green, mirror-fixtures 13/13 including
the backgrounded-app annotation.
Measured limit, worth knowing: a scoped XCUITest snapshot tends to foreground
the target app, so under continuous polling a backgrounded app is pulled forward
within a poll and the annotation is brief — exact at snapshot time and right for
single-shot consumers, not a fight to keep an app backgrounded.
0 commit comments