Skip to content

fix: restore waits past the move to spark intro - #308

Merged
ovitrif merged 1 commit into
mainfrom
fix/restore-move-to-spark-intro
Nov 12, 2026
Merged

ovitrif merged 1 commit into
mainfrom
fix/restore-move-to-spark-intro

Conversation

@ovitrif

@ovitrif ovitrif commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR makes restoreWallet wait 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). restoreWallet ended on a bare 90 s wait for TotalBalance-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_1 on bitkit-ios feat/breez-spark-lightning at 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

@ovitrif ovitrif self-assigned this Nov 12, 2026
@ovitrif
ovitrif requested a review from pwltr November 12, 2026 05:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T05:57:47.672278Z 2042722 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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. 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: waitUntil short-circuits on the balance, but dismissMoveToSparkIntroIfShown() 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 withMoveToSparkIntroRecovery are where that case is caught.
  • Callers that pass expectBackupSheet / expectQuickPayTimedSheet / expectBackGroundPaymentsSheet: those sheets are reached through triggerTimedSheetUnlessPresent, 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 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.

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

@ovitrif

ovitrif commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Merging: approved, and bitkit-ios e2e on feat/breez-spark-lightning passes with this branch (https://github.com/synonymdev/bitkit-ios/actions/runs/43164690795).

@ovitrif
ovitrif merged commit 0ca01e0 into main Nov 12, 2026
@ovitrif
ovitrif deleted the fix/restore-move-to-spark-intro branch November 12, 2026 07:37
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