Repository navigation
feat: spark transfer to spending design - #1963
Conversation
Verified: just format, compile, test, lint; journeys on a regtest emulator
Verified: none (journey text only; the journey passed on bcaede8 with this setup)
Verified: none (changelog only)
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: c34aec318f
ℹ️ 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 the Spark transfer-to-spending flow. The PR appears safe to merge, with a non-blocking amount-editing issue worth fixing. Findings
SummaryUpdates the transfer-to-spending screens with a shared fee grid, currency switching, revised speed choices, and new Spark explanations.
Reviews (1) · Last reviewed commit: "docs: describe how to stop spark for the..." · Reviewed by Greptile |
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Moves the transfer to spending Review, HW sign and signed screens to the v64 fee grid (tap to switch units) with Fast/Normal speed rows, rewrites Learn More for Spark, pins the number pad under a fixed 32 dp Available row, and reorders the funding options. Reviewed 67118fa, full tier, static: per the repo track's rule the Android branch is not built on this box, so this rests on the code and on CI.
What I checked, and 5 candidates I ruled out
Read in full: SpendingAmountScreen.kt, SpendingConfirmScreen.kt, SpendingHwSignScreen.kt, SpendingHwSignedScreen.kt, TransferLearnMoreScreen.kt, FundingScreen.kt, FeeInfo.kt, AmountInputViewModel.kt, the RootNavHost transfer routes in ContentView.kt
Contracts traced: every removed string key (spending_confirm__about, __spending_fee, __later_text, spending_learn_more__text, transfer_intro__text) has no remaining reference in app/src; lightning__spark_trust is still used by SparkDetailScreen. The removed test tags (SpendingConfirmSpendingFee, HardwareTransferSignLearnMore, TransferLearnMoreBalance) appear nowhere in synonymdev/bitkit-e2e-tests; the tags it does use here (SpendingConfirmMore, FundManual) are kept.
CI at review time: build-and-test, build-local, detekt and lint green; compose-ui and the e2e-tests-local shards still pending.
Ruled out
- Unit re-sync on the amount screen:
LaunchedEffect(currencies.primaryDisplay)also runs each time the screen comes back from Review, not only after a switch. It callssetSatswith the same sats, so the worst case is reformatted text (e.g. classic0.0005shown as0.00050000), the same thing Quarter, Max and the unit button already do. No amount changes. - Double update with the in-screen unit button:
switchUnitwrites the text afteramountInputHandler.switchUnit, and the effect then writes the same text from the same sats. Both are idempotent. AvailableRowLayouton very short screens: whenroomis smaller than four 40 dp pad rows,gap.coerceAtMost(room - pad.height)can go negative and the Available row would overlap the amount. That only happens below the 640 dp height thatSpendingAmountScreenTestpins, so this is a narrow rule-out, not a reachable bug on supported sizes.Contentoverloads in thehardwarepackage:SpendingHwSignedScreen.Contentis nowinternalnext to the file-privateContentinSpendingHwSignScreen.kt, both callable with onlystate. CI's compile resolves them, so there's no ambiguity.- Funding options: the Spark branch keeps
onHardware.takeIf { canFundOnChain }(the oldcanFundWithSpark &&is implied by the branch), and the non-Spark branch keeps HW disabled. Manual setup is reachable on both branches.
Merge confidence: 4/5. No findings, but compose-ui and e2e were still running and the branch was not built here.
Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed (the session does not surface the setting to the reviewer)
Verified: just format, just compile, just test, just lint
Verified: none (journey text only)
Verified: just compile, just lint
Verified: just format, just compile, just test, just lint
|
Pushed dab6978: the hardware sign screen now draws the frame's angled Trezor running behind the sign button, and cuts the deposit address at its end. Fresh screenshots follow. |
Verified: just format, compile, test, lint
|
Pushed f4053fb: the hardware wallet Review & Sign screen now turns off the font's contextual alternates for the deposit address, so an |
jvsena42
left a comment
There was a problem hiding this comment.
Code scan at f4053fb: no HIGH or MEDIUM. One LOW (design) is inline.
What I checked:
- Total debit. The shown total is
quote.totalSats= amount + network fee, the on-chain debit. The service fee and To spending both come fromquote.claimFeeSats(state.speed), so the grid and the selected row agree. - Speed and fee. A speed change requotes, the swipe is off while quoting, and
onConfirmre-prices and asks for another swipe on any increase.send()passesapprovedMiningFeeSats = quote.networkFeeSats. - Unit switch. The resync on Review (
SpendingAmountScreen.kt:192-198) goes throughsetSats, which keeps the sats, so switching units doesn't change the amount, Max included. - Hardware signing. The shown address is the
HwSendRequestaddress. Back stays blocked while signing or while a broadcast is unresolved, and a secondsignAndBroadcastis refused. Removing Learn More also removes a route that disposed the screen mid-flow. - States. None dropped: offline, quote error, not covered, below claim fee, No Bitkit Savings, sync view, and the Spark-unavailable Funding branch are all kept.
- Journeys and tags. The six updated journeys match the head, and the removed tags have no references left.
- Figma. Review, Review & Sign, Learn More and Fund Spending Balance match in copy, order, the max/est captions, selection and the truncated address. The only delta is the spacing inline.
- Journey parity with synonymdev/bitkit-ios#1357. The confirm-screen actions now match word for word. Android adds four actions iOS also implements but its journey doesn't check: no
FundLearnMorewhen Spark is usable, "still shows Normal selected", the amount-unit carry-over steps, and the ellipsis and angled Trezor wording inhardware-wallet/transfer-to-spending.xml. Porting those to the iOS files keeps the specs diffable; nothing changes here.
perf: not relevant.
Device gate (partial): f4053fb — not run yet; pending: transfer/spark-transfer-to-spending.xml, transfer/spark-transfer-status.xml, transfer/transfer-banner-opens-progress.xml, transfer/transfer-unavailable-sheet.xml and hardware-wallet/transfer-to-spending.xml (Trezor emulator) on the Spark regtest stack, with the Figma screens on the device. Device results and the final review type follow in a second review.
Fee grid 32 below the title, 10 between rows and 10 above the speed rows, as the Review & Sign frame draws it. Verified: just format, compile, test, lint
|
Device gate (partial):
Still running: |
jvsena42
left a comment
There was a problem hiding this comment.
Device results so far at db88d41: one l10n LOW inline, nothing above LOW. Earlier results are in #1963 (comment).
hardware-wallet/transfer-to-spending.xml, on the Trezor emulator through Bridge: pass. The sign screen shows network ₿ 459, service ₿ 1 891, to spending ₿ 795 464 and total ₿ 797 814. The address is on one line with an ellipsis, and the angled Trezor sits behind the button. The device prompted for recipient, amount, locktime and a summary of 0.00797814 including the 0.00000459 fee. After that the flow went to Processing Payment, and a −797 814 Transfer row appeared with To Spending in its detail.- Not observed: the "Transaction Signed" step. It moved on within the 2 s polling gap.
- Precondition not met: the "older blue hardware received row" step. The hardware wallet's received rows were older than the recent list.
- Review & Sign spacing at
db88d41. Measured from uiautomator bounds: title to first label 32 dp, row gap 10 dp, address row to Fast row 10 dp. That matches 51990:155518, so my earlier LOW is fixed on the device. - l10n. pt-BR fits on Review, Sign, Learn More, Funding and Amount. de fits except the headline inline. "TRANSFER SPEED" and two Funding titles are untranslated in de, but those keys predate this PR.
Still pending: transfer/transfer-unavailable-sheet.xml, and the banner relaunch step, which needs a chain that waits for confirmations. The final review type follows.
jvsena42
left a comment
There was a problem hiding this comment.
Approving at db88d41: nothing above LOW from the code scan or the device gate. The spacing LOW is fixed and measured on the device. The approval stands with one LOW open, the German Learn More headline. Fix it here or in a follow-up issue, your choice, and reply on the thread saying which.
Device gate: db88d41 — Pixel_9 emulator (Android 17), local Spark stack (bitkit-docker spark profile), Trezor emulator through Bridge for the hardware journey.
- journeys:
transfer/spark-transfer-to-spending.xml14/14.transfer/spark-transfer-status.xmlpassed. One Normal attempt hit an Electrum sync timeout under host load, and the retry passed.transfer/transfer-unavailable-sheet.xml11/11, with Spark broken: every entry shows the sheet, both links open, and Manual Setup is the only enabled option.hardware-wallet/transfer-to-spending.xmlpassed, including the Trezor prompts for recipient, amount, locktime and summary, and the −797 814 Transfer row.transfer/transfer-banner-opens-progress.xml7 of 8.
- Review & Sign spacing matches 51990:155518 on the device: title to grid 32 dp, row gaps 10 dp, address row to Fast row 10 dp.
- perf: not relevant.
- Figma: Review, Review & Sign, Learn More and Funding match.
- l10n: de and pt-BR, 1 overflow (inline).
transfer-banner-opens-progress.xmlaction 7, the relaunch. The local stack claims a Normal deposit at 0 confirmations within seconds, and pausing the operators to hold it open also stalled Spark's sync after the relaunch. It needs a chain that waits for confirmations.- The "Transaction Signed" step of the hardware journey. It moved on before it could be captured.
Skipped — covered by CI atdb88d41: unit tests, compose UI tests, detekt, lint, e2e.
Verified: just format, compile, test, lint
Merges master; the screens map keeps both PRs' rows. Verified: just format, compile, test, lint
ben-kaufman
left a comment
There was a problem hiding this comment.
Jarvis reviewed Spark Transfer to Spending and hardware confirmation at 357f06e8, including the German Learn More copy fix and the merge from 847d6de5. No material findings.
GitHub shows 17 passing checks, including the required E2E gate, and six skipped. The Trezor emulator signing evidence is from db88d415. Current-head rendering and end-to-end hardware deposit settlement remain unverified.
Reviewer model: gpt-6.1-sol
Reasoning effort: xhigh
|
Merging: approved on 357f06e with all required checks green and no open threads. |
Twin: synonymdev/bitkit-ios#1357
Refs: #1840
Description
Out of Scope
TransferLearnMoreScreen.kt: the heading reads "Later" while the speed row reads "Normal", as in the frames.Design
Figma page "Bitkit - Progress v64" in the Bitkit Wallet file:
Preview
Recordings at 2x
j1-spark-transfer-to-spending2x.mp4
j2b-spark-transfer-status2x.mp4
j6-hw-db88-2x.mp4
r12x.mp4
r22x.mp4
r32x.mp4
Figma notes
Every note above the v64 frames for these flows, with what this PR does about it.
Changelog v64
Transfer to Spending Balance From Savings (Spark)
Transfer to Spending Balance From HW Device (spark)
Funds In Transfer (spark)
Lightning Onboarding From Suggestion Card
Savings, Spending, Hardware, USDT Balances
Transaction Transfer Details
Manual Lightning Setup
QA Notes
Setup
ESPLORA_URL=http://10.0.2.2:3999(add--no-build-cacheif a cachedBuildConfigdrops it), withpython3 scripts/spark-regtest-esplora.py --port 3999running on the emulator's host.SparkDepositAddress), then moved to Savings with Transfer to Savings../lsp), since the hardware wallet does not sync overESPLORA_URL.Journeys
spark-transfer-to-spending.xml— fee grid, Fast and Normal, currency toggle and a unit switched elsewhere, Learn More, funding options — passed on the branch beforebcaede84dspark-transfer-status.xml— Fast and Normal transfers through to the spending balance — passed on the branch beforebcaede84dtransfer-banner-opens-progress.xml— the banner reopens the transfer at its step, also after a relaunch — passed onbcaede84dtransfer-unavailable-sheet.xml— with Spark down, the funding options and the Manual Setup route — passed onbcaede84dexternal-amount-over-max.xml— the over-max toast and cap, entered from "Add Connection" — passed onbcaede84dtransfer-to-spending.xml(hardware wallet) — sign screen with the fee grid, deposit address and speed rows, then signing on the Bridge emulator — passed ondb88d415frestore-keeps-tags-and-closed-channels.xmlandnon-cjit-channel-no-payment-notification.xmlonly change the "Manual setup" label they name; J4 checks that label.Automated Checks
SpendingAmountScreenTest.kt— available row gap, small screens, a unit switched on another screen, the typed amount kept on returnSpendingFeeGridTest.kt,SpendingSpeedRowsTest.kt— fee grid, speed rows, no fee without a quoteSpendingHwSignedScreenTest.kt— the check 32 dp under the grid, the grid not clickableFundingScreenTest.kt— option order and labelsEvidence
On regtest emulators (Android 16, 896×1994 at 320 dpi), dev builds of this branch with the Spark regtest Esplora proxy:
57e42119ewith the local Spark stack, which its recording and stills show; later commits change only the hardware wallet sign screen.db88d415f.bcaede84d, returning to the amount screen redraws the amount only when the unit changed (6a90e63), covered bySpendingAmountScreenTest.kt.Gaps
Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium),Claude Sonnet 5.5(reasoning:high)Claude Sonnet 5.5(reasoning:high),Claude Opus 5.5(reasoning:medium)