MPDX-9666 Add PDFs to ASR#1826
Conversation
|
Preview branch generated at https://MPDX-9666-asr-empty-links.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against eaa0644 No significant changes found |
kegrimes
left a comment
There was a problem hiding this comment.
🤖 Multi-Agent Code Review — PR #1826
Verdict: ✅ APPROVED WITH SUGGESTIONS · Risk: LOW (1/10) · Mode: standard · 5 agents (Architecture, Testing, Standards, UX, Financial Reporting) + dependency analysis
No blockers. This is a small, clean change: two dead href="#" + TODO onClick stubs are replaced with working same-origin static PDF links, and the colocated tests are updated. yarn lint passes. The dead-code/TODO removal is a net improvement and the linking pattern matches established repo conventions (verified against 6+ existing <Link target="_blank" rel="noopener noreferrer"> usages in HrTools).
Dependency impact: LOW
AboutForm (AdditionalSalaryRequest) has a single production consumer (StepList.tsx), an unchanged named export → no breaking changes. Each PDF path is referenced in exactly one place.
Findings (none blocking)
- Medium (6.5) — Tests assert only
href, not the newtarget/rel/downloadattributes.rel="noopener noreferrer"is a security mitigation that nothing locks in. (see inline) - Medium (6.5) —
downloadvs open-in-tab UX for the "Progressive Approvals" link, whose copy describes a process users likely want to read. Product judgment call. (see inline) - Suggestion (5.5) — Optional "(opens in a new tab)" accessible hint; no enforceable repo pattern exists, so optional.
- Suggestion (4.5) — Hardcoded
2026in asset paths will drift; the ASR context already derives the year dynamically. (see inline) - Suggestion (4.0) — Prefer
getByRole('link', { name })overgetByText().closest('a')(used once in the wholesrctree vs. 41 files using the role query). (see inline)
Open questions worth confirming
- The "paper version" link points at
2026-salary-calc-us.pdf(salary calculator), but the copy reads "paper version of the Additional Salary request" — confirm that's the correct document, not a mismatched file. - Confirm committing these PDFs to
public/(publicly served, unauthenticated) is acceptable for these documents.
Out of scope (not in this PR)
ReceiptAlertText.tsx:8 still carries // TODO [MPDX-9303]: Add link for Progressive Approvals — consider wiring it to the same asset in a follow-up.
| Agent | Critical | High | Important | Medium | Suggestions |
|---|---|---|---|---|---|
| Architecture | 0 | 0 | 0 | 0 | 2 |
| Testing | 0 | 0 | 0 | 1 | 1 |
| Standards | 0 | 0 | 0 | 0 | 0 |
| UX | 0 | 0 | 0 | 2 | 0 |
| Financial Reporting | 0 | 0 | 0 | 0 | N/A |
| Total | 0 | 0 | 0 | 3 | 3 |
Suggestions (severity < 5) are informational and don't require /dismiss. Reply /dismiss: <reason> on any Medium finding you disagree with.
There was a problem hiding this comment.
AI Review Auto-Approval
Risk Level: LOW (1/10)
Verdict: APPROVED_WITH_SUGGESTIONS (suggestions posted, no blockers)
This PR was auto-approved because:
- The multi-agent AI review determined it is low risk
- No blocking issues were found
- All suggestions have been posted as review comments for the developer to consider
If you believe this PR needs human review, dismiss this approval and request a review manually.
08b369b to
f82333d
Compare
Description
Currently, there are two links on ASR's About Form page that are doing nothing when clicked. We want to add this functionality:
Testing
/hrTools/additionalSalaryRequestChecklist:
/pr-reviewcommand locally and fixed any relevant suggestions