Conversation
Bundle sizes [mpdx-react]Compared against 6bac042 No significant changes found |
wjames111
left a comment
There was a problem hiding this comment.
Multi-Agent Code Review
Verdict: APPROVED WITH SUGGESTIONS — no blockers, 1 Important finding (severity 7.0) and several Medium-priority improvements recommended.
Mode: standard (5 specialized agents + dependency impact + 5-agent debate round)
Risk Assessment
- Risk score: 10/10 (rule-based cap — 12 medium-risk feature files × 1pt + 200-300 line volume = 14, capped at 10)
- Risk level: CRITICAL by formula, but qualitatively LOW–MEDIUM: pure UI/display logic, no auth/CI/migration/GraphQL/schema changes; dependency analysis confirmed zero breaking exports.
- Reviewer level: MID-LEVEL/SENIOR. PDS Goal Calculator is financial-domain UI; the math itself is untouched.
Selected agents
Architecture, Testing & Quality, Standards Compliance, UX, Financial Reporting (domain). Security and Data Integrity were skipped — no API/auth/CI/env/GraphQL-mutation/schema/cache changes.
Summary of findings (post-debate consensus)
Important (severity 7.0–7.9) — recommended fix, not a blocker:
- Missing tests for 4 new
*SectionList.tsxcomponents (Setup / ReimbursableExpenses / SupportItem / SummaryReport). Project standard from.claude/rules/code-review.mdis colocated*.test.tsxfor every new component. The wiring is thin andpdsCompletion.tsis well-tested, so this is recommended but not blocking. Testing agent revised down to 6.0, Standards agent revised up to 7.0 — landed at 7.0 consensus.
Medium (severity 5.0–6.9):
- No loading affordance during
calculationLoading=true(PdsGoalCalculatorLayout.tsx:51 → PanelLayout.tsx:131). WhenshowPercentage={false}, the entireStyledBoxcontaining the progress ring is removed from the DOM — no spinner, no skeleton. Brief in practice but visible on slow networks. - Missing test for
CircularProgressWithLabelaria-label / aria-hidden additions — file is untested today; the new a11y attributes should be pinned. - Missing test for new
announceCompletionbranch in sharedSectionList.tsx— thetitleAccessComplete/Incomplete announcement is uncovered. - Missing test for
aria-current="step"on PanelLayout active icon button — the “current step indicator” outcome named in the PR title hinges on this attribute. - Missing test for the
showPercentage={!calculationLoading}loading branch in PdsGoalCalculatorLayout. - “$0 = complete” semantics in
isMonthlyReimbursableComplete/isAnnualReimbursableComplete— entering a single $0 value flips the section to “Complete.” Financial agent originally flagged sev 7.0, self-revised to 4.0 on the grounds that the dot is a hint not a validator, and the comment inpdsCompletion.ts:29-30documents the intent. UX agent disagreed and held sev 7.0+ on the grounds that “Complete” carries semantic weight that may mislead. Landing at 5.5 — please confirm the intended semantics and either (a) document the contract more loudly in the test (link to a ticket) or (b) rename to…Started/…Touched.
Suggestions (severity < 5.0) — informational:
isSalaryComplete = isSetupCompletealiases by reference equality; consider explicit wrappers so future divergence is trivially safe.aria-label="Progress: 25%"onCircularProgressmay double-announce with the role=progressbar + aria-valuenow. UX agent recommendsaria-label="Section progress"(static) and rely onaria-valuenowfor the numeric value.CurrentSectionListswitch has no exhaustiveness guard (matches the pre-existingCurrentSteppattern — not a regression).- PR description claims the percentage formula “mirrors the Salary Calculator (
useStepList)”, butuseStepList.ts:94-97does notMath.round; PDS does. Imperceptible to users; update PR description for accuracy. - New goal shows 25%/33% before any user input. Matches existing Salary Calculator pattern, so not a regression — flagged for future product consideration only.
Dependency impact (no breaking changes)
SectionList(shared) — 8 consumers;announceCompletionprop added with defaultfalse, fully backward-compatible.usePdsGoalCalculator— 25+ consumers;percentCompleteadded (non-breaking).PanelLayout— 8 consumers;aria-currentconditionally applied (non-breaking).PdsGoalCalculatorSectiontype removed — zero remaining references.useStepList.ts:94-97confirmed as the Salary Calculator pattern the PR mirrors (moduloMath.round).
Auto-approval
Risk score = 10 (rule-based) so the auto-approve workflow will not trigger. A human reviewer should look at the financial-domain semantic question (“$0 = complete”) and decide whether to address now or in a follow-up.
|
Preview branch generated at https://MPDX-9540.d3dytjb8adxkk5.amplifyapp.com |
zweatshirt
left a comment
There was a problem hiding this comment.
It's looking good Will! There are a few areas we can make changes for quick wins.
| 0) | ||
| : '' | ||
| } | ||
| value={totalFourOThreeBContributionPercentage} |
| const percentComplete = Math.round( | ||
| safeProgressRatio(stepIndex + 1, steps.length) * 100, | ||
| ); |
There was a problem hiding this comment.
Should we memoize this?
There was a problem hiding this comment.
I think it was at one point. Claude suggested it wasn't worth the overhead. Either way I think is fine, if you feel strongly about it we can memoize it though.
…al Calculator Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@zweatshirt sorry to force push on you! |
zweatshirt
left a comment
There was a problem hiding this comment.
Nice job Will, the PDS Calculator is so close to being done now
| @@ -77,15 +77,26 @@ describe('calculatePdsGoalTotal', () => { | |||
| }); | |||
|
|
|||
| it('excludes reimbursable expenses and 403b when formType is Simple', () => { | |||
There was a problem hiding this comment.
Awesome. Thanks for updating this test, I feel like it is much better. I know it may be a bit of a pain, but I'm wondering if it's best that we also have a test that it does include 403b and reimbursable?
Description
percentComplete={0}in the PDS Goal Calculator with a step-based progression so the percentage advances each time the user moves to the next step.useStepsto accept the active step and mark every section in the current step (and earlier steps) as complete, so the sidebar's filled blue dot reflects where the user currently is in the form.useStepList→((currentIndex + 1) / steps.length) * 100).Testing
/accountLists/[id]/hrTools/pdsGoalCalculator/[pdsGoalId])Checklist:
/pr-reviewcommand locally and fixed any relevant suggestions