Repository navigation
Conversation
Later toasts wait behind it instead of replacing it while it shows, and a second identical one from another restored swap is not queued again. Verified: just compile, just test, just lint
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. |
[Medium impact] The PR appears safe to merge. SummaryThe returned-payment notice now stays until the user closes it. Later toasts wait behind it.
No actionable issues found. Review was based on source inspection; automated tests and Android device cases were not run. Queue overflow was explicitly acknowledged as out of scope by Reviews (1) · Last reviewed commit: "fix: keep the returned-payment toast unt..." · 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. The restored-swap "Payment returned to Savings" toast is sent with interruptible = false, so later toasts wait behind it, and ToastQueueManager.enqueue drops a non-interruptible toast that is already on screen or queued. Reviewed e216d9e, full tier, static: per the repository's Android review practice the branch was not built here, so this rests on the code and on CI.
What I checked, and 4 candidates I ruled out
Read in full: ToastQueueManager.kt, ToastEventBus.kt, Toast.kt, the swap-restore block in WalletViewModel.kt, both test files; traced every toastManager.enqueue, dismiss and hideToast caller in AppViewModel.kt and MainActivity.kt.
CI: build-and-test, build-local, lint and detekt green; the e2e-tests-local jobs and compose-ui were still running when I read them.
Ruled out
- Manual test 2's progress toast stays: with the notice shown, "Applying changes" (
replacedByNext) is queued, then the result toast removes it from the queue inenqueue, so closing the notice shows the result and no stale progress toast. - The Pubky auth wait toast gets stuck: it is a loading toast, kept at the queue's tail while the notice is shown, and
dismiss(waitToast)removes it from the queue by identity, so it never surfaces after the wait ends. - The dedupe swallows a different toast: it compares by data-class equality and only for non-interruptible toasts, so it only applies to an identical copy. The one other non-interruptible sender,
showPaykitUpdatePrompt, now shows once instead of twice when sent while it is on screen, which is harmless. - The flow test sees other toasts: the
WalletViewModelTestcase subscribes beforerestoreWalletand Turbine fails on any unconsumed event, so a passing run means the restore emits exactly this one toast.
Merge confidence: 4/5, reviewed without a build, device cases 1 and 2 not run, and the e2e jobs had not finished.
Reviewer model: Claude Opus 5.5
Reasoning effort: low
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at e216d9e.
1 actionable finding — resolve or provide an evidence-backed rebuttal.
The restored-swap notice now stays up until it is closed. If Wi-Fi is turned off and back on while it is open, closing it still plays the queued "Internet Connectivity Issues" toast before "Internet Connection Restored", so the next status is not the current one from #2030 and manual case 4 of #2023. The address-type result still replaces its queued "Applying changes" toast behind the notice.
Compared with bitkit-ios at 325b4099: a non-interruptible toast keeps only the latest queued toast. The iOS restored-swap notice itself still auto-hides and remains interruptible.
Device testing was not performed. The unit tests were read and not executed. The author reports just compile, just test, and just lint passed at this head; manual cases 1 and 2 were not run.
Suggested additional test cases
Android, same regtest restore as manual case 1. With "Payment returned to Savings" visible, turn Wi-Fi off and back on, then close the notice. "Internet Connection Restored" shows, and "Internet Connectivity Issues" does not.
Findings
- [MEDIUM] Show the restored connection after the payment notice — inline at
app/src/main/java/to/bitkit/viewmodels/WalletViewModel.kt:609.
Reviewer model: grok-4.7
Reasoning effort: xhigh
Verified: just compile, just test, just lint
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since e216d9e, including the connectivity toasts queued behind the payment notice, at 93a062a. Baseline: previous review.
1 actionable finding — resolve or provide an evidence-backed rebuttal.
A single disconnect followed by a reconnect, while "Payment returned to Savings" stays open, still surfaces "Internet Connection Restored". The waiting disconnect warning is also removed when any later toast arrives, so the status after the notice can be that restored toast while the device is offline again, or no connectivity warning while it is still offline.
Device testing: not performed in this review. ToastQueueManagerTest was inspected and not run.
The iOS connection-toast queue was not compared. Code search on synonymdev/bitkit-ios at 325b4099d1b1ad8025cfbfd03a5908fb5a99399f returned the localized connection strings only.
Suggested additional test cases
- Android unit (
ToastQueueManagerTest): with a non-interruptible toast showing, enqueue the disconnect warning (replacedByNext), the restored toast, then a second disconnect warning, and dismiss the current toast. The warning is the toast that appears. - Android, restored in-flight swap from manual test 1: leave the payment notice open, turn Wi-Fi off, change the address type, leave Wi-Fi off, and close the notice. The offline warning appears for that disconnect.
- Android, same setup: turn Wi-Fi off, on, and off again, then close the payment notice. "Internet Connectivity Issues" is the connectivity toast that appears.
Earlier findings reconciled at this revision: 1 verified fixed.
Findings
- [MEDIUM] Show the current connection status after the payment notice — inline at
app/src/main/java/to/bitkit/ui/components/IsOnlineTracker.kt:46.
Reviewer model: grok-4.7
Reasoning effort: xhigh
| title = resources.getString(R.string.other__connection_issue), | ||
| description = resources.getString(R.string.other__connection_issue_explain), | ||
| // A warning still waiting behind another toast is out of date once the connection is back. | ||
| replacedByNext = true, |
There was a problem hiding this comment.
[MEDIUM] Show the current connection status after the payment notice
With "Payment returned to Savings" still open, the device goes offline and "Internet Connectivity Issues" waits behind that notice. Before the notice is closed, either another toast is enqueued while the device stays offline (for example the address-type result) or the device reconnects and then disconnects again.
The disconnect toast is sent with replacedByNext = true (IsOnlineTracker.kt line 46), and AppViewModel.toast copies that onto the queued toast (line 9368). ToastQueueManager.enqueue removes every queued non-loading toast with that flag when any later toast arrives (ToastQueueManager.kt line 52). The reconnect toast does not set the flag (IsOnlineTracker.kt lines 33–37), so a later disconnect is queued behind "Internet Connection Restored". After disconnect, reconnect, and disconnect, that restored toast is first. After disconnect and then a non-connectivity toast, the warning is gone.
Closing the payment notice then shows "Internet Connection Restored" ("Bitkit successfully reconnected to the Internet.") for the default 3 seconds while the device is offline, or it skips the connectivity warning while the device is still offline. Issue #2030 asks for the current connection status after the notice is closed. One disconnect followed by one reconnect still shows the restored toast, which is manual test 1.
Replace a queued connectivity toast when a newer connectivity status arrives, and show that latest status after the payment notice.
Source analysis at 93a062a82cef8927c8a7dc3241da94724c2c0269. This sequence was not executed. ToastQueueManagerTest covers the warning followed by one successor, and that successor is what remains. No separate issue matches this mechanism.
Closes #2030
Description
Out of Scope
ToastQueueManager: a full queue still drops its oldest item, whatever its kind; unchanged from master.Design
N/A — no UI changes.
Preview
N/A
QA Notes
Setup
Local regtest with a swaps-enabled build, as in #2030: fund Spending through a Lightning channel, pay an on-chain-only Paykit contact with Pubky Swaps, force-stop Bitkit before the claim, then restore the wallet in a clean install.
Journeys
N/A — not drivable; see Manual Tests.
Manual Tests
Automated Checks
ToastQueueManagerTest.kt— later toasts wait until a shown toast that is not interruptible is dismissed, and a waiting offline warning is replaced by the newer toast; one that is sent twice shows onceWalletViewModelTest.kt— the restored-swap notice is sent sticky and not interruptibleEvidence
just compile,just testandjust lintpass at this head. Device cases not run.Gaps
Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)gemini-4-neon-high(reasoning:high)