Repository navigation
Conversation
The Move to Spark intro is now the Update Spending Balance modal, which quotes on open. On local regtest the quote fails within about half a second and the modal switches to its too-large state, so the helpers, which only knew MoveToSparkIntroLater, left payment and timed-sheet tests stuck behind it. - Treat any Move to Spark state as the sheet being shown: MoveToSparkIntro, UpdateSpendingBalance, SpendingBalanceUpdated, MoveToSparkTooLarge, MoveToSparkFailed, MoveToSparkInFlight and MoveToSparkPartlyMoved, with one combined selector per poll. - Dismiss with whichever of MoveToSparkIntroLater, UpdateSpendingBalanceLater, UpdateSpendingBalanceDismiss or SpendingBalanceUpdatedOk is shown, once it has held still for 1 s, then confirm the sheet closed and tap again if its state changed under the tap. - Keep the old intro ids so the base app branch still passes. - Cover the too-large flip, a state change under the tap and the moved state in the unit test on both platforms. Verified: npx tsx --test test/unit/*.test.ts (all pass), npx eslint 'test/**/*.ts', npx tsc --noEmit -p ., npx prettier --check on the changed files
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.
1 finding (1 P1). Teaches the Move to Spark dismiss helper the new Update Spending Balance modal states. Reviewed c62e6cc, full tier, static: build skipped, talos-pr-run could not check the author's permission on this repo and fails closed, so the unit tests were not run here.
What I checked, and 3 candidates I ruled out
Read in full: the diff of test/helpers/actions.ts and test/unit/late-usdt-intro.test.ts; MoveToSparkSheet.kt and Button.kt at synonymdev/bitkit-android#1967 head 2de3e680
Call sites traced: dismissMoveToSparkIntroIfShown from restoreWallet, acknowledgeReceivedPayment, triggerTimedSheetUnlessPresent, dismissInterveningSheets, withMoveToSparkIntroRecovery
CI: no checks on this PR; the companion app PR's local e2e shards were still running
Ruled out
- Combined selectors: Android
resourceIdMatcheswitha|b|cis a full-match regex and none of the ids carry regex metacharacters; the iOSname IN {...}predicate is well formed. - Settle loop on the Update state:
UpdateSpendingBalanceLateris aSecondaryButtonwhosetestTaglands on theOutlinedButton, so it is found and enabled while the quote loads. - iOS base branch: bitkit-ios still ships
MoveToSparkIntroLateronly, and that id stays in the list. - Cold reader: the finding stood.
Merge confidence: 3/5, one P1 on the path the PR targets.
Verified: npx tsx --test test/unit/*.test.ts, eslint, prettier, tsc
Summary
dismissMoveToSparkIntroIfShowntaps whichever dismiss button is showing:MoveToSparkIntroLater,UpdateSpendingBalanceLater,UpdateSpendingBalanceDismissorSpendingBalanceUpdatedOk. It waits for that button to hold still for 1 s, waits for the sheet to close, and taps the new button when the state changed under the tap (up to 3 taps).Companion: synonymdev/bitkit-android#1967
Verification
npx tsx --test test/unit/*.test.tspasses, including new Android and iOS cases for a quote that turns "too large" 500 ms after opening, a state change under the tap, and an "updated" sheet dismissed with OK. The "too large" case fails with the settle window set to 0.test/**/*.ts,tsc --noEmitand Prettier on both changed files are clean.Out of scope
@blocktank_sunset_2intest/specs/mainnet/blocktank-sunset.e2e.tsneeds a rewrite: a fresh wallet no longer reaches the receive-side Transfer Unavailable route, since the Spending tab now shows only when a Lightning invoice can be created. That mainnet-only spec is not run by the app PR's CI.