MPDX-9367 - PDS Calc Salary Subtotal section#1721
Conversation
|
Preview branch generated at https://MPDX-9367.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against d2abb90
|
🤖 Multi-Agent Code Review ReportPR: #1721 — MPDX-9367 - PDS Calc Salary Subtotal section ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📊 RISK ASSESSMENT━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Risk Factors
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎯 TL;DR━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ No blockers. The core salary math is correct, tests are thorough, standards compliance is clean (no Top concerns (consensus across 2-3 agents):
None of the above block merge. Address (1)–(3) before merging; (4) and (5) can ship with follow-up tickets. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚫 CRITICAL BLOCKERS (Severity 9-10)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ None. Core math audited clean against prior art in ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
| Agent | Critical | Important | Suggestions | Confidence |
|---|---|---|---|---|
| 💰 Financial | 0 | 3 | 4 | High |
| 🏗️ Architecture | 0 | 3 | 4 | High |
| 🧪 Testing & Quality | 0 | 2 | 5 | High |
| 👤 UX | 0 | 3 | 4 | High |
| 📋 Standards | 0 | 0 | 3 | High |
| Total (de-duplicated) | 0 | 9 | ~15 | High |
Checklists
Financial:
- Arithmetic safe (no mid-calc rounding): ✅
- Currency mixing prevented: ✅ (single-currency USD domain)
- Rounding at display boundary only:
⚠️ (Subtotal raw vs. rounded row values — Issue Move to Yarn V2 and upgrade packages #5) - Null/undefined amounts handled:
⚠️ (see Issue contacts #2) - Luxon (not
new Date()): N/A - Server-provided aggregations preferred: ✅ (no server-side field exists)
- Geographic multiplier convention matches codebase: ✅ (matches
calculateNewStaffTotals.ts:144) - Yearly→monthly propagation to all salary consumers: ✅
Standards:
- File naming: ✅ · Exports: ✅ · GraphQL: N/A
- Localization: ✅ · TypeScript: ✅ · Testing: ✅
- Code quality (no console.log / any / TODO / commented code /
new Date()): ✅ - Package management: N/A · Folder pattern: ✅ (with Architecture caveat)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 RECOMMENDED NEXT STEPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before merge (fix or consciously defer):
- Address loading/error/empty states — don't let the Salary step silently disappear (Issue Tasks #1)
- Gate the breakdown on
payRate != null— don't render$0as if valid data (Issue contacts #2) - Tighten financial test precision —
toBefor exact expressions,toBeCloseTo(..., 5)for remainders (Issue add notifications #3) - Smoke-test on a 375px viewport to confirm mobile layout is acceptable (Issue Bump @storybook/addon-viewport from 6.1.17 to 6.1.18 #9)
- Designer/PM sign-off on visual hierarchy vs.
TotalReimbursableSection(Issue MPDX-6917-Remove-Lodash #8)
Follow-up ticket candidates (can ship):
- Document
mergeWithbehavior inPdsGoalCalculatorTestWrapperand/or export a default-constants helper (Issue Bump axios from 0.20.0 to 0.21.1 #4) - Decide and document Subtotal rounding convention; add regression test (Issue Move to Yarn V2 and upgrade packages #5)
- Move
SalaryConstantsintocalculations/salaryCalculation.ts(Issue Make prettier config closer to defaults #7) - Reconcile
calculations/vs.Shared/as the canonical home for calculator math (Issue Remove ts-node #6)
Merge decision: ✅ Approve with changes. No blockers. The PR is well-structured, well-tested, and standards-compliant.
Review by AI Multi-Agent System v3.0. Debate rounds skipped — agent findings converged cleanly with no material contradictions. Standard mode · 5 of 7 agents · ~$3 · ~6 min. Generated by /agent-review skill.
|
@wjames111 Sorry to add you to review, this is "critical" according to |
wjames111
left a comment
There was a problem hiding this comment.
Looks great! Let me know once this merges.
Description
MPDX-9367
Testing
reports/pdsGoalCalculatorChecklist:
/pr-reviewcommand locally and fixed any relevant suggestions