Skip to content

MPDX-9618 Link Ministry Expenses step to MPDX MPGA report#1801

Merged
wjames111 merged 3 commits into
mainfrom
MPDX-9618
May 22, 2026
Merged

MPDX-9618 Link Ministry Expenses step to MPDX MPGA report#1801
wjames111 merged 3 commits into
mainfrom
MPDX-9618

Conversation

@wjames111
Copy link
Copy Markdown
Contributor

Description

  • Replace the external StaffWeb MPGA link in the (MPD) Goal Calculator's Ministry Expenses step with an in-app link to the MPDX MPGA report (/accountLists/{id}/reports/mpgaIncomeExpenses).
  • Use Link component={NextLink} for client-side routing and useAccountListId() to build the path, consistent with SummaryReport.tsx.
  • Drop the "go to the Income/Expenses tab" guidance since the MPDX MPGA page already opens directly to the Income/Expense view.

Jira: MPDX-9618

Testing

  • Open an account list and go to HR Tools → Goal Calculator and open a goal
  • Navigate to the Ministry Expenses step
  • Confirm the instructions paragraph at the top contains a link reading "MPGA report" (not "MPGA tool on StaffWeb")
  • Click the link and verify it routes in-app to Reports → Ministry Partner Giving Analysis for the same account list (no StaffWeb redirect, no full page reload)
  • Confirm the link is keyboard-focusable and activates with Enter

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

Replace the external StaffWeb MPGA URL with the in-app
/reports/mpgaIncomeExpenses route so users stay in MPDX when
looking up their averages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against 7469fb8

No significant changes found

@wjames111 wjames111 self-assigned this May 22, 2026
@wjames111 wjames111 added On Staging Will be merged to the staging branch by Github Actions Preview Environment Add this label to create an Amplify Preview labels May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Preview branch generated at https://MPDX-9618.d3dytjb8adxkk5.amplifyapp.com

Copy link
Copy Markdown
Contributor Author

@wjames111 wjames111 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 Code Review — Verdict: APPROVED WITH SUGGESTIONS

Risk: 1/10 (LOW) · Files: 1 · Lines: +9 / −4 · Mode: standard · Agents: 5

Nice, tight refactor — replacing an external StaffWeb link with an internal Next.js route and matching the codebase's established Link component={NextLink} and useAccountListId() ?? '' conventions. Verified that the target route pages/accountLists/[accountListId]/reports/mpgaIncomeExpenses/index.page.tsx exists.

Summary of findings

Severity Count Notes
Critical / High blockers 0 None
Important (7.0–7.9) 1 Instruction text references a section label that doesn't exist on the destination
Medium (5.0–6.9) 1 Defensive ?? '' fallback produces a malformed URL when accountListId is undefined
Suggestions (< 5.0) 3 Translation key churn (run yarn extract), anchor text wording, impersonation edge case

Recommended before merge

Fix finding #1 (the “Ministry Expenses section” copy mismatch — see the inline comment on line 36). The destination report's labeled sections are Summary, Expenses Categories, Income, Expenses, and Monthly Summary — there is no section literally named Ministry Expenses. Ministry does appear as one of four slices inside the Expenses Categories pie chart, so the data is reachable, but the wording will send users hunting for the wrong label.

Pattern compliance (verified)

  • Named exports only ✓
  • Link component={NextLink} matches 9+ existing usages in src/components/HrTools/**
  • useAccountListId() ?? '' matches 7+ existing usages in src/components/HrTools/GoalCalculator/**
  • All user-visible strings wrapped in <Trans t={t}>
  • No any, no @ts-ignore, no non-null assertions ✓
  • Target route exists and is reachable ✓

Auto-approval eligibility

This PR qualifies for auto-approval (LOW risk, APPROVED_WITH_SUGGESTIONS). To dismiss any non-blocking finding you disagree with, reply /dismiss: <reason> on the inline comment.

Comment thread src/components/HrTools/GoalCalculator/MinistryExpenses/MinistryExpensesStep.tsx Outdated
return (
<InstructionsWrapper>
<Typography variant="body2">
<Trans t={t}>
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` to refresh the translation key.**

The <Trans> body text changed (link anchor went from MPGA tool on StaffWeb to MPGA report, and the trailing sentence was shortened). Since i18next-parser.config.js uses keySeparator: false and defaultValue: key, the English source text IS the translation key — so the old entry in public/locales/en/translation.json will become orphaned after this PR lands.

Action: run yarn extract and commit the regenerated public/locales/en/translation.json. Non-English locales will fall back to the source text until CrowdIn re-syncs (normal flow).

Comment thread src/components/HrTools/GoalCalculator/MinistryExpenses/MinistryExpensesStep.tsx Outdated
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: APPROVED_WITH_SUGGESTIONS (suggestions posted, no blockers)

This PR was auto-approved because:

  • The multi-agent AI review determined it is low risk
  • No blocking issues were found
  • All suggestions have been posted as review comments for the developer to consider

If you believe this PR needs human review, dismiss this approval and request a review manually.

@wjames111 wjames111 enabled auto-merge (squash) May 22, 2026 19:00
@wjames111 wjames111 merged commit cb6a4ac into main May 22, 2026
24 checks passed
@wjames111 wjames111 deleted the MPDX-9618 branch May 22, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Staging Will be merged to the staging branch by Github Actions 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