Repository navigation
test: handle the move to spark intro - #297
Conversation
Codex Review SummaryThis 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. Teaches the timed-sheet helpers to dismiss the new Move to Spark intro with Later, as they already do the USDT intro, and to re-trigger the queue when it surfaces in place of the expected sheet. Reviewed c436191, full tier, static.
What I checked, and 5 candidates I ruled out
Read in full: test/helpers/actions.ts (triggerTimedSheetUnlessPresent, dismissInterveningSheets, dismissMoveToSparkIntroIfShown, waitForWalletHome, restoreWallet, completeOnboarding), test/helpers/navigation.ts (doTriggerTimedSheet), test/specs/transfer.e2e.ts (dismissHomeSheetsIfPresent, @transfer_1, @transfer_2), and the call sites in lightning, lnurl, send and multiaddress.
Cross-repo contract: the ids MoveToSparkIntro and MoveToSparkIntroLater match the sheet in synonymdev/bitkit-android#1774 (MoveToSparkSheet.kt testTags) and synonymdev/bitkit-ios#1212 (MoveToSparkSheet.swift accessibility identifiers). On Android the sheet is MOVE_TO_SPARK(priority = 7), above every other timed sheet, and onShown sets hasSeenMoveToSparkIntro, so the extra doTriggerTimedSheet() after a dismiss cannot bring the intro back.
CI: this repo reports no checks on the branch. The failure the PR targets is real: the bitkit-android#1774 E2E run before this branch existed failed @lightning_1 on TotalBalance-primary right after BackgroundPaymentsIntro-later not displayed. The app PRs' E2E runs that pick this branch up by name were still in progress when I looked.
Build skipped: talos-pr-run could not check the author's permission on this repo and fails closed, so nothing was run here; tsc, eslint and prettier are the author's report.
Ruled out
triggerTimedSheet: falsecallers now trigger the queue:dismissInterveningSheets()runs before the early return, but it triggers only after it dismissed an intervening sheet, which is what the USDT branch already did.- Intro surfacing more than 3 s after the final trigger: the earlier checks wait for home chrome and settle 700 ms around two dismiss passes before the trigger; a later surfacing needs the sheet manager to delay past that, which I could not show from the app code.
dismissHomeSheetsIfPresentintransfer.e2e.tsdoes not know the intro:@transfer_1is skipped, and@transfer_2goes throughdismissBackgroundPaymentsTimedSheet, which now handles it.- Intro after
restoreWalletin@lightning_1: whether it reappears depends on whether the restored settings backup carrieshasSeenMoveToSparkIntro, which I could not establish statically; the companion E2E run decides it. waitForWalletHomeandcompleteOnboardingdo not wait for the intro: a fresh wallet has no channel, andcanMoveneeds at least 1,000 sats sendable over a channel, so it cannot show there.
Merge confidence: 4/5, no findings, but nothing exercised this head yet: the companion E2E runs that do were still in progress.
|
Pushed
Re-running the failed Android e2e jobs against this head. |
|
Pushed
Re-running the failed Android e2e jobs against |
|
Pushed
Re-running the whole Android e2e workflow against |
|
Proven on synonymdev/bitkit-android#1774 at |
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full review of the whole PR diff against its merge base 849806e, at b004e5e. It covers the six commits that change test/helpers/actions.ts and test/helpers/navigation.ts. There was no earlier QA baseline to build on.
No new actionable code findings.
No new actionable code findings. The new helpers are withMoveToSparkIntroRecovery and dismissMoveToSparkIntroIfShown. They rethrow the original error when the intro is absent and retry only once. They do not loop back into tap, because Later is pressed with a direct click. The intro is shown at most once per wallet: both apps set hasSeenMoveToSparkIntro in onShown. So dismissing it with Later cannot make it come back.
Validation:
- The
MoveToSparkIntroLaterselector exists on both platforms. On Android it is atestTaginMoveToSparkSheet.ktat bitkit-androidc1f0b53. On iOS it is anaccessibilityIdentifierinMoveToSparkSheet.swiftat bitkit-ios0571934. The iOS container uses.accessibilityElement(children: .contain), so the child IDs stay queryable. - I read the job logs of Android E2E run 42315992886 on synonymdev/bitkit-android#1774 at its current head
c1f0b53. The run checks out this branch atb004e5e, and all 7 shards pass. The helper logged an intro dismissal insend,lightning_security,lnurl_transfer(twice) andmulti_address_local. This matches the author's earlier run 42309414918 at95fe192. - In the
sendshard the intro appeared during atap. Recovery dismissed it only after the full 30 s wait timed out. This is expected for a once-only sheet, not a defect. - The "Background Payments intro not displayed" lines also appear in shards before the intro ever showed. They do not come from the new Move to Spark path.
Limitations:
- No iOS e2e ran. synonymdev/bitkit-ios#1212 has no e2e job, so the iOS paths are checked by reading source only.
- On iOS,
TimedSheetManager.onSheetDismisseddoes not schedule a new queue check after a dismiss. The next sheet therefore does not appear on its own after the intro closes, as the helper comment expects on Android. Instead,awaitSheetAfterMoveToSparkwaits 5 s and then triggers again throughHeaderMenu. That fallback has not run on a device. - I did not check at runtime whether wallet-home elements under the iOS intro are hidden from XCUITest, which the
taprecovery relies on. - I did not run
tsc,eslintorprettierlocally because dependencies are not installed. The author reports they pass. This repository has no CI checks of its own on the branch.
Suggested additional test cases
- iOS: build synonymdev/bitkit-ios#1212 so a wallet with an open channel gets a usable Spark wallet. Run
lightning.e2e.ts(@lightning_1),send.e2e.ts(@send_2),lnurl.e2e.ts(@lnurl_1) andmultiaddress.e2e.ts(@multi_address_4) against this branch. Expected: the log shows "Move to Spark intro visible, dismissing with Later...". After the intro closes, the QuickPay and Background Payments steps get past the 5 s wait plusHeaderMenutrigger, and the specs pass without the intro covering home during balance reads.
Reviewer model: claude-opus-5-5
Reasoning effort: high
pwltr
left a comment
There was a problem hiding this comment.
Reviewed commit b004e5e. No findings.
The helpers dismiss the once-only Move to Spark intro with Later wherever it can cover home: a failed wait retries once after dismissing it, a received payment checks for it briefly after its sheet closes, and the timed-sheet trigger treats it as an intervening sheet, triggering the queue again only when home is uncovered.
Review details
General review
Model: Claude Opus 5.5
Reasoning effort: high
|
Merged: approved by @pwltr, no findings from @piotr-iohk, no open threads. The helpers only act when the Move to Spark intro shows, so this lands ahead of synonymdev/bitkit-android#1774 and synonymdev/bitkit-ios#1212, as the reviews asked. |
Companion:
Description
The apps now show a one-time Move to Spark intro, at the top timed-sheet priority, once a wallet's Lightning channels can move a balance to a ready Spark wallet. That turns true on state a test cannot see (a receive, Spark connecting), so the intro can cover home at any step of a suite that opens a channel and receives over it.
dismissMoveToSparkIntroIfShown(), which taps Later, andwithMoveToSparkIntroRecovery(), which retries a failed wait once after dismissing the intro, as the ANR recovery does for system dialogs.tap, the received-payment wait and theHeaderMenuwait indoTriggerTimedSheetrecover through it, andacknowledgeReceivedPaymentdismisses the intro if it shows within 3 s, ahead of balance reads.MoveToSparkIntroLater, queryable on both platforms.On synonymdev/bitkit-android#1774, without this branch,
lightning_security,lnurl_transfer,multi_address_localandsendfailed with the intro covering home (@lightning_1,@lnurl_1,@transfer_2,@multi_address_4,@send_2).QA Notes
feat/move-to-spark, the companion default), so the Android e2e run on feat: move LN channel balances to spark bitkit-android#1774 proves it; iOS e2e does not run on feat: move LN channel balances to spark bitkit-ios#1212.95fe19287: all 7 e2e shards pass againstb004e5e, and the helper dismissed the intro inlightning_security,send,multi_address_localandlnurl_transfer.tsc --noEmit,eslintandprettier --checkpass on the changed files.