Skip to content

feat(web): add payments list screen on the live payments api - #294

Merged
tiana-code merged 1 commit into
mainfrom
feat/E-08-payments-view
Jun 19, 2026
Merged

feat(web): add payments list screen on the live payments api#294
tiana-code merged 1 commit into
mainfrom
feat/E-08-payments-view

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

E-08 Sandbox UI #289b (F-08.7b) - closes #289. The payments dashboard screen on the GET /v1/payments list added in #289a.

What

A read-only paged payments list, mirroring the merged accounts screen:

  • features/payments/usePayments (TanStack Query, GET /v1/payments?page=&size= -> PageResponse), PaymentsTable (Payment ID / Reference / Amount / Status), PaymentStatusPill (exhaustive Record over the 6 PaymentStatus values).
  • routes/Payments.tsx paged like Accounts (Pagination noun=payments + loading/empty/error+retry).
  • api/types.ts: PaymentStatus union + PaymentResponse {id, reference, amount, currency, status}.
  • App route /payments + Sidebar Payments entry. 6 vitest tests (loading / rows / empty+disabled-next / error-retry / paginate / nav-active).

Source-verified contract

  • PaymentStatus = INITIATED/SCREENING/SUBMITTED/SETTLED/FAILED/CANCELLED (exact).
  • amount typed number: payments PaymentResponse.amount (BigDecimal) has no MoneyAmountSerializer and there is no global Jackson config, so it serializes as a JSON number (the ledger differs - it uses MoneyAmountSerializer -> string). Matched to the actual payments contract. Follow-up noted: payments money serialization is inconsistent with ledger; a small backend slice could add the serializer for cross-service consistency (out of scope for this UI slice).

Gate chain

  • critic: GO. security-auditor (opus): PASS - §5.3 clean, no PII/secrets, read consumer (payments:read server-side), page/size ints (no injection), 7/7 reqs.
  • code-reviewer: APPROVED, no must-fix. The one optional LOW (FAILED -> red pill) was declined - there is no pill-red class in tokens.css (only teal/amber/grey/violet); amber is the closest non-success signal and adding a palette class is scope creep for a list screen.
  • evaluator: PASS (0.88).
    Web gates green: lint 0 errors, typecheck, vitest 56 passed (6 new), build.

Closes #289

Add a payments screen to the sandbox dashboard, listing payments newest
first on GET /v1/payments with pagination and the usual loading, empty
and error states. It mirrors the accounts screen: a TanStack Query hook
over the shared api client, a typed PaymentResponse matching the backend
contract, a status pill, a formatted amount, and a sidebar entry. The
amount is typed as a number to match the payments serialization. All data
comes from the API.

Closes #289
@tiana-code tiana-code added this to the v0.4.0 milestone Jun 19, 2026
@tiana-code
tiana-code merged commit b255945 into main Jun 19, 2026
9 checks passed
@tiana-code
tiana-code deleted the feat/E-08-payments-view branch June 19, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox UI: Payments view + initiation (needs backend GET /v1/payments list)

1 participant