Skip to content

fix(stage2): recover from iOS error screen + dismiss org modal → paid VISUAL=2 is green 2/2#96

Merged
dadachi merged 2 commits into
mainfrom
fix/ios-error-screen-recovery
May 23, 2026
Merged

fix(stage2): recover from iOS error screen + dismiss org modal → paid VISUAL=2 is green 2/2#96
dadachi merged 2 commits into
mainfrom
fix/ios-error-screen-recovery

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented May 23, 2026

Result: the first fully green paid VISUAL=2 run — 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 (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 a per-platform recover; judge.ts wires 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

  • recoverFromErrorScreen unit test (taps when present / no-ops otherwise); judgeWithRetry recover-hook test.
  • npm run ci80/80.
  • Validated end-to-end: a real paid VISUAL=2 run came back overall PASS, 2/2.

🤖 Generated with Claude Code

dadachi added 2 commits May 23, 2026 20:52
…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.
@dadachi dadachi merged commit cc00c19 into main May 23, 2026
1 check passed
@dadachi dadachi deleted the fix/ios-error-screen-recovery branch May 23, 2026 12:14
@dadachi dadachi mentioned this pull request May 23, 2026
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>
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