feat(ui): Batch/Transaction workspace - #479
Open
angela-helios wants to merge 1 commit into
Open
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
POST [base] · Bundle · {type} · {n} entries), one row per entry with its HTTP method chip and target URL, a collapsible body per row, and aBundle JSONtab with the raw payload. Entry methods are display-only. The semantics explainer states what is about to run, chosen by the uploaded bundle's owntype: 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.201 Created, not the mock's200 CREATED), the aggregate summary Steve asked for (created / updated / read / failed counts), an overall badge, andBack 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:
Preflight — semantics copy, method chips, open accordion:
Response — real statuses and the aggregate summary:
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/batchjoined the WCAG (light+dark) and no-CDN sweeps. Full local suite 103 passed; three locales with parity enforced.