Skip to content

fix(ios-e2e): avoid alert probe after stalled WebView read - #2897

Closed
thymikee wants to merge 1 commit into
mainfrom
fix/ios-webview-deep-link-smoke
Closed

thymikee wants to merge 1 commit into
mainfrom
fix/ios-webview-deep-link-smoke

Conversation

@thymikee

@thymikee thymikee commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Give the WebView route's first native landmark up to 45 seconds before probing for a deep-link system alert. The linked failed run restarted XCTest during bridge fallback; its 15-second landmark wait expired, and alert get queried an already visible WKWebView, leaving the runner busy. A healthy WebView route still finishes this wait as soon as the landmark appears.

The shared 15-second default and failed-wait → alert get/accept path remain in place for real “Open in” confirmations. Two files changed.

Validation

Commit e358595a5905807d97ec3607f1eceb94edbd5f26: pnpm format and pnpm check:affected --run passed (format, lint, typecheck, Fallow; Vitest found no related tests). The failed WebView run and a successful run with a real confirmation informed the budget and retained alert path. The iOS simulator replay on this PR head is pending; it is the live behavior check. A restart longer than 45 seconds can still reach the alert probe.

@thymikee
thymikee marked this pull request as draft September 24, 2026 12:16
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.80 MB 4.80 MB 0 B
Package (unpacked) 4.80 MB 4.80 MB 0 B
Package (download) 1.44 MB 1.44 MB -3 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.2 ms 27.6 ms +0.4 ms
CLI --help 79.3 ms 80.0 ms +0.7 ms

@thymikee
thymikee force-pushed the fix/ios-webview-deep-link-smoke branch from f8d4c98 to e358595 Compare September 24, 2026 12:27
@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at e358595. The code looks good: the longer 45 s landmark wait applies only to the WebView route, and the shared 15 s default and the alert path stay the same.

Not blocking: no run has yet shown the XCTest restart path finishing inside the new 45 s budget, so the fix is supported by the failure pattern rather than by a direct run. Checks were still queued at review time.

@thymikee

Copy link
Copy Markdown
Member Author

Recommend closing this in favor of #2901 and #2902, both review-clean:

One gap: this PR allowed up to 45 s for the landmark before the 20 s page wait, while #2902 allows 15 s plus the caller's 20 s. A runner restart longer than about 35 s would pass here and fail there. No such restart has been observed. Both PRs edit the same helper, so they will conflict.

@thymikee

Copy link
Copy Markdown
Member Author

The exact-head iOS smoke job for this PR passed, but I’m keeping it open as a draft for now. I agree #2901 addresses the expensive no-alert query. I found a real prompt path missing from #2902’s APP_NOT_RUNNING classifier and documented it here: a previous passing run had readable XCTest captures until the destination wait expired, then alert get/accept handled “Open in…”. The 35 s combined wait budget also falls short of the linked failed run’s 51.9 s runner recovery. Once the replacement covers both shapes, this overlapping PR can close.

@thymikee

Copy link
Copy Markdown
Member Author

#2901 and #2902 have now merged into main. The replacement keeps the native landmark wait at 15 seconds per attempt, but allows up to five bounded attempts for stalled/restarting captures; it also probes readable timeouts for a real “Open in…” confirmation. That addresses the two paths raised above without this PR's 45-second WebView-only override.

#2897's exact-head iOS smoke passed, but it did not reproduce the 51.9-second restart. The post-merge iOS smoke for #2902 is still queued (job 107700023853). I am keeping this PR in draft while that replacement run completes, then expect to close it as superseded if the run passes. No rebase is needed for a superseded patch.

@thymikee

Copy link
Copy Markdown
Member Author

The replacement now has the live evidence I was waiting for. #2901's exact-head iOS smoke passed, and #2902's exact-head iOS job completed both the targeted XCTest step and the fixture-backed simulator E2E smoke step successfully. The fixture smoke includes smoke:webview-remote-content, the route involved in the original failure; the job is finishing a separate gesture replay at the time of this comment.

#2901 removes the expensive absent-alert query, and #2902 retries typed readable/stalled waits with a bounded budget while retaining the real confirmation path. This supersedes this PR's single 45-second landmark wait. I am closing this draft instead of rebasing an overlapping fallback.

@thymikee thymikee closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant