Skip to content

feat(history): show direct (interactive) RI exchanges in the History view #1883

Closed

Description

@cristim

Problem

Interactive (direct) RI exchanges, AWS and Azure, are recorded in ri_exchange_direct_executions, not in ri_exchange_history. The History tab, the ListRIExchange* queries (internal/config/store_postgres.go) and any history analytics read only ri_exchange_history, so an interactive exchange does not appear there. The only listing of direct rows is the unresolved-AWS list and resolve API from #1858.

This was an accepted trade-off of #145: making the daily cap count direct spend (the owner's decision A) was done by summing the separate table in the spend query, instead of writing a second ri_exchange_history row per exchange (which would duplicate the record, be swept by the stale-processing reaper, and need two writes without a common transaction). The cap is correct; visibility is the gap.

Proposal

Show direct executions in the History view, read-only: add a query over ri_exchange_direct_executions (status, provider, account, amounts, resolved state) and surface it beside the exchange history, with a source label so a direct row is distinguishable from an approved or automated one. Decide whether Azure rows (which have no resolve path) need an operator action or only display.

Follow-up to #145.

Activity

  1. cristim commented on Nov 13, 2026

    @cristim
    MemberAuthor

    Landed on main (claude-platform): 618280c (direct executions in the history response, account-scoped, sanitized, empty before migration 163) and b4c0f07 (read-only Direct exchanges table). Non-blocking notes for a follow-up: an empty currency code is shown as USD, which could mislabel a row; the History load now calls the same endpoint twice, so the direct query runs twice per load. The issue stays open until those two notes are settled.

  2. cristim commented on Nov 13, 2026

    @cristim
    MemberAuthor

    Both follow-up notes are fixed on main (claude-platform): 96fd94b shows a dash for an empty or missing currency in the amount and cap cells, and af41fca reads direct exchanges from the same history response, so the History load makes one request. A failed fetch shows the existing history error line. Reviewed in two passes (approve), with mutation probes that fail on each regression. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions