Skip to content

Per-Invoice Recipient Split History Panel #519

Description

@Kingsman-99

Description

Users reviewing a single invoice cannot see how each recipient's payment obligation was fulfilled over time—whether by a lump sum or multiple partial payments—because no per-recipient timeline exists within the invoice view. A collapsible history panel for each recipient row on the detail page should surface this data.

Technical Context

src/components/invoice/RecipientRow.tsx adds a chevron toggle that expands an inline src/components/invoice/RecipientPaymentHistory.tsx (new) panel. The panel fetches from src/app/api/invoices/[id]/recipients/[recipientId]/history/route.ts (new), which queries Horizon for payment and path_payment operations filtered to the recipient's address and the invoice's escrow account. Each history entry shows the operation hash, amount, and timestamp using RelativeTime (Issue 52) and TxHash (Issue 30).

Acceptance Criteria

  • Each recipient row on src/app/invoice/[id]/page.tsx has a chevron that expands a payment history panel
  • The expanded panel lists all on-chain payment operations from the escrow to the recipient with amount and timestamp
  • The history is fetched lazily on first expand and cached for the page session
  • Each history entry shows a truncated transaction hash with copy button using the TxHash component
  • An empty history panel shows "No payments recorded yet" instead of a blank space
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions