Skip to content

feat: View XML button & view XML as new tab#1506

Open
vochaparro2 wants to merge 2 commits into
mainfrom
victor/1091-view-xml
Open

feat: View XML button & view XML as new tab#1506
vochaparro2 wants to merge 2 commits into
mainfrom
victor/1091-view-xml

Conversation

@vochaparro2
Copy link
Copy Markdown
Collaborator

@vochaparro2 vochaparro2 commented Jun 5, 2026

PULL REQUEST

PR title: Remember to name your PR descriptively and follow conventional commits!

Summary

  • Adds a "View XML" button to the eCR viewer page that toggles in-place between the eCR summary and the raw eICR/RR XML, displayed in a collapsible, line-numbered viewer.
  • Adds a new API - GET /api/view-xml?id= — retrieves the stored XML zip from S3 and returns { ecrXml, rrXml } as JSON. Returns 404 if XML storage is disabled or the archive is missing
  • The "View XML" button is hidden when SAVE_XML is not set.
  • Uses react-xml-viewer with collapsible nodes and line numbers.
  • Fixed an issue that prevented RR files from being saved correctly to blob storage.

Related Issue

Fixes #1091

Acceptance Criteria

When there are eICR and RR XMLs:

Individual eCR

  • "View XML" button in the eCR

XML tab
Only show tabs for files that exist. For example, if there is an eICR but no RR, only show a eICR tab.
When the user selects "View XML", they will be taken to a side menu that includes:

  • Tab for eICR XML
  • Tab for RR XML

When there no eICR or RR XMLs:

  • Do not show the "View XML" button

Additional Information

image image

Anything else the review team should know?

Checklist

  • If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)

@vochaparro2 vochaparro2 requested a review from a team as a code owner June 5, 2026 14:53
@vochaparro2 vochaparro2 requested review from angelathe, austin-hall-skylight and laura-puerto-skylight and removed request for a team June 5, 2026 14:53
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 70.96774% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.79%. Comparing base (51bea25) to head (28db258).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...-viewer/src/app/view-data/components/XmlViewer.tsx 48.07% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1506      +/-   ##
==========================================
+ Coverage   85.91%   89.79%   +3.88%     
==========================================
  Files         259      183      -76     
  Lines       11710     7049    -4661     
  Branches     1356     1388      +32     
==========================================
- Hits        10061     6330    -3731     
+ Misses       1642      712     -930     
  Partials        7        7              
Flag Coverage Δ
ecr-viewer 90.71% <70.96%> (-0.30%) ⬇️
ingestion ?
message-parser ?
orchestration 85.29% <ø> (ø)
trigger-code-reference ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

View XML button & view XML as new tab

2 participants