Skip to content

MPDX-9615 - Update formula in salary breakdown to specify geographic multiplier#1790

Merged
zweatshirt merged 2 commits into
mainfrom
MDX-9615
May 20, 2026
Merged

MPDX-9615 - Update formula in salary breakdown to specify geographic multiplier#1790
zweatshirt merged 2 commits into
mainfrom
MDX-9615

Conversation

@zweatshirt
Copy link
Copy Markdown
Contributor

@zweatshirt zweatshirt commented May 20, 2026

Description

Testing

  • Go to hrTools/pdsGoalCalculator
  • Examine the salary breakdown and see that it is clear that the Monthly Base is being multiplied by the Geographic Multiplier in the UI, improving the user experience.

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 May 20, 2026
@zweatshirt zweatshirt added the Preview Environment Add this label to create an Amplify Preview label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Preview branch generated at https://MDX-9615.d3dytjb8adxkk5.amplifyapp.com

@github-actions
Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against f9b0c40

No significant changes found

Copy link
Copy Markdown
Contributor Author

@zweatshirt zweatshirt left a comment

Choose a reason for hiding this comment

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

Multi-Agent Review — PR #1790

Verdict: ✅ CLEAN — No blockers, no important issues.

Risk Score: 1/10 (LOW) | Agents: 4 (Architecture, Testing, Standards, UX) | Findings: 3 informational suggestions

Summary

Single-line translation string change. All four agents agreed the change is correct and safe:

  • i18n interpolation syntax is correct ({{rate}} variable, static key, extractable by yarn extract)
  • Pattern is consistent with sibling formula rows in the same file
  • No logic, data handling, type, or accessibility changes
  • No existing tests break

Three low-severity suggestions noted as informational (see inline comments). They do not block merge.

id: 'gross-monthly-pay',
category: t('Gross Monthly Pay'),
formula: t('Monthly Base × {{rate}}', {
formula: t('Monthly Base × Geographic Multiplier ({{rate}})', {
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.

[Suggestion] Run `yarn extract` after this PR to register the new translation key `'Monthly Base × Geographic Multiplier ({{rate}})'` in `public/locales/`. The prior key (`'Monthly Base × {{rate}}'`) will become orphaned and CrowdIn translators won't see the new string until extraction is run and uploaded. Flagged by: Testing Agent, Architecture Agent.

id: 'gross-monthly-pay',
category: t('Gross Monthly Pay'),
formula: t('Monthly Base × {{rate}}', {
formula: t('Monthly Base × Geographic Multiplier ({{rate}})', {
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.

[Suggestion] The `gross-monthly-pay` formula string has no test assertion in `salaryBreakdown.test.tsx` — existing tests only check `row.id` and `row.amount`. All current test fixtures also use `geographicMultiplier: 0`, so the `{{rate}}` interpolation path is untested. Consider adding:
it('labels gross monthly pay with the geographic multiplier formula', () => {
  const rows = buildSalaryBreakdownRows(
    { ...salariedCalculation },
    { geographicMultiplier: 0.1, employerFicaRate: 0.08 },
    'en-US',
    i18n.t,
  );
  const gross = rows.find((r) => r.id === 'gross-monthly-pay');
  expect(gross?.formula).toBe('Monthly Base × Geographic Multiplier (110%)');
});

Flagged by: Testing Agent, UX Agent.

id: 'gross-monthly-pay',
category: t('Gross Monthly Pay'),
formula: t('Monthly Base × {{rate}}', {
formula: t('Monthly Base × Geographic Multiplier ({{rate}})', {
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.

[Suggestion] Copy note: `percentageFormat(1 + geographicMultiplier)` formats the *total factor* (e.g. 120% for a 20% geographic add-on), not the add-on rate itself. The rendered label will read "Monthly Base × Geographic Multiplier (120%)". Confirm this is the intended framing — a reader might expect "Geographic Multiplier" to represent the 20% add-on rather than the 120% total factor. Flagged by: Standards Agent, Testing Agent.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

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 marked this pull request as ready for review May 20, 2026 19:52
@zweatshirt zweatshirt enabled auto-merge May 20, 2026 20:25
@zweatshirt zweatshirt merged commit 29a6e24 into main May 20, 2026
24 checks passed
@zweatshirt zweatshirt deleted the MDX-9615 branch May 20, 2026 20:29
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