fix(stage2): recover from iOS error screen + dismiss org modal → paid VISUAL=2 is green 2/2#96
Merged
Merged
Conversation
…ing "Back to Start Screen" The paid iOS app intermittently lands on a "Something went wrong. Please try again." error screen at launch (on the sim; not on a real device). Its "Back to Start Screen" button logs out, resets login info, and returns to welcome — a clean state to (re)start from. Use it to recover: - stage2.ts: export recoverFromErrorScreen(client) — taps the button if the error screen is up (reuses findByText/centerOf). - visual-judge.ts: judgeWithRetry gains an optional `recover` hook, run before each retry's re-capture; runVisualJudge forwards it. - stage1.ts: threads per-platform recover into runVisualJudge. - judge.ts: for VISUAL=2 (WDA available, non-stub), wires an iOS recover that lazily creates a mobile client and taps "Back to Start Screen" on a renders-cleanly retry, so Stage 1 re-captures a clean welcome instead of the error. Client closed after Stage 1. - stage2-judge.ts: also recover right after foregrounding the app in Stage 2. Tests: recoverFromErrorScreen (taps when present / no-ops otherwise) + judgeWithRetry recover-hook fires before the retry. 80/80.
…e Sample wait It surfaces late (after the list loads) at the same point as the Keychain/ notification dialogs, covering 'Sample Household' — tap OK/Cancel before the Sample wait. iOS Stage 2 was reaching 39/40 and stalling there.
Merged
dadachi
added a commit
that referenced
this pull request
May 23, 2026
Validation-harness stability — Stage 1/2 capture and iOS Stage 2 reliability. Internal to the agent's `NATIVEAPPTEMPLATE_VISUAL` validation; no CLI flags or generated-output changes since 0.2.0. Since 0.2.0: - fix: clean-install the app before launch (clears stale per-run state) (#91) - fix: settle the screen before judging — stability poll vs blind sleep (#92) - fix: retry the capture+judge on a transient render-quality fail (#93) - chore: target iPhone 17 Pro simulator instead of iPhone 17 (#94) - fix: Stage 2 foregrounds the app + dismisses the post-sign-in Keychain dialog (#95) - fix: recover from the intermittent iOS launch error + dismiss the paid org modal (#96) Outcome: paid VISUAL=2 now runs fully green (Layer 3 2/2 — iOS Stage 2 46/46, Android 48/48), validated end-to-end on a real sim/emulator. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Result: the first fully green paid
VISUAL=2run — Layer 3 2/2 (iOS Stage 2 46/46, Android 48/48), overall PASS.The last two blockers on iOS Stage 2, both confirmed against a live sim:
1. Recover from the intermittent "Something went wrong" launch error (
7a9fa04)The paid app intermittently lands on a "Something went wrong" error screen at launch on the simulator (not on a real device). Its "Back to Start Screen" button logs out, resets login info, and returns to welcome (per the maintainer).
stage2.ts:recoverFromErrorScreen(client)— taps the button if the error screen is up (reusesfindByText/centerOf).visual-judge.ts:judgeWithRetrygains an optionalrecoverhook, run before each retry's re-capture;runVisualJudgeforwards it.stage1.tsthreads a per-platform recover;judge.tswires an iOS recover (lazy mobile client, VISUAL=2 only, non-stub) so a renders-cleanly retry taps "Back to Start Screen" and re-captures a clean welcome. Also runs after foregrounding in Stage 2.2. Dismiss the paid "personal organization" modal before the Sample wait (
4b9b077)The paid multi-tenancy modal ("You are in personal organization", OK / Go to Organizations) surfaces late — once the list loads — covering "Sample Household" at the same point as the Keychain/notification dialogs. The scenario's earlier OK-dismiss ran too soon; added OK/Cancel right before the Sample wait. This took iOS Stage 2 from 39/40 → 46/46.
Testing
recoverFromErrorScreenunit test (taps when present / no-ops otherwise);judgeWithRetryrecover-hook test.npm run ci→ 80/80.VISUAL=2run came back overall PASS, 2/2.🤖 Generated with Claude Code