MPDX-9597 UI - Add validation for required salary cap fields in MaxAllowableStep#1785
Conversation
|
Preview branch generated at https://split-cap-validation.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against 0e06980 No significant changes found |
zweatshirt
left a comment
There was a problem hiding this comment.
Multi-Agent Code Review - PR #1785
Agents: Architecture, Testing, Standards, UX (4 agents, standard mode)
CLEAN
No significant issues found. All 4 agents returned zero blockers and zero important concerns.
Risk: LOW (1/10) - Single component schema change with colocated test. Required reviewer level: ANY.
Dependency Impact: LOW - MaxAllowableSection is imported only by YourInformation.tsx. The yup schema is not exported (internal useMemo). No breaking changes. RequestedSalaryCard already uses required: true on the same helper, confirming this is an established pattern.
Pre-existing Issues (Informational)
These issues predate this PR and do not block merge.
[Pre-existing] MaxAllowableSection.tsx - yup fieldName vs visible label - Severity: 4.0/10
The yup fieldName passed to amount() is 'Maximum Allowable Salary' / 'Spouse Maximum Allowable Salary', but the visible TextField label includes the person's name. The required error therefore reads "Maximum Allowable Salary is required" rather than "John Maximum Allowable Salary is required." Mild UX disconnect - the same pattern already exists for the max error message. Consider aligning in a follow-up PR.
| Agent | Critical | High | Important | Suggestions | Confidence |
|---|---|---|---|---|---|
| Architecture | 0 | 0 | 0 | 0 | High |
| Testing | 0 | 0 | 0 | 1 | High |
| UX | 0 | 0 | 0 | 2 | High |
| Standards | 0 | 0 | 0 | 0 | High |
| Total | 0 | 0 | 0 | 3 |
|
|
||
| return yup.object({ | ||
| salaryCap: amount(t('Maximum Allowable Salary'), t, { | ||
| required: true, |
There was a problem hiding this comment.
| ); | ||
| }); | ||
|
|
||
| it('shows required errors when split cap fields are empty', async () => { |
There was a problem hiding this comment.
| ); | ||
|
|
||
| expect( | ||
| await findByText('Maximum Allowable Salary is required'), |
There was a problem hiding this comment.
There was a problem hiding this comment.
AI Review Auto-Approval
Risk Level: LOW (1/10)
Verdict: CLEAN (no issues found)
This PR was auto-approved because:
- The multi-agent AI review determined it is low risk
- No blocking issues were found
If you believe this PR needs human review, dismiss this approval and request a review manually.
Description
Testing
Checklist:
/pr-reviewcommand locally and fixed any relevant suggestions