Skip to content

[No-Jira] Add internal_gift to localized record#1941

Merged
kegrimes merged 1 commit into
mainfrom
update-subcategory-enums
Jul 24, 2026
Merged

[No-Jira] Add internal_gift to localized record#1941
kegrimes merged 1 commit into
mainfrom
update-subcategory-enums

Conversation

@kegrimes

@kegrimes kegrimes commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

internal_gift is a subcategory under Donations, however, it does not exist on MPDX. I already added it as an enum in the backend, so we need to add it to the subcategory localization record.

Once the backend PR merges, I will remove the "Staging API" label!

Testing

  • Go to /reports/staffExpense or /reports/mpgaIncomeExpenses
  • Check that nothing is broken

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 /quality:agent-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

@kegrimes kegrimes self-assigned this Jul 24, 2026
@kegrimes kegrimes added Preview Environment Add this label to create an Amplify Preview Staging API Run GraphQL codegen against the staging API labels Jul 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Preview branch generated at https://update-subcategory-enums.d3dytjb8adxkk5.amplifyapp.com

@github-actions

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against b5bba08

No significant changes found

@kegrimes kegrimes left a comment

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.

Multi-Agent Code Review — PR #1941

Verdict: CLEAN ✅ · Risk 1/10 (LOW) · Agents: Architecture, Testing, Standards, Financial Reporting (standard mode)

One-line addition of InternalGift to the exhaustive Record<StaffExpensesSubCategoryEnum, string> in getLocalizedSubCategory. It is type-safe by construction (the total Record forces exhaustiveness), i18n-compliant (t('Internal Gift'), static extractable key), and idiomatic — an exact structural clone of its sibling entries. No blockers, no important issues.

Findings: 0 critical · 0 high · 0 important · 1 suggestion (informational)

Suggestion (severity < 5 — informational)

  • Release sequencing (see inline comment): the referenced enum value is codegen-generated. INTERNAL_GIFT exists on staging (local lint:ts passes), but CI codegen defaults API_URL to production and only targets staging under the merge-blocking Staging API label. CI lint:ts will fail until INTERNAL_GIFT ships to the production API. Code is correct; only merge timing depends on the API deploy.

Pre-existing (informational)

  • transformStaffExpenseEnums.ts has no colocated test — the whole helper is untested. Predates this PR; a dedicated test for a single static label entry isn't warranted (the exhaustive Record type is the correctness guarantee). Consider a follow-up if broader coverage is desired.
Agent Critical High Important Suggestions Confidence
Architecture 0 0 0 1 High
Testing 0 0 0 0 High
Standards 0 0 0 0 High
Financial Reporting 0 0 0 0 (N/A) High

Comment thread src/components/Reports/Shared/Helpers/transformStaffExpenseEnums.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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.

@kegrimes kegrimes removed the Staging API Run GraphQL codegen against the staging API label Jul 24, 2026
@kegrimes
kegrimes merged commit 8b80918 into main Jul 24, 2026
80 of 84 checks passed
@kegrimes
kegrimes deleted the update-subcategory-enums branch July 24, 2026 13:16
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