Repository navigation
Conversation
Verified: none (unit suite running on the simulator)
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. |
Verified: none (changelog text only)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2f38ad35e
ℹ️ 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".
| .onChange(of: resetCount) { | ||
| if isSubmitting { | ||
| reset() | ||
| } | ||
| } |
There was a problem hiding this comment.
Add the required changelog fragment for the retry fix
This user-facing fix: restores payment retries, but the commit adds no changelog fragment. I checked the changed-file list and searched changelog.d/; the existing 1418.fixed.md describes locking confirmation during payment, not restoring the swipe after failure. Add one <issue-or-pr>.fixed.md fragment under changelog.d/next/ so release automation includes this fix in the release notes, as required by AGENTS.md.
AGENTS.md reference: AGENTS.md:L625-L628
Useful? React with 👍 / 👎.
[Medium impact] The change affects retry behavior in two payment confirmation flows. The PR appears safe to merge, with a non-blocking gap in the regression test. Findings
SummaryRestores the confirmation swipe after a failed send.
No blocking behavior issue was found. The new test checks the counter but does not cover the button reset itself. Reviews (1) · Last reviewed commit: "fix: let confirm take a swipe after a fa..." · Reviewed by Greptile |
| @MainActor | ||
| func testReturningToConfirmWithNothingRunningResetsTheSwipe() { | ||
| let lock = ConfirmSwipeLock() | ||
| lock.setVisible(true) | ||
| let shown = lock.idleReturns | ||
|
|
||
| lock.begin() | ||
| lock.setVisible(false) | ||
| lock.setVisible(true) | ||
| XCTAssertEqual(lock.idleReturns, shown, "A swipe still running keeps its knob") | ||
| lock.setVisible(false) | ||
| lock.end() | ||
| lock.setSubmittingPayment(true) | ||
| lock.setVisible(true) | ||
| XCTAssertEqual(lock.idleReturns, shown, "A payment still running keeps its knob") | ||
| lock.setVisible(false) | ||
| lock.setSubmittingPayment(false) | ||
|
|
||
| lock.setVisible(true) | ||
| XCTAssertEqual(lock.idleReturns, shown + 1, "Try again or Back after a failed payment takes a new swipe") | ||
| lock.setVisible(false) | ||
| } |
There was a problem hiding this comment.
The new test checks idleReturns, but never checks whether SwipeButton resets. It would still pass if the resetCount handler or either screen's connection to it were removed.
Add a test that submits a swipe, lets its action return without throwing, changes resetCount, and checks that another swipe runs the action. Also check that an untouched button stays unchanged.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
pwltr
left a comment
There was a problem hiding this comment.
Reviewed 48b535e.
Medium candidate: The reset in Bitkit/Views/Wallets/Send/LnurlPayConfirm.swift:215 can make Try again payable while the first Spark payment's outcome is still unknown. If Spark reports an error after dispatch, the manual LNURL flow can show Payment Failed and return to the same confirmation with the slider enabled. The next swipe fetches a fresh invoice at Bitkit/Views/Wallets/Send/LnurlPayConfirm.swift:389. If it has a different payment hash, the first invoice's duplicate-payment guard does not apply, and both invoices could settle. Keep the original invoice pending after an ambiguous submission, and fetch a replacement only after the original is known to have failed.
Review details
Quick review
Model: Claude Opus 5.5
Reasoning effort: high
General review
Model: GPT-6.2 Sol
Reasoning effort: high
Combined review
Model: GPT-6.2 Sol
Reasoning effort: high
Companion: synonymdev/bitkit-android#2017 (its failed-send fix; its iOS twin is #1418)
After a failed send, Try again brought back the confirm screen with its swipe still spinning, and every new swipe was ignored, so the payment could not be retried from there (also on
master). The swipe only reset when its action threw, and a failed payment moves on to the failure screen without throwing. This PR resets the swipe whenever the confirm screen comes back with no swipe or payment running.Description
ConfirmSwipeLockcounts each return to the confirm screen while nothing runs for it, andSwipeButtontakes that count asresetCount: a change puts a submitted knob back at the start and accepts a new swipe.Out of Scope
None.
Design
N/A — no UI changes.
Preview
Try again after a failed payment from a link-opened invoice, at 2x: the knob is back at the start and a second swipe sends again.
flow-link2x.mp4
QA Notes
Setup
Debug build on a regtest simulator with Spark connected (Capabilities in
journeys/README.md), QuickPay off, and a wallet funded with about 100 000 sats. A local LND node issues hold invoices (lncli addholdinvoice) and cancels them (lncli cancelinvoice) to make the payment fail after the swipe.Journeys
N/A — not drivable; see Manual Tests.
Manual Tests
A payment that fails after the swipe needs a hold invoice cancelled while it is in flight, which the Capabilities table does not list.
lightning:link, swipe, cancel the invoice, then tap Try again on Payment Failed. The knob is back at the start and a second swipe sends the payment again.Automated Checks
SendConfirmationSwipeTests.swift: returning to confirm with nothing running resets the swipe, and a running swipe or payment keeps itEvidence
Sent Spark paymentafter Try again and the new swipe. Onmasterthe same steps leave the knob spinning, with no send logged after Try again.Gaps
None.
Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium),Claude Sonnet 5.5(reasoning:high)gemini-4-neon-high(reasoning:Not exposed)Metadata note: the review ran through Gemini Neon's CLI, whose record names the model but not a reasoning setting.