Skip to content

feat(orders): add amendment history visibility (#512)#533

Open
TYDev01 wants to merge 1 commit into
floxxih:masterfrom
TYDev01:amendment-history
Open

feat(orders): add amendment history visibility (#512)#533
TYDev01 wants to merge 1 commit into
floxxih:masterfrom
TYDev01:amendment-history

Conversation

@TYDev01
Copy link
Copy Markdown

@TYDev01 TYDev01 commented Jun 1, 2026

closed #512
feat(orders): add amendment history visibility (#512)

Persist amendment metadata on swap orders and expose it in the UI so
users can see how many times an order changed and what the latest state
is.

Backend:

  • Add amendment_count (int) and amendment_log (JSONB) columns to
    swap_orders with migration 20260601_0005
  • Add PATCH /orders/{id}/amend endpoint: validates the order is open,
    diffs changed fields (from_amount, to_amount, min_fill_amount, expiry),
    appends a structured log entry with sequence, amended_at, per-field
    before/after, and optional note, then increments amendment_count
  • Extend OrderResponse with amendment_count and amendment_log
  • Add OrderAmend and OrderAmendmentEntry Pydantic schemas
  • Emit order.updated WebSocket event on every amendment
  • Add tests: OrderAmend schema validation and amendment log accumulation

Frontend:

  • Add OrderAmendmentEntry type and amendmentLog field to Order
  • Extend ApiOrderRecord and Zod schema with amendment fields
  • Add amendOrder() API helper (PATCH)
  • List view: show amendment count badge on each card
  • Detail card: show "Last amended" timestamp in Order Summary panel
  • Expandable AmendmentHistory panel with per-entry sequence number,
    timestamp, field-level before→after diffs, note, and "Latest" badge
  • Populate amendmentLog in mock seed data for amended orders

Closes #512

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@TYDev01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Advanced Orders] Add amendment history visibility in the UI

1 participant