Category: UX Refinement
Repository location: apps/web/components/invoice/InvoiceCard.tsx (lines ~319-359)
Problem
fundInvoice/shipInvoice are invoked directly via handleAction, while confirmDelivery/repayInvoice/defaultInvoice in the same file go through requestConfirmation. Funding an invoice deploys pool USDC on-chain and marking as shipped changes escrow state — both are irreversible, but neither gets a "review before you sign" step, unlike their siblings in the same component.
Evidence
InvoiceCard.tsx: fundInvoice/shipInvoice call handleAction directly; confirmDelivery/repayInvoice/defaultInvoice call requestConfirmation first.
Suggested implementation
Wrap the fundInvoice/shipInvoice calls in requestConfirmation, mirroring the pattern already used for the other three actions.
Acceptance criteria
- Clicking "Fund Invoice" or "Mark Goods Shipped" shows the same confirmation dialog pattern as the other invoice actions.
- Existing tests for the other confirmed actions are extended to cover these two.
Difficulty: Easy
Expected impact: Closes the same class of accidental-irreversible-action risk as the detail-page issue, for a different entry point.
Filed as part of the second repository-wide audit (deeper refinements following the first cleanup pass).
Category: UX Refinement
Repository location: apps/web/components/invoice/InvoiceCard.tsx (lines ~319-359)
Problem
fundInvoice/shipInvoiceare invoked directly viahandleAction, whileconfirmDelivery/repayInvoice/defaultInvoicein the same file go throughrequestConfirmation. Funding an invoice deploys pool USDC on-chain and marking as shipped changes escrow state — both are irreversible, but neither gets a "review before you sign" step, unlike their siblings in the same component.Evidence
InvoiceCard.tsx:fundInvoice/shipInvoicecallhandleActiondirectly;confirmDelivery/repayInvoice/defaultInvoicecallrequestConfirmationfirst.Suggested implementation
Wrap the
fundInvoice/shipInvoicecalls inrequestConfirmation, mirroring the pattern already used for the other three actions.Acceptance criteria
Difficulty: Easy
Expected impact: Closes the same class of accidental-irreversible-action risk as the detail-page issue, for a different entry point.
Filed as part of the second repository-wide audit (deeper refinements following the first cleanup pass).