From 7d4e85f407cc879a4be1b0dff1bee202b021e53e Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 15 Aug 2026 21:44:21 +0530 Subject: [PATCH] refactor(runner): drop the empty branch from the hold path --- internal/runner/runner.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 500c165..a7aac31 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -318,10 +318,7 @@ func Run(ctx context.Context, options Options) (Summary, error) { } applySkipped := held - if held { - // lastAction is left exactly as it is: it is still the action the - // next verified step has to be told about. - } else if nextErr == nil && !appIsForeground(ctx, options) { + if nextErr == nil && !appIsForeground(ctx, options) { // The app left the foreground between observe and apply (a prior // action's gesture settling late, or an async navigation). The // chosen action's coordinates reference a tree that no longer @@ -365,9 +362,12 @@ func Run(ctx context.Context, options Options) (Summary, error) { applied.Applied = true lastAction = &applied } - } else { + } else if !held { lastAction = nil } + // A held step leaves lastAction alone on purpose: nothing ran here, and + // the action it points at is still the one the next verified step has to + // be told about. step := trace.Step{ Index: stepIndex,