Skip to content

MPDX-9768 - Remove required asterisk from MHA amount fields in MhaRequestSection#1853

Merged
zweatshirt merged 1 commit into
mainfrom
remove-required-asterisks
Jun 18, 2026
Merged

MPDX-9768 - Remove required asterisk from MHA amount fields in MhaRequestSection#1853
zweatshirt merged 1 commit into
mainfrom
remove-required-asterisks

Conversation

@zweatshirt

@zweatshirt zweatshirt commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

These two fields do not require input from the user. This PR removes the required prop.
https://jira.cru.org/browse/MPDX-9768

Testing

  • Go to Salary Calculator
  • Check that the MHA Request section no longer has asterisks for the user entered MHA amounts
  • Check that Salary Calculator submission still succeeds.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels (Add the label "Preview" to automatically create a preview environment)
  • I have run the Claude Code /pr-review command locally and fixed any relevant suggestions
  • I have requested a review from another person on the project
  • I have tested my changes in preview or in staging
  • I have cleaned up my commit history

@zweatshirt zweatshirt self-assigned this Jun 18, 2026
@zweatshirt zweatshirt added the Preview Environment Add this label to create an Amplify Preview label Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Preview branch generated at https://remove-required-asterisks.d3dytjb8adxkk5.amplifyapp.com

@zweatshirt zweatshirt marked this pull request as ready for review June 18, 2026 21:35
@github-actions

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against 8387c2f

No significant changes found

@zweatshirt zweatshirt left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Multi-Agent Code Review — ✅ CLEAN

Verdict: CLEAN — no issues found across 5 specialized agents (Architecture, Testing, Standards, UX, Financial Reporting). Unanimous, high confidence.

What this PR does

Removes the MUI required prop (the asterisk + aria-required) from the mhaAmount and spouseMhaAmount AutosaveTextField inputs in MhaRequestSection.tsx.

Why it's correct

  • required is a passthrough to MUI TextField — purely visual. Validation is driven by the separate schema prop.
  • The Yup schema in useMhaRequestData.ts builds these fields via amount(...) without { required: true }, and yupHelpers.ts only attaches .required() when that flag is set. So these fields were never validated as required — the asterisk was misleading. Removing it aligns the UI with the actual (optional) validation and removes a false aria-required (an a11y improvement).
  • Convention confirmed: every sibling SalaryCalculator field pairs the visual required prop with required: true in its schema (MaxAllowableSection, RequestedSalaryCard, ApprovalProcessCard, EffectiveDateStep). MhaRequestSection was the lone outlier; this diff brings it in line.
  • Financially inert: empty amounts safely coalesce to 0 via ?? 0 across all consumers; progressPercentage divisor is guarded. No NaN / divide-by-zero risk.
  • No stale tests: no test asserts the asterisk or aria-required on these fields, so no test update was required.

Risk

Score 1/10 (LOW). Reviewer level: ANY. Single consumer (YourInformation.tsx); no breaking changes.

Agent Critical High Important Suggestions
Architecture 0 0 0 0
Testing 0 0 0 0
Standards 0 0 0 0
UX 0 0 0 0
Financial Reporting 0 0 0 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zweatshirt zweatshirt merged commit 83d0de7 into main Jun 18, 2026
44 checks passed
@zweatshirt zweatshirt deleted the remove-required-asterisks branch June 18, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Preview Environment Add this label to create an Amplify Preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant