No-Jira - PDS Goal Calculator: Quick Geographic Location fix #1793
Conversation
|
Preview branch generated at https://improve-pds-geo.d3dytjb8adxkk5.amplifyapp.com |
d20e7fa to
eda06b7
Compare
Bundle sizes [mpdx-react]Compared against 29a6e24 No significant changes found |
zweatshirt
left a comment
There was a problem hiding this comment.
Multi-Agent Code Review — CLEAN ✓
Verdict: CLEAN — No issues found.
Risk: 1/10 (LOW) · 2 files · 9 source lines · single domain
Agents: Architecture, Testing, Standards, Financial Reporting (4 reviewers)
Summary
The geographicMultiplier === 0 guard is semantically correct: 0 is the "no adjustment" sentinel (sourced from goalGeographicConstantMap with ?? 0), and grossMonthlyPay = monthlyBase × (1 + 0) = monthlyBase exactly in IEEE-754. Showing "Monthly Base" instead of "× Geographic Multiplier (100%)" removes misleading noise. Both new translation keys are properly localized. Both branches have test coverage.
All findings below are informational suggestions — none block merge.
Financial Checklist
- Arithmetic on money values safe: ✓
- Rounding at display boundary only: ✓
- Formula label matches computed amount: ✓ (multiply-by-1.0 is bit-exact)
- Null/undefined amounts handled: ✓ (
?? 0present)
| i18n.t, | ||
| ); | ||
| const row = rows.find((r) => r.id === 'gross-monthly-pay'); | ||
| expect(row?.formula).toBe('Monthly Base'); |
There was a problem hiding this comment.
expect(row?.formula).toBe('Monthly Base');
expect(row?.amount).toBe(salariedCalculation.monthlyBase); // or the expected numberNot blocking — just strengthens the invariant.
| rate: percentageFormat(1 + geographicMultiplier, locale), | ||
| }), | ||
| formula: | ||
| geographicMultiplier === 0 |
There was a problem hiding this comment.
| expect(row?.formula).toBe('Monthly Base'); | ||
| }); | ||
|
|
||
| it('shows "Monthly Base × Geographic Multiplier (rate)" formula when multiplier is non-zero', () => { |
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
We want to hide the geographic multiplier row information when there is no multiplier set.
Testing
Checklist:
/pr-reviewcommand locally and fixed any relevant suggestions