Repository navigation
fix: match force transfer pay and completed screens to frames - #1362
Conversation
Pay to confirm starts the force transfer on its own as soon as a read finds the fees covered, on entry too, as in the frame without Continue. A failed start shows Try again and never retries by itself; a running start spins the button. Verified: swiftformat --lint, validate-translations, SparkExitMath, Sweep, Record, Review and Driver unit tests on the iOS simulator
The done text drops the small amounts left on Spark, and a completed exit names only leftover fee funding that stays at the address: what a sweep sent back is in the returned note. Verified: swiftformat --lint, validate-translations, SparkExitMath, Sweep, Record, Review and Driver unit tests on the iOS simulator
A done force transfer hides leftover lines only for confirmed sweeps the returned note counts as unused fees. A sweep still sending, or one the note cannot count, keeps its line and transaction link. Verified: swiftformat --lint
The intro's title and text sat 32 pt in, inside both the screen's and the text block's padding; they now share the button's 16 pt inset. Verified: swiftformat --lint
Verified: none (changelog only)
[Medium impact] The main behavior change is limited to the Spark force-transfer funding flow. Restore a clear partial-transfer warning before merging so users are not told that unrecovered funds were transferred. Findings
SummaryUpdates the force-transfer payment and completion screens, and aligns the savings introduction text with its button.
Reviews (1) · Last reviewed commit: "fix: inset transfer to savings intro tex..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3eaf6c87d
ℹ️ 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".
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.
No findings. Pay to confirm now starts the force transfer by itself once a read this visit finds the fees covered (on entry too), with Try again and a spinner in place of Continue; the completed screen drops the skipped-leaves line and the leftover notes the returned paragraph already counts; the Savings intro text moves to 16 pt. Reviewed b81eaf8, full tier, static: iOS does not build on this host, so nothing was built or run here.
What I checked, and 6 candidates I ruled out
Read in full: SparkExitPayView, SparkExitLeftoverStatus, SparkExitProgressView (text, returnedText, the new isReturnedFeesShown), SparkExitMath.returned / sweptLeftoverSats / canAutoStartFunding, SparkExitManager.watchFundingAddress / readFundingAddress / useQuote, SparkExitRecord.leftoverLine, OnboardingView.
Call sites traced: canAutoStartFunding (one view, one test), buttonHorizontalPadding / contentHorizontalPadding (only SavingsIntroView passes it; the other 18 OnboardingView callers take the default 16, so their layout is unchanged), lightning__spark_exit__partial_text (no reader left, removed from every locale).
CI: SwiftFormat, validate and detect-changes green; Run Tests, Run Integration Tests and build-local still pending when this was written.
Ruled out
- Auto-start on a stale reading:
hasReadFundingis reset in.taskand set only byonRead, whichwatchFundingAddresscalls only after a successful read, sofundingSeenSatsleft over from the Funding screen cannot start it before this visit reads the address. - A missed start:
canAutoStartis false at appearance (hasReadFundingfalse), soonChangealways sees the false-to-true edge. - Double start:
start()guards onisStarting, andhasAutoStartedis set beforestart()in the auto path, socanAutoStartdrops at once. - Try again missing after a failure: every throwing path of
startSparkExitleavesisStartingfalse withhasAutoStartedtrue, andisFundedstill holds, so the button shows; a cancelled start lands in the same state. - Unused-fees notes hidden while the returned note does not name them:
isReturnedFeesShownuses the samespendingSats > 0 && feesSats > 0test asreturnedText, andfeesSatsincludessweptLeftoverSats(earlier sweeps plus the confirmed one), so a hidden.sweptor earlier-sweep line is always counted in the paragraph; failed and cancelled exits keep every line sincereturnedis nil outside.done. - Funds on Spark no longer mentioned:
skippedLeafCountcounts leaves the build never took into the exit, which stay in the Spark balance; leaves the exit gave up on still show throughSparkExitLeftBehind. Dropping the line follows the linked frame.
Merge confidence: 4/5, no findings, but the unit and integration runs were still pending and the view changes were reviewed without a build.
Spark stays connected through a force transfer, so its connection screen read a green "Connection open" while App Status showed the transfer in yellow. The screen now shows the same yellow status and wording as App Status's Spark row. Verified: swiftformat --lint, AppStatusExitTests, AppStatusHelperTests, SparkExitMathTests on the iPhone 17 Pro simulator
ben-kaufman
left a comment
There was a problem hiding this comment.
Reviewed the force-transfer payment, progress and completion screens, including the text shared with App Status. The required unit, integration, lint and E2E checks passed on GitHub.
An irreversible force transfer and the Spark connection screen during an active transfer remain unverified by this review.
Reviewer model: gpt-6.1-sol
Reasoning effort: xhigh
|
Merging: approved at the current head, all required checks green, no open threads. |
Twin: synonymdev/bitkit-android#1960
Refs: #1361
Description
lightning__spark_exit__partial_textstring from every locale.Out of Scope
journeys/transfer/spark-emergency-exit.xml: unchanged, it stops before Pay to confirm starts anything.Design
Figma page "Bitkit - Progress v64" in the Bitkit Wallet file:
Preview
The starting, failed and completed states were captured on a local build that reports funded fees, a start that runs or fails, and a finished transfer with small amounts left on Spark and a confirmed leftover sweep, since a real force transfer cannot be cancelled.
J1, Pay to confirm with the fees already there: it starts on its own, fails, and Try Again starts it again (2x):
j1.mp4
QA Notes
Journeys
N/A
Manual Tests
Automated Checks
swiftformat --lint,node scripts/validate-translations.js,SparkExitMathTests,SparkExitSweepTests,SparkExitRecordTests,SparkExitReviewTests,SparkExitDriverTests,AppStatusExitTests,AppStatusHelperTests(pass)SparkExitMathTests— Pay to confirm starts on its own once a read finds the fees covered, on entry included, once a visit, never while a start runsAppStatusExitTests— the Spark row's force transfer wording, shared by App Status and Spark's connection screenEvidence
Gaps
SparkExitMathTestscover the start rule andSparkExitDriverTeststhe start itself.AppStatusExitTestscover its wording.j1.mp4
Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)