Skip to content

Commit ff1f2e9

Browse files
committed
fix(ios): classify tapSeries/dragSeries/keyboardReturn as interaction commands
tapSeries and dragSeries are the series forms of tap/drag (already interaction commands); keyboardReturn is the sibling of keyboardDismiss (already an interaction command). All three were missing from the historical isInteractionCommand switch — a drift the new CommandTraits table (#642) makes visible. Classifying them as interaction commands gives them the foreground-guard + stabilization preflight that their single-shot/sibling forms already get. Behavior change: these three commands now re-activate a backgrounded target to foreground and pay the stabilization delays before running. Ships separately from the CommandTraits refactor (#642) and should land after that bakes. mouseClick left unchanged: macOS-only and the foreground guard interacts with bespoke macOS activation, so it needs a macOS smoke check first.
1 parent b0c628a commit ff1f2e9

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ extension CommandType {
6767
var traits: CommandTraits {
6868
switch self {
6969
// Interaction commands: require the foreground-guard + stabilization preflight.
70-
case .tap, .longPress, .drag, .remotePress, .type, .swipe,
70+
// tapSeries/dragSeries are the series forms of tap/drag; keyboardReturn is the sibling
71+
// of keyboardDismiss — all three were missing from the historical switch (drift the
72+
// table now prevents) and are classified as interactions here.
73+
case .tap, .tapSeries, .longPress, .drag, .dragSeries, .remotePress, .type, .swipe,
7174
.back, .backInApp, .backSystem, .rotate, .appSwitcher,
72-
.keyboardDismiss, .pinch, .rotateGesture, .transformGesture:
75+
.keyboardDismiss, .keyboardReturn, .pinch, .rotateGesture, .transformGesture:
7376
return CommandTraits(isInteraction: true, readOnly: .never, isLifecycle: false)
7477

7578
// Read-only reads: eligible for the session-invalidating retry.
@@ -89,12 +92,11 @@ extension CommandType {
8992
return CommandTraits(isInteraction: false, readOnly: .never, isLifecycle: true)
9093

9194
// Normal preflight, not retried.
92-
// NOTE — pre-existing classifications preserved verbatim (candidates for a later, separate
93-
// normalization PR, not this refactor): mouseClick / tapSeries / dragSeries are NOT interaction
94-
// commands; keyboardReturn is NOT an interaction command (unlike its sibling keyboardDismiss);
95-
// querySelector is NOT read-only; recordStart is NOT a lifecycle command.
96-
case .mouseClick, .tapSeries, .dragSeries, .querySelector,
97-
.home, .keyboardReturn, .recordStart:
95+
// NOTE: mouseClick stays non-interaction for now — it is macOS-only and the foreground
96+
// guard interacts with bespoke macOS activation, so classifying it needs a macOS smoke
97+
// check first (tracked as a follow-up). Also preserved: querySelector is NOT read-only;
98+
// recordStart is NOT a lifecycle command; home/alert remain non-interaction by design.
99+
case .mouseClick, .querySelector, .home, .recordStart:
98100
return CommandTraits(isInteraction: false, readOnly: .never, isLifecycle: false)
99101
}
100102
}

0 commit comments

Comments
 (0)