Repository navigation
feat: spark transfer status design - #1318
Conversation
Maps the deposit states onto the six Funds In Transfer (spark) frames: processing, payment successful, fast fee changed, fast transfer unavailable, adding to spending balance and transfer successful. Adds a journey and tests for the mapping.
Frame 2 follows Spark listing the deposit at either speed, and only Wait shows the normal speed on the last step, so a deposit the banner reopens shows its real step.
The coins of the fee changed and fast transfer unavailable frames stay still, as in the design.
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18df7f9038
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The changes affect two bounded Spark progress workflows in the wallet app. Restore unresolved fee choices when reopening a transfer before merging. FindingsSummaryUpdates Spark transfer progress with the designed stages, fee-change choices, and success screen.
Intentional scope recorded from Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Tap Home transfer banner] --> B[Choose first unclaimed deposit]
B --> C{Same deposit already shown?}
C -->|Yes| D[Keep current state]
C -->|No, including after restart| E[Set state to later and clear decision flags]
D --> F[Open transfer progress]
E --> F
G[Tap Savings banner] --> H{Spark exit running?}
H -->|Yes| I[Open exit progress]
Reviews (1) · Last reviewed commit: "chore: add changelog fragment" · Reviewed by Greptile |
|
Milestone 3.2.0: this PR is the iOS twin of synonymdev/bitkit-android#1901 and brings the Spark transfer status screens to their design and restores the Home banner tap, both part of the Spark release in 3.2.0. It closes no issue, so the milestone sits on this PR. |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. The iOS twin of synonymdev/bitkit-android#1901: the six "Funds in transfer" frames, the Home transfer banner opening the pending deposit's progress, and the Savings banner opening a running emergency exit. Reviewed 18df7f9, full tier, static: iOS does not build on Linux, so this rests on the code and CI.
What I checked, and 4 candidates I ruled out
Read: the full diff, plus SparkTransferFlow (showDeposit, noteSettled, payRepriced, waitForConfirmations, setClaimState, pollDeposit), SettingUpView, ActivityLatest.openTransferProgress, SparkManager's local deposit merge and SparkDeposit, SparkExitManager.isExiting, and every localization key the diff adds or removes.
Strings: each removed lightning__setting_up_speed and lightning__spark_deposit__* key has no remaining reference in Bitkit/ or BitkitTests/; each added key is referenced once.
CI: Run Integration Tests, SwiftFormat, build-local, validate and Greptile green; Run Tests and e2e-tests-local were still running when I posted.
Ruled out
- Banner tap resetting the transfer the flow follows:
showDepositreturns early for the txid already on screen, so its Approve or Wait choice survives the reopen. - A stale poll writing over the reopened deposit:
setClaimStatedrops results for any txid other than the one on screen. - Banner tapped before Spark lists the deposit:
inProgressTxidreadsSparkManager.deposits, which already holds the broadcast deposit withisListed: false. - Savings banner opening an empty progress screen: guarded on
SparkExitManager.shared.isExiting, so a channel close's savings banner does nothing, as before.
Merge confidence: 4/5, no findings and the flow changes are covered by SparkTransferFlowTests, but Run Tests and e2e were still running and the branch could not be built here.
Reviewer model: claude-opus-5-5
Reasoning effort: 15 (runtime setting of this run)
|
Reran the failed |
Spark drops a deposit from its list while claiming it, so the status screen went back to Processing Payment for a moment before Transfer Successful. A deposit once listed now stays seen. The journey treats Adding To Spending Balance as a step Spark's regtest may skip.
|
5b9cdff: the transfer status screen no longer goes back to "Processing Payment" while Spark claims the deposit. Spark drops a deposit from its list while claiming it, so a deposit it has listed now stays seen. The pair PR's run against Spark's regtest found this (synonymdev/bitkit-android#1901 (comment)). The journey now treats "Adding To Spending Balance" as optional, since Spark's regtest can claim a deposit before that frame shows. |
pwltr
left a comment
There was a problem hiding this comment.
Reviewed 5b9cdff.
- Low — Move the settlement documentation back to its method. In
Bitkit/ViewModels/SparkTransferFlow.swift:398, the comment beginning “Ends the transfer on screen” now attaches toisDepositSeen, although it describesnoteSettled. Move those two lines directly abovenoteSettled.
Review details
Combined review
Model: GPT-6.1 Sol
Reasoning effort: high
@pwltr right, my |
Twin: synonymdev/bitkit-android#1901
Refs: #1270
This PR:
Description
Out of Scope
SettingUpView.swift: the fee keeps the app's money format (₿ 2 134) rather than the frame's₿ 2134.SparkTransferFlow.swift: a relaunch drops the followed claim, its approved fee and a pending fee change, as on master — bug: fast transfer fee prompt gone after relaunch #1320, raised in feat: spark transfer status design #1318 (comment).ActivityLatest.swift: right after a relaunch the transfer banner opens the transfer only once Spark lists the deposit (seconds when online), because the app keeps a broadcast deposit in memory only — part of bug: fast transfer fee prompt gone after relaunch #1320.SettingUpView.swift: the Wait and Approve identifiers staySparkDepositWaitandSparkDepositPay, where Android usesSettingUpWaitandSettingUpPay; Android's journeys README records it.Design
Figma section "Funds In Transfer (spark)" in the Bitkit Wallet file (section):
The fee on Fee Change keeps the app's money format (
₿ 2 134, with the thousands space) where the frame shows₿ 2134.Preview
Figma frame (left) and the app (right), frames 1 and 2:
Frames 3 and 4:
Frames 5 and 6:
After Wait on Fee Change, the last step reads "Using Normal Transfer Speed" with about 30 minutes:
Recordings at 2x: the frames in order with Wait tapped; the Home banner opening the transfer, again after a relaunch; the Savings banner opening a running emergency exit:
ios-flow2x.mp4
ios-banner2x.mp4
ios-exit2x.mp4
QA Notes
Setup
spark-transfer-to-spending.xmlsets up: launched withSPARK_CHAIN_SERVICE_URLset to the regtest's Esplora URL, Savings funded on that chain (at least 20 000 sats, confirmed), no channels.Journeys
spark-transfer-status.xml— the transfer status screen walks the designed frames for an Instant and a Later transfertransfer-banner-opens-progress.xml— the Home transfer banner reopens the transfer at its current step, also after a relaunchManual Tests
Automated Checks
SparkFundingRecoveryTests.swift— every claim state and seen deposit shows its design frame; Wait and Approve keep the last step; "about 30 minutes" only at normal speedSparkTransferFlowTests.swift— the banner opens the followed deposit at its step, reopens a waited deposit at normal speed on the last step and a repriced one with its fee decision after another transfer began, and opens an unfollowed one as added at maturity; a deposit stays seen while Spark claims itEvidence
swiftformat --lintandnode scripts/validate-translations.jspass on 18df7f9;SparkTransferFlowTestsandSparkFundingRecoveryTestspass on 5b9cdff.Gaps
SparkTransferFlowTests.swift. The fee changed, unavailable and "Adding To Spending Balance" frames did not occur on regtest.Models used
claude-opus-5-5(reasoning:medium)claude-opus-5-5(reasoning:medium)claude-sonnet-5-5(reasoning:low)