Skip to content

[P1] Build the transaction timeline from all evidence tables #25

Description

@samithreddychinni

Problem

internal/adminapi/transactions.go:158 builds events from ledger only. Polls and the latest webhook are returned separately, but the dashboard timeline in dashboard/src/pages/Transactions/TimelineDrawer.jsx expects event types such as hold_created, webhook_received, poll_completed, and callback_delivered in the event stream.

Right now the timeline can miss the evidence that explains a transaction. It shows state transitions, but not the webhook and poll history that caused them.

Scope

  • Change buildTimeline to merge relevant rows from holds, webhooks, verification_polls, ledger, and callback delivery evidence.
  • Include event types for hold creation, webhook receipt, rejected webhook if tied to a transaction, poll completion, poll failure, state transition, callback delivered, and callback failed.
  • Sort the merged events by timestamp.
  • Include useful data fields: gateway status, gateway amount, poll attempt, error text, webhook event type, callback HTTP status, and transition from and to values.
  • Keep polls if the UI still needs the tabular poll view, but do not make the main timeline ledger-only.
  • Avoid leaking secrets or raw signed payload fields in timeline summaries.

Acceptance criteria

  • A transaction with a webhook and polls shows those records in events in timestamp order.
  • A transaction with failed polls shows the poll errors in events.
  • A delivered callback appears in events from the delivery evidence.
  • Existing timeline drawer behavior works without mock-only event types.
  • Admin API tests cover a merged timeline with at least one webhook, two polls, one transition, and one callback event.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions