Repository navigation
fix: skip the limit reached notification while bitkit is open - #1716
Conversation
Codex Review SummaryThis 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: aa96c17fb8
ℹ️ 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".
[Low impact] The PR appears safe to merge; no actionable issues were found. SummarySkips the “Limit Reached” notification and fallback toast while Bitkit has a current activity.
Review checks were code-only; no build or device tests were run. Reviews (1) · Last reviewed commit: "fix: skip the limit reached notification..." · 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. Skips the allowance "Limit Reached" system notification while an activity is in the foreground, where the Payment Request sheet opens for the same request. Reviewed aa96c17, full tier, static: on the Bitkit track an unasked review does not build the branch, so this is reasoned from the code and CI.
What I checked, and 4 candidates I ruled out
Read: AppViewModel.kt (allowance event handling, processAllowanceRequests, presentNextIncomingPaykitPaymentRequest, isPaymentRequestPresentationBlocked), PaykitAllowanceExecutor.kt (autoPay, classifyAboveLimit, notifyLimitReached), PaykitAllowanceRepo.kt (processIncomingRequests, isAutomaticallyHandling), App.kt (CurrentActivity), PaykitSubscriptionNotificationWorker.
CI: compile, lint, detekt and 4 e2e groups green. e2e-tests-local - onboarding_backup_numberpad is red, and the same group failed on two unrelated branches today (fix/pending-wallet-restore-admission, fix/blocktank-fee-cache), so I did not tie it to this diff. onchain_boost_receive_widgets was still running.
Ruled out
- Over-limit request never surfaces in the foreground: every
LimitReachedemit sits on a path that returnsMANUAL(or marks the request manual inmarkAboveLimitManual), which setsmanualRequestSignatures, soisAutomaticallyHandlingturns false and the refresh'spresentNextIncomingPaykitPaymentRequest()presents it. - Foreground behind the PIN screen: presentation is blocked until
_isAuthenticated, and the request stays pending, so the sheet opens after unlock; nothing is lost by skipping the notification. - Dedupe swallows a later background notice:
notifiedRequestIdsmarks the request even when the notification is skipped, but the request is then on screen or in the pending list, which is what the notice pointed to. - Foreground check out of step with the house pattern:
App.currentActivity?.value != nullis the same gatePaykitSubscriptionNotificationWorker,LightningNodeServiceandWakeNodeWorkeruse;CurrentActivityclears on pause, stop and destroy.
Merge confidence: 4/5, the foreground gate has no test (the author notes unit tests cannot stage the current activity) and one e2e group is red, the same way it fails on unrelated branches today.
Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed (the review run's settings are not readable from inside the run)
jvsena42
left a comment
There was a problem hiding this comment.
Code scan at aa96c17: no HIGH or MEDIUM. Three LOWs inline: a journey missing compared with the iOS twin, a Manual Test that can't produce its notification, and the notice dropped behind the PIN screen.
Checked and clean: every LimitReached path marks the request manual, so the Payment Request sheet still opens in the foreground. Foreground detection reads CurrentActivity on the main thread when the event is handled, and in paused states it errs toward posting.
Device gate (partial): aa96c17, not run yet. Pending: monthly-cap-reached.xml, paired with iOS.
|
Pushed e322a60: "Limit Reached" is skipped only while Bitkit is unlocked in the foreground, so behind the PIN screen it is still posted. The foreground subscription journey from synonymdev/bitkit-ios#1151 is ported as J2, and Manual Test 1 now uses split screen, which can be staged. This answers @jvsena42's three LOWs on |
ben-kaufman
left a comment
There was a problem hiding this comment.
No new material findings in the code review at c97c912. CI still has failed E2E jobs. J1, J2 and manual cases 1 and 2 were not run, and the independent security passes remain incomplete.
Reviewer model: gpt-6-astra
Reasoning effort: high
Closes #1715
Twin: synonymdev/bitkit-ios#1151
Refs: synonymdev/bitkit-ios#1136
A payment request above an allowance no longer posts a "Limit Reached" system notification while Bitkit is in the foreground, where the Payment Request sheet already shows it.
Description
AppViewModelskips the "Limit Reached" notification while Bitkit is unlocked in the foreground, asPaykitSubscriptionNotificationScheduleralready does for a subscription payment due. Behind the PIN screen, or with no Bitkit screen in the foreground, the notification is posted as before, or the toast when notifications are off.Out of Scope
Design
N/A — no UI changes.
Preview
N/A — the change removes a system notification in the foreground.
QA Notes
Setup
Two dev (regtest) builds of this branch set up as in
journeys/allowances/README.md, with notification permission granted on the payer.Journeys
monthly-cap-reached.xml— the request over the monthly limit opens the Payment Request sheet with no "Limit Reached" notificationforeground-due-no-banner.xml— a subscription payment due in the foreground opens the payment due sheet with no "Subscription Payment Due" notificationManual Tests
Automated Checks
AppViewModelSendFlowTest.kt— "Limit Reached" posts nothing when Bitkit is unlocked in the foreground, and still notifies behind the PIN screenEvidence
AppViewModelSendFlowTestanddetektpass on this head.Gaps
Models used
claude-opus-5-5(reasoning:medium)claude-opus-5-5(reasoning:medium)