Skip to content

Fix iOS E2E restore and scanner interactions - #321

Merged
piotr-iohk merged 2 commits into
mainfrom
codex/ios-e2e-macmini-runtime
Nov 23, 2026
Merged

piotr-iohk merged 2 commits into
mainfrom
codex/ios-e2e-macmini-runtime

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Companion: synonymdev/bitkit-ios#1398

Changes

  • Enter the recovery phrase one word per field when the iOS Paste menu is unavailable. Wait for Restore to be enabled before pressing it.
  • Tap the part of the iOS scanner button above the overlapping Send and Receive buttons. Keep checking that the scanner prompt opens before submitting the QR data.

Why

On the Mini, entering the entire phrase as keystrokes filled the final field with one character and disabled Restore. That blocked the CPFP, RBF, and Lightning restore checks. LNURL reached the Send sheet when XCTest tapped Scan. The same failures occurred in each built-in attempt. Original PR job

Validation

  • Reproduced both failures locally with the exact #1398 Bitkit artifact on Xcode 27.2 and iPhone 17 with iOS 27.2.
  • Forced the new word-by-word fallback locally. The full CPFP case passed, including restoring and checking the original transaction.
  • The full LNURL case passed locally with 12 successful scanner opens.
  • TypeScript, ESLint on both edited files, and git diff --check passed.
  • The normal #1398 PR check on macmini1 passed at fdd25f8. The first pass completed 11 of 13 cases. The built-in retry passed RBF and Trezor in 6m 49s. Gate job · Required check

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings. Adds an iOS word-per-field fallback for recovery phrase entry plus a wait for RestoreButton to be enabled, and moves the iOS scanner tap to the top edge of Scan, above where the Send and Receive hit areas overlap it. Reviewed 132899f, full tier, static.

What I checked, and 4 candidates I ruled out

Read in full: test/helpers/actions.ts (pasteIOSText, typeText, confirmInputOnKeyboard, restoreWallet), test/helpers/gate-actions.ts, test/helpers/outcome.ts (actAndExpect, tapAndExpect), plus the iOS side they drive at bitkit-ios master: RestoreWalletView.swift, SeedTextField.swift, Components/Button/Button.swift, TabBar/ScanButton.swift.
Call sites traced: pasteIOSText (restoreWallet and migration.e2e.ts restoreRnWallet, which keeps the old typeText default), restoreWallet (10 specs), enterGateScanPrompt (9 calls in lnurl.e2e.ts).
CI: no checks report on this repo's PRs.
Build: build skipped: the author-permission check behind talos-pr-run could not read the collaborator permission with this token, so nothing on this branch ran here.

Ruled out

  • Word-by-word fallback on Word-0 triggers the paste handler: RestoreWalletView runs handlePastedWords only when firstFieldText contains whitespace. A single word goes to words[0], and fields 1 to 11 bind words[index] directly, so per-field setValue fills all 12 without the split.
  • waitForEnabled never resolving: RestoreButton is a CustomButton with isDisabled: !isValidMnemonic, which applies SwiftUI .disabled(...), so XCUITest's enabled flag follows mnemonic validity. With a valid phrase it resolves, and with an invalid one the wait fails at the right step.
  • Top-edge tap misses the round button: Scan is a 64 pt circle, so 2 pt below the top of its frame the circle is about 22 pt wide around x + width / 2. The tap lands inside it.
  • iOS path drops the Move to Spark intro recovery that tapAndExpect wraps around its wait (#306): lnurl_1 opens a channel before later scans, so the intro is possible on iOS. It only shows once Spark is usable on the Mini's local backend, which I could not establish from this repo. The author's full LNURL run, with 12 scanner opens, did not hit it. Too narrow to post.

Merge confidence: 4/5. No findings, but it did not run here and no CI covers it, and the Spark-intro candidate was ruled out only narrowly.

@piotr-iohk
piotr-iohk requested review from a team, ovitrif and pwltr and removed request for a team November 23, 2026 21:35

@pwltr pwltr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed fdd25f8. The reported forced-fallback CPFP run restored the wallet and recovered its activity. The iOS scanner tap still requires ScanPrompt before submitting the QR input.

Pre-existing Low candidate

If Appium rejects the second Word-0 tap in test/helpers/actions.ts:559, the restore test aborts before reaching the typing fallback. The tap sits outside the try that handles an unavailable Paste menu. This boundary is also present on the base, and the rejection remains unverified on the supported simulator.

Review details

Quick review
Model: Claude Opus 5.5
Reasoning effort: high

General review
Model: GPT-6.2 Sol
Reasoning effort: high

Combined review
Model: GPT-6.2 Sol
Reasoning effort: high

@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

I checked the Paste tap candidate against all four fallback occurrences in the passing Mini run. Both field taps returned HTTP 200 each time, and the Paste lookup timed out afterward. The fallback covers this reproduced path. A rejected field tap would need separate reproduction to establish the right recovery.

Review note · Mini run

@ovi-reviewer ovi-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: ✅ Approve

Findings: None.

QA for fdd25f8:

Restore a wallet after a CPFP boost ✅ The word-by-word fallback restored the wallet and the gate verified the original transaction and its CPFP activity.
Restore a wallet after an RBF boost ✅ The word-by-word fallback restored the wallet and the gate verified the boosted transaction on retry.

The first attempt tapped the enabled Restore button, then timed out waiting for Get Started.

Restore a wallet with Lightning activity ✅ The word-by-word fallback restored the wallet and the gate verified its balance and Lightning activity.
Open the scanner and process LNURL requests ✅ The gate logged 12 successful scanner opens and passed the LNURL journey.

The four journeys above ran at this E2E head on iOS 27.2. Companion iOS gate

Open the scanner while the Move to Spark intro is visible ✅ The test dismissed the intro with Later, opened the scanner prompt, and submitted an LNURL-pay code that reached amount entry.

This focused run used iOS 27.0 and the app at caa0cb1, with Electrum routed to an isolated regtest fixture. Scanner recovery included the wait for the covered button before dismissing the intro.

scanner-spark-intro-2x.2x.mp4

Full review covered both changed helpers at fdd25f8. The pasteboard-error fallback and Android scanner path were checked in code. Diff


Reviewed by gpt-6.2-sol-high

@piotr-iohk
piotr-iohk merged commit f148eab into main Nov 23, 2026
1 check passed
@piotr-iohk
piotr-iohk deleted the codex/ios-e2e-macmini-runtime branch November 23, 2026 22:48
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.

3 participants