OUT-4012: warn before changing the bank-deposit flag - #272
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds a confirmation safeguard when saving a changed bank-deposit setting.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "fix(OUT-4012): add focus management to t..." | Re-trigger Greptile |
Collaborator
Author
|
@greptileai review PR again |
priosshrsth
requested changes
Jul 30, 2026
SandipBajracharya
changed the base branch from
OUT-4011
to
feature/payout-reconciliation
July 31, 2026 10:26
Show a confirmation modal when saving invoice settings that flip bankDepositFeeFlag, so users acknowledge that the change applies only to new invoices and that a payout mixing pre/post-change invoices may need manual reconciliation. UX safeguard only; fires on save and only when the flag differs from its saved value, both directions. - add reusable ConfirmModal (portal, Escape/backdrop dismiss, a11y ids) - gate the invoice save behind requestInvoiceSettingsSave in useSettings - render the modal from SettingAccordion; InvoiceDetail toggle unchanged Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address Greptile P2: the aria-modal dialog left focus on the background save button with no trap or restoration. On open, move focus into the dialog, trap Tab/Shift+Tab between its buttons, and restore focus to the previously focused element on close. Keying the effect on `open` via an onCancel ref also stops it re-subscribing on every render. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the onCancelRef workaround with two focused effects: one keyed on `open` for focus-in/restore (runs once), one keyed on `open`+`onCancel` for the Escape + Tab-trap listener. Clearer, honest dependency arrays. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SandipBajracharya
force-pushed
the
OUT-4012
branch
from
July 31, 2026 10:27
1ec1399 to
f21eb26
Compare
SandipBajracharya
merged commit Jul 31, 2026
bbd57c4
into
feature/payout-reconciliation
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Changing
bankDepositFeeFlaghas consequences users can't see: the deposit behavior is frozen per invoice at creation, so a toggle only affects new invoices, and a Stripe payout that mixes pre/post-change invoices won't get its automatic bank deposit and needs manual reconciliation.Shipped
A confirmation modal on save (not on toggle), shown only when the flag differs from its saved value — covers both enable and disable, and never fires when unchanged. UX safeguard only; correctness lives in the frozen-intent + mixed-guard work (OUT-4010/4009).
Copy:
Code sites
src/components/ui/ConfirmModal.tsx(new) — reusable portal modal (Escape/backdrop dismiss,role="dialog"+aria-labelledby/aria-describedbyviauseId).src/hook/useSettings.ts—useInvoiceDetailSettingsgains the save-intercept (requestInvoiceSettingsSave/confirmBankDepositChange/cancelBankDepositChange); rawsubmitInvoiceSettingsno longer exported.src/components/dashboard/settings/SettingAccordion.tsx— invoice save button routes through the guard and renders the modal.InvoiceDetail.tsxunchanged (checkbox stays a free local toggle).Notes
environment: 'node'); verified viatsc, lint, prettier,yarn build, andyarn test(357/357).Testing Criteria
🤖 Generated with Claude Code