Repository navigation
[Customer Portal][FE][Web] Enhance Update Level Details UI and PDF Report Generation - #651
Conversation
Introduce parseFileList util to parse JSON-encoded or comma-separated file lists into deduplicated, sorted paths (handles stray brackets and empty values). Integrate file summary sections into generateUpdateLevelsReportPdf: aggregate filesModified/filesAdded/filesRemoved from all entries, render "Files Modified/Added/Removed" sections with headings, bullets, spacing and a separator line, and only include these sections when relevant.
Tidy up JSX and imports in UpdateLevelDetailsPage: collapse icon imports to one line, reformat the multi-line type import, and break long JSX props and the error image tag onto multiple lines for readability. Update section headings and comments for clarity (e.g. "Files Modified" -> "Updated Files", and minor label edits). These are non-functional formatting and copy changes to improve code clarity and UI text.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR updates the updates feature to rename "Files Modified" to "Updated Files" in the UI and adds file list aggregation to PDF reports. A new ChangesFile List Aggregation and PDF Enhancement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 54 minutes and 56 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@apps/customer-portal/webapp/src/features/updates/utils/updateLevelsReportPdf.ts`:
- Around line 584-586: Update the three renderFileSection calls so the PDF
section labels match the UI wording: change the first call from "Files Modified"
to "Updated Files", keep the second as "Added Files" (instead of "Files Added"),
and the third as "Removed Files" (instead of "Files Removed"); locate the calls
to renderFileSection in updateLevelsReportPdf.ts (the three lines rendering file
sections) and replace the literal label strings accordingly so exported PDFs and
the details page use identical wording.
- Around line 107-124: The parseFileList function currently JSON-parses raw but
only handles arrays, so when JSON.parse(raw) returns a string (e.g., JSON
'"foo.jar"') the code falls through and later splits the original raw including
quotes; update parseFileList to explicitly handle string results from JSON.parse
by checking if typeof parsed === "string" and returning a deduped, stripped,
trimmed, sorted array using the same stripBrackets logic (and Set uniqueness) as
for arrays; keep the existing array handling for Array.isArray(parsed) and the
fallback comma-split behavior for non-JSON inputs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7e556598-6c50-42c4-876f-7aa2a37974f2
📒 Files selected for processing (2)
apps/customer-portal/webapp/src/features/updates/pages/UpdateLevelDetailsPage.tsxapps/customer-portal/webapp/src/features/updates/utils/updateLevelsReportPdf.ts
Handle cases where parseFileList yields a string by splitting on commas, trimming, deduplicating and sorting entries (after stripping outer brackets). Also rename PDF report file section headings for clarity: "Files Modified" -> "Updated Files", "Files Added" -> "Added Files", and "Files Removed" -> "Removed Files".
Description
This pull request makes several improvements to the update level details feature in the customer portal, focusing on code readability, consistency in UI labeling, and enhancements to PDF report generation. The most notable changes include standardizing file section titles in the UI, refactoring for better code formatting, and adding a comprehensive summary of updated files to the generated PDF reports.
UI Consistency and Code Readability:
PDF Report Generation Enhancements:
parseFileListutility to robustly parse and deduplicate file lists from various formats.Summary by CodeRabbit
New Features
Style