Skip to content

feat(ui): Batch/Transaction workspace - #479

Open
angela-helios wants to merge 1 commit into
mainfrom
feat/476-batch-transaction-ui
Open

feat(ui): Batch/Transaction workspace#479
angela-helios wants to merge 1 commit into
mainfrom
feat/476-batch-transaction-ui

Conversation

@angela-helios

Copy link
Copy Markdown
Contributor

Closes #476

The Batch & Data nav entry becomes a real workspace, implementing Brett's four frames (Upload, Actions, Bundle JSON, Response) with the review-call decisions baked in:

  • Upload — drop or browse a Bundle JSON; non-JSON, non-Bundle, and non-batch/transaction files are rejected with a message.
  • Preflight — the request line (POST [base] · Bundle · {type} · {n} entries), one row per entry with its HTTP method chip and target URL, a collapsible body per row, and a Bundle JSON tab with the raw payload. Entry methods are display-only. The semantics explainer states what is about to run, chosen by the uploaded bundle's own type: transaction — all or nothing; if any entry fails, the server rolls the whole bundle back / batch — entries run independently; a failed entry does not stop or undo the others.
  • Execute — POST to the FHIR root with the tenant header; the UI crate still never touches storage.
  • Response — per-action status badges verbatim from the response bundle (201 Created, not the mock's 200 CREATED), the aggregate summary Steve asked for (created / updated / read / failed counts), an overall badge, and Back to bundle / Execute again. A rolled-back transaction surfaces its OperationOutcome text instead of pretending there are outcomes.

Decisions recorded on the issue: GET entries are in-scope (spec-confirmed), Edson's single-resource path and expanded-accordion mock dropped, mock text nits (batch/transaction mismatch, 200 CREATED) resolved by rendering from the real payload.

Found while building it: search-style GET entries (Patient?name=…) are mis-parsed as instance reads by the server in both bundle types — filed as #478; the UI renders whatever the server answers, so nothing blocks here.

Screenshots

Upload:

upload

Preflight — semantics copy, method chips, open accordion:

preflight

Response — real statuses and the aggregate summary:

response

Tests

Router: the shell mounts with all three stages and the nav carries aria-current. e2e: full transaction round-trip (upload → preflight rows/chips/accordion/JSON tab → execute → 201 badges, aggregate, back-to-bundle), the batch-semantics variant, and the invalid-file rejection. /ui/batch joined the WCAG (light+dark) and no-CDN sweeps. Full local suite 103 passed; three locales with parity enforced.

The Batch & Data nav entry becomes a real page (Brett's frames): drop or
browse a Bundle JSON, review the execution plan — request line, one row
per entry with its method chip and collapsible body, a Bundle JSON tab,
and a one-line semantics explainer chosen by the bundle's own type
(transaction: all or nothing; batch: independent entries) — then execute
against the FHIR root and read the outcome: per-action status badges
straight from the response bundle plus the aggregate created / updated /
read / failed summary. A rolled-back transaction surfaces its
OperationOutcome instead of pretending there are outcomes.

The shell is server-rendered; batch.js does the parsing, rendering, and
the POST, so the UI crate still never touches storage. Three locales.

Closes #476
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

ui: Batch/Transaction workspace — upload, preflight review, execute, results summary

2 participants