Skip to content

MPDX-9653 - Simplify From Account -> To Account behavior in Savings Fund Transfer#1812

Merged
zweatshirt merged 1 commit into
mainfrom
MPDX-9653
Jun 2, 2026
Merged

MPDX-9653 - Simplify From Account -> To Account behavior in Savings Fund Transfer#1812
zweatshirt merged 1 commit into
mainfrom
MPDX-9653

Conversation

@zweatshirt

@zweatshirt zweatshirt commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

  • Ensures that the 'From' account is disabled, and that the 'Transfer to' button is removed to fulfill ticket requirements.
    • This heavily implies the ability to swap From and To accounts in the selects should be removed as well.
  • https://jira.cru.org/browse/MPDX-9653

Testing

  • Go to Savings Fund Transfer on any test account
  • Test the behavior of selecting the From button, ensuring that a user cannot change the From account.
  • Ensure that the To button is removed from every card.

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

@zweatshirt zweatshirt self-assigned this May 29, 2026
@zweatshirt zweatshirt added the Preview Environment Add this label to create an Amplify Preview label May 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against 01f7baf

No significant changes found

@zweatshirt zweatshirt changed the title MPDX-9653 MPDX-9653 - Simplify From Account -> To Account behavior in Savings Fund Transfer May 29, 2026
@zweatshirt zweatshirt marked this pull request as ready for review May 29, 2026 18:31
@zweatshirt zweatshirt force-pushed the MPDX-9653 branch 2 times, most recently from 141d84e to 05e8a55 Compare May 29, 2026 21:16

@zweatshirt zweatshirt 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 #1812

Mode: standard · Risk: LOW (3/10) · Verdict: CLEAN · Blockers: 0

Locks the From account in the Savings Fund Transfer modal (read-only, full-contrast Select with the dropdown arrow hidden) and removes the "TRANSFER TO" entry point from the balance card. Net deletion; mostly simplification. The full SavingsFundTransfer suite passes and lint:ts is clean.

Resolved since earlier iterations

The From account was briefly a disabled Select, which greyed out the must-read balance and flattened the negative-balance red. Switching to readOnly restores full contrast (and keeps the value in the tab order / a11y tree so screen-reader users can still read the source fund + balance), while the hidden arrow + read-only behavior keep it locked. Verified: clicking it opens no menu.

Suggestions (informational — severity < 5, none block)

[Suggestion] src/components/HrTools/SavingsFundTransfer/TransferModal/TransferModal.tsx — From Select reserved arrow gutter (3.5/10, UX)
With the arrow hidden via IconComponent={() => null}, MUI still reserves right-padding on .MuiSelect-select, so the From value sits with dead space vs the To field. Optional: sx={{ '& .MuiSelect-select': { pr: '14px !important' } }}.

[Suggestion] src/components/HrTools/SavingsFundTransfer/TransferModal/TransferModal.test.tsx — lock test only covers mouse (4.0/10, Testing)
The "locks the From Account" test clicks and asserts no listbox; a MUI Select can also open via Enter/ArrowDown. readOnly blocks that too, but it isn't pinned by a test. Optional: add userEvent.type(fromAccount, '{enter}') then assert no listbox.

[Suggestion] src/components/HrTools/SavingsFundTransfer/TransferModal/TransferModal.test.tsxfindBy convention (3.5/10, Testing)
The synchronous getByRole('option', { name: /staff savings/i }) after the waitFor would be marginally more idiomatic as await findByRole(...). Not flaky as-is.

[Suggestion] src/components/HrTools/SavingsFundTransfer/TransferModal/TransferModal.tsx — Note field disabled={!isNew} dropped (4.5/10, Architecture)
The Note field is now editable in edit mode, but updateRecurringTransfer has no description field, so an edit-mode note change would be silently dropped. Proven unreachable today (editable rows are always Monthly; the Note renders only for OneTime) — latent debt, not a live bug. Consider restoring disabled={!isNew} to make intent explicit.

Clean dimensions

  • Financial: no money/balance/date logic changed; deficit-warning math still keys on the correct source fund.
  • Standards: named exports, no orphaned imports, lint:ci 0 errors, IconComponent={() => null} trips no rule.
  • Architecture: net technical-debt reduction (swap + dual-direction complexity removed).
  • Security / Data Integrity: not triggered (no api/auth/env/workflow or graphql/cache/schema changes).

@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 (3/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.

@zweatshirt zweatshirt requested a review from kegrimes May 29, 2026 21:45
@zweatshirt

zweatshirt commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

@kegrimes This was a suggested change by Scott. I kind of liked the original design more, and so made the suggestion to him that we keep the original design. I'll wait for his response before merging this. I was curious what you think of this visually and whether you think it satisfies the ticket description

@kegrimes kegrimes 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.

I think this looks very good Zach!

Honestly, I did like the original design a lot, but I understand why he would want this change. It was really repetitive to have 6 buttons for 3 different fund types. I think that in terms of money, most people would be thinking in the direction of "transfer from --> transfer to" and not really the other way around.

disabled={!isNew}
onChange={handleChange}
onBlur={handleBlur}
readOnly

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.

Could we add something like this to make it unclickable?

Suggested change
readOnly
readOnly
tabIndex={-1}
sx={{ pointerEvents: 'none' }}

@zweatshirt zweatshirt Jun 1, 2026

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.

I am leaning toward making it clickable (hoverable) for accessibility if that's ok. Otherwise users with screen readers can't know what the from account is. At least that was the intention. With that being said, I should test what the screen reader actually produces on hover here.

Comment thread src/components/HrTools/SavingsFundTransfer/TransferModal/TransferModal.tsx Outdated
@zweatshirt zweatshirt merged commit 8544dce into main Jun 2, 2026
42 of 43 checks passed
@zweatshirt zweatshirt deleted the MPDX-9653 branch June 2, 2026 17:04
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.

2 participants