Skip to content

feat(frontend): guided one-click resolution for venue-confirmed outbound mutations - #787

Merged
pedrosakuma merged 2 commits into
mainfrom
feat/787-outbound-mutations-guided-resolution
Aug 11, 2026
Merged

pedrosakuma merged 2 commits into
mainfrom
feat/787-outbound-mutations-guided-resolution

Conversation

@pedrosakuma

@pedrosakuma pedrosakuma commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follow-up to #786 (AGENTS.md mandatory code review noted below). The #786 admin panel exposed the full outbound-mutations API surface as one generic form per mutation, requiring an operator to manually copy a 64-hex evidenceId out of a raw JSON blob for every one of the 7 mutations in the recent incident. That UX regression was flagged by the user directly.

What changed

  • New guided banner on the mutation list: "Resolve N confirmed mutations", shown only when at least one listed mutation is venue_acknowledged, requiresReconciliation: true, and has no pending proposal.
  • One click loads each candidate's detail, auto-selects its eligible terminal Execution Report evidence (findTerminalExecutionReportEvidence), and submits venue_acknowledged / terminal_er / terminal_er_verified for the whole batch behind a single confirmation dialog.
  • Mutations without eligible evidence are left alone and reported back for advanced review — never silently skipped.
  • The existing evidence-registration / propose-resolution / approve forms are unchanged in behavior, just moved behind an "Advanced reconciliation" <details> disclosure for the genuinely exceptional flows (venue_absent, leave_ambiguous, registered venue/official evidence).

No backend/API changes — this is a frontend-only UX layer on top of the existing /api/admin/outbound-mutations endpoints from #785/#786.

Testing

cd frontend && node --test test/outbound-mutations-ui.test.mjs
cd frontend && npm run build

Both pass; added fixtures/tests for the guided batch action and the terminal-ER evidence selection.

Protocol evidence gate

Does this PR add or change a dependency on B3MatchingPlatform / B3MarketDataPlatform wire behavior?

  • No, this PR does not change cross-repo wire assumptions.
  • Yes, and merged upstream evidence plus official schema details are listed below.

Checklist:

  • Upstream issues, RFCs, or proposals are not the only evidence for implementation, or this PR has no cross-repo wire dependency.
  • Participant-side / product requirements do not prescribe venue messages, templates, fields, or enums that do not exist in the official schema and merged upstream implementation.

PedroTravi and others added 2 commits August 11, 2026 01:01
…und mutations

Refs #785, follow-up to #786.

The reconciliation panel shipped in #786 exposed the full admin API
surface (evidence registration, resolution decision, evidence type,
raw evidence reference, reason code) as a single generic form. For the
common case — mutations already in `venue_acknowledged` state with an
eligible terminal Execution Report already recorded by the platform —
this made operators manually locate and copy a 64-hex evidenceId out
of a raw JSON blob for every mutation, one at a time.

Add a guided batch action:

- The mutation list now surfaces a "Resolve N confirmed mutations"
  banner whenever any listed mutation is `venue_acknowledged`,
  requires reconciliation, and has no pending proposal.
- Clicking it loads each candidate's detail, selects its eligible
  terminal ER evidence automatically (`findTerminalExecutionReportEvidence`),
  and submits `venue_acknowledged` / `terminal_er` / `terminal_er_verified`
  for all of them behind a single confirmation dialog.
- Mutations without eligible evidence are left untouched and reported
  back to the operator for advanced review.
- The full evidence-registration/propose-resolution/approve forms
  move behind an "Advanced reconciliation" `<details>` disclosure —
  still available unchanged for `venue_absent`/`leave_ambiguous`/
  registered-evidence flows, which genuinely need the raw fields.

No backend/API changes. Purely a frontend UX layer on top of the
existing `/api/admin/outbound-mutations` endpoints from #785/#786.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… resolve

Code review (gpt-5.5) flagged that handleResolveVenueConfirmedBatch only
checked for eligible terminal-ER evidence after fetching each mutations
detail, but never re-checked state/requiresReconciliation/pendingApproval
against the freshly-fetched detail payload. A mutation that flipped out
of venue_acknowledged (e.g. reopened ambiguous by a late contradictory
ER) between the list render and this call could still be auto-resolved
by the guided one-click path using a stale terminal ER.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pedrosakuma
pedrosakuma marked this pull request as ready for review August 11, 2026 01:08
@pedrosakuma
pedrosakuma merged commit 2877397 into main Aug 11, 2026
19 of 21 checks passed
@pedrosakuma
pedrosakuma deleted the feat/787-outbound-mutations-guided-resolution branch August 11, 2026 01:12
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.

2 participants