Skip to content

Commit 63ba51f

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 e0aedd4 commit 63ba51f

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
@@ -64,9 +64,12 @@ extension CommandType {
6464
var traits: CommandTraits {
6565
switch self {
6666
// Interaction commands: require the foreground-guard + stabilization preflight.
67-
case .tap, .longPress, .drag, .remotePress, .type, .swipe,
67+
// tapSeries/dragSeries are the series forms of tap/drag; keyboardReturn is the sibling
68+
// of keyboardDismiss — all three were missing from the historical switch (drift the
69+
// table now prevents) and are classified as interactions here.
70+
case .tap, .tapSeries, .longPress, .drag, .dragSeries, .remotePress, .type, .swipe,
6871
.back, .backInApp, .backSystem, .rotate, .appSwitcher,
69-
.keyboardDismiss, .pinch, .rotateGesture, .transformGesture:
72+
.keyboardDismiss, .keyboardReturn, .pinch, .rotateGesture, .transformGesture:
7073
return CommandTraits(isInteraction: true, readOnly: .never, isLifecycle: false)
7174

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

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

0 commit comments

Comments
 (0)