Skip to content

Commit cbe725d

Browse files
authored
refactor(ios): gesture-response factory + performGesture wrapper in CommandExecution (#659)
Collapse the gesture-command boilerplate in the executeOnMain switch behind two seams: - performGesture(app, idleTimeout:) -> (timing, outcome): folds measureGesture + the scroll idle-timeout/quiescence-skip wrap. Parameterized: touch gestures wrap (idleTimeout: true, default); synthesis gestures (pinch/rotate/transform) pass idleTimeout: false because RunnerSynthesizedGesture governs its own timing — a distinction that was previously implicit. - gestureResponse(message:timing:frame:) over a GestureFrame (none/touch/drag): one factory for the success DataPayload (message + gesture timing + optional touch/drag visualization frame). The 13 gesture cases (tap x3, tapSeries x2, longPress, drag, dragSeries, swipe, mouseClick, pinch, rotateGesture, transformGesture) now use the seams; ~120 lines of repeated quartet (measureGesture + idle-wrap + unsupported check + 8-field DataPayload) collapse. CommandExecution.swift 949 -> 867. Behavior-preserving: identical outcomes, timing capture, DataPayload fields/messages, and the same touch-wrapped vs synthesis-unwrapped distinction. No wire change (the factory emits the already wire-locked DataPayload internally). mouseClick (throws) and swipe (returns an optional frame) keep their bespoke measure/wrap but route the success payload through gestureResponse. Verified: xcodebuild build-for-testing -> TEST BUILD SUCCEEDED (no warnings).
1 parent e96de31 commit cbe725d

1 file changed

Lines changed: 150 additions & 232 deletions

File tree

0 commit comments

Comments
 (0)