Repository navigation
fix: restore waits past the move to spark intro - #308
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. restoreWallet now waits for either home or the Move to Spark intro, dismisses the intro with Later when it shows, then waits for TotalBalance-primary. Reviewed 2042722, light tier (10 changed lines, test helper only).
What I checked, and 4 candidates I ruled out
Read in full: restoreWallet, isTestIdDisplayed, dismissMoveToSparkIntroIfShown, withMoveToSparkIntroRecovery, triggerTimedSheetUnlessPresent and dismissInterveningSheets in test/helpers/actions.ts
Call sites traced: the 13 restoreWallet callers in test/specs and test/helpers/native-migration.ts, including lightning.e2e.ts:246, the failing @lightning_1 path, which asserts TotalBalance right after the restore
Build: not run here; light tier, static review of a test helper. No checks report on this repo; the linked bitkit-ios run 43164690795 was still in progress (build stage) when I read it.
Ruled out
- Both visible at once:
waitUntilshort-circuits on the balance, butdismissMoveToSparkIntroIfShown()still probes the Later button once afterwards, so the intro is dismissed either way. - Intro arriving after home is already up: the wait returns on home and the single probe misses it. That ordering failed the same way before this diff, so it is not introduced here; the later waits wrapped in
withMoveToSparkIntroRecoveryare where that case is caught. - Callers that pass
expectBackupSheet/expectQuickPayTimedSheet/expectBackGroundPaymentsSheet: those sheets are reached throughtriggerTimedSheetUnlessPresent, which already dismisses the intro, so the new wait finds home and the probe is a no-op. - Timeout budget: 90 s for home-or-intro plus 30 s for the balance after a dismiss, so no path gets a shorter wait than the old bare 90 s.
Merge confidence: 4/5, light tier with no build run and the e2e evidence run not finished when reviewed.
pwltr
left a comment
There was a problem hiding this comment.
No findings at 2042722.
restoreWallet now waits up to 90 s for either TotalBalance-primary or the Move to Spark intro's Later button. It dismisses the intro when it shows, then waits for the balance. With the intro over home, the restore no longer times out, and no path waits less than the old bare 90 s.
An intro that appears only after home is already showing is still missed by the single probe, as it was before this change. The later withMoveToSparkIntroRecovery waits are what catch it.
This repository reports no checks, and the linked bitkit-ios e2e run was still in progress when I reviewed.
Review details
General review
Model: Claude Opus 5.5
Reasoning effort: high
|
Merging: approved, and bitkit-ios e2e on feat/breez-spark-lightning passes with this branch (https://github.com/synonymdev/bitkit-ios/actions/runs/43164690795). |
Description
This PR makes
restoreWalletwait past the Move to Spark intro.A restored wallet whose channels hold a balance gets the intro once Spark connects, over home (synonymdev/bitkit-ios#1212).
restoreWalletended on a bare 90 s wait forTotalBalance-primary, the one wait the intro recovery from #297 and #306 did not cover. It now waits for either home or the intro, dismisses the intro with Later when it shows, then waits for the balance.This failed
@lightning_1on bitkit-iosfeat/breez-spark-lightningat 5562ef0d9, all 3 attempts, after #1212 merged there: the intro covered home after the restore, and the wait ran out with it still open.Test
tsc --noEmit, eslint and prettier pass.feat/breez-spark-lightning(8fafd680d) with this branch passes,@lightning_1included: https://github.com/synonymdev/bitkit-ios/actions/runs/43164690795