Skip to content

feat: spark transfer status design - #1318

Merged
ovitrif merged 11 commits into
masterfrom
feat/spark-transfer-status-design
Nov 13, 2026
Merged

ovitrif merged 11 commits into
masterfrom
feat/spark-transfer-status-design

Conversation

@ovitrif

@ovitrif ovitrif commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Twin: synonymdev/bitkit-android#1901
Refs: #1270

This PR:

  1. Updates the Spark "Funds in transfer" screen to the six designed frames
  2. Fixes the Home transfer banner so it opens the pending transfer's progress
  3. Fixes the Savings banner so it opens a running Spark emergency exit

Description

  • Updates the transfer status screen to the "Funds In Transfer (spark)" frames, so each step says what Spark is doing: "Processing Payment" until Spark lists the deposit, then "Payment Successful" (either speed) and "Adding To Spending Balance", ending on "Transfer Successful" with "Awesome!".
  • Adds the "Fast transfer fee changed" frame with "Wait" and "Approve" side by side, so a repriced fast transfer can go on at normal speed: "Wait" shows "Using Normal Transfer Speed" on the last step with "about 30 minutes".
  • Adds the "Fast transfer unavailable" frame, which goes on at normal speed with "Using Normal Transfer Speed".
  • Shows the coins while the fast transfer is in question and the transfer arrows in dashed rings otherwise, held still as in the frames.
  • Fixes the "TRANSFER IN PROGRESS" banner on Home, which now opens that transfer's progress at its current step, keeping each transfer's own step and Approve or Wait over a changed fee when another transfer has started since, also after a relaunch once Spark lists the deposit.
  • Fixes the Savings banner, which now opens the progress of a running Spark emergency exit.
  • Adds the new English strings and drops the removed keys from every locale; the translations of the new keys are tracked in chore: translate spark strings #1270.

Out of Scope

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:

1 Processing Payment 2 Payment Successful

Frames 3 and 4:

3 Fee Change 4 Fast Transfer unavailable

Frames 5 and 6:

5 Adding To Spending Balance 6 Transfer Successful

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:

Status frames Transfer banner Savings banner
ios-flow2x.mp4
ios-banner2x.mp4
ios-exit2x.mp4

QA Notes

Setup

  • Debug build (regtest) with Spark connected and reading Bitkit's chain, as spark-transfer-to-spending.xml sets up: launched with SPARK_CHAIN_SERVICE_URL set to the regtest's Esplora URL, Savings funded on that chain (at least 20 000 sats, confirmed), no channels.
  • Home needs at least one activity to show the transfer banner.

Journeys

  • J1: new spark-transfer-status.xml — the transfer status screen walks the designed frames for an Instant and a Later transfer
  • J2: new transfer-banner-opens-progress.xml — the Home transfer banner reopens the transfer at its current step, also after a relaunch

Manual Tests

  • 1. Start a Spark emergency exit (Settings → Advanced → Lightning Connections → Spark → Emergency exit, swipe) → Home → tap the Savings banner → Exit in progress opens — a running emergency exit, which holds the Spark balance for days, not in Capabilities

Automated Checks

  • updated 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 speed
  • updated SparkTransferFlowTests.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 it

Evidence

  • ff812aa (before the reopen fix, which changes no frame) on a Debug build, iPhone 17 Pro simulator, with a local debug hook staging each claim state, the pending deposit and the running exit (not part of this PR):
    • all six frames and the Wait state match the Figma frames side by side (Preview);
    • J2's banner steps: the banner opens "Payment Successful" with "about 30 minutes", also after a relaunch;
    • case 1: the Savings banner opens "Exit in progress".
  • The unit suite (the CI selection), swiftformat --lint and node scripts/validate-translations.js pass on 18df7f9; SparkTransferFlowTests and SparkFundingRecoveryTests pass on 5b9cdff.

Gaps

  • J1 and J2 were not run end to end on iOS against Spark's regtest; the states were staged with the debug hook above. The pair PR's Android run there (feat: spark transfer status design bitkit-android#1901) found the step label going back to "Processing Payment" while Spark claimed the deposit; 5b9cdff fixes the same logic here, covered by SparkTransferFlowTests.swift. The fee changed, unavailable and "Adding To Spending Balance" frames did not occur on regtest.

Models used

  • Planning/scoping: claude-opus-5-5 (reasoning: medium)
  • Implementation: claude-opus-5-5 (reasoning: medium)
  • Review: claude-sonnet-5-5 (reasoning: low)

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.
@ovitrif ovitrif self-assigned this Nov 12, 2026
@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-12T18:19:06.352801Z 18df7f9 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect two bounded Spark progress workflows in the wallet app.

Restore unresolved fee choices when reopening a transfer before merging.

Findings

  1. P1 Restart loses fee approval ▶
  2. P2 Journey asks for unavailable navigation ▶

Summary

Updates Spark transfer progress with the designed stages, fee-change choices, and success screen.

  • The Spark transfer screen shows each step from payment to success.
  • Home banners open the progress for a pending Spark transfer or exit.

Intentional scope recorded from ovitrif: new translations are deferred to #1270; spaced fee formatting stays unchanged; multiple pending transfers open the first unclaimed deposit; the Wait and Approve identifiers remain SparkDepositWait and SparkDepositPay.

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]
Loading

Reviews (1) · Last reviewed commit: "chore: add changelog fragment" · Reviewed by Greptile

@ovitrif ovitrif added this to the 3.2.0 milestone Nov 12, 2026
@ovitrif

ovitrif commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

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 talosmachina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: showDeposit returns early for the txid already on screen, so its Approve or Wait choice survives the reopen.
  • A stale poll writing over the reopened deposit: setClaimState drops results for any txid other than the one on screen.
  • Banner tapped before Spark lists the deposit: inProgressTxid reads SparkManager.deposits, which already holds the broadcast deposit with isListed: 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)

@ovitrif
ovitrif requested review from a team, ben-kaufman and pwltr and removed request for a team November 12, 2026 18:50
@ovitrif

ovitrif commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Reran the failed build-local and e2e-status jobs on 31171cf: master advanced while the run checked out, so its merge-checkout guard stopped before building. No code change.

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.
@ovitrif

ovitrif commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

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 pwltr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to isDepositSeen, although it describes noteSettled. Move those two lines directly above noteSettled.
Review details

Combined review
Model: GPT-6.1 Sol
Reasoning effort: high

@ovitrif

ovitrif commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

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 to isDepositSeen, although it describes noteSettled.

@pwltr right, my isDepositSeen addition split that doc from noteSettled. A push now would void your approval, so the move goes into the next Spark PR on iOS.

@ovitrif

ovitrif commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Merging: approved by @pwltr on the head (5b9cdff), CI green, no conflicts. The doc-comment Low moves in the next Spark PR on iOS.

@ovitrif
ovitrif merged commit b35611a into master Nov 13, 2026
21 checks passed
@ovitrif
ovitrif deleted the feat/spark-transfer-status-design branch November 13, 2026 15:38
@ovitrif ovitrif mentioned this pull request Nov 17, 2026
29 of 32 tasks
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