Skip to content

[MPDX-10044] Stop flagging pre-history-window months as failed transfers - #2060

Draft
frett wants to merge 1 commit into
mainfrom
MPDX-10044-history-window-failed-transfers
Draft

frett wants to merge 1 commit into
mainfrom
MPDX-10044-history-window-failed-transfers

Conversation

@frett

@frett frett commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Description

SAA's transfer history only covers about the last 12 months, but the missed-month scan in filteredTransfers started at recurringStart. For a recurring transfer that started more than a year ago, the older months had no history rows, so each one showed up as a failed transfer (red badge + Failed row in the modal) even though it ran fine.

Confirmed against SAA: TransferList defaults transacted_at_start to 1.year.ago.beginning_of_month and honors an explicit value, and a failed recurring attempt creates no record at all, so the client can't learn about real failures from the data. This keeps the client-side inference and just bounds it to the fetched window.

  • TransfersPage computes the window start (start of the month one year ago, the same default SAA and mpdx_api use), sends it to ReportsSavingsFundTransfer as transactedAtStart, and passes it to filteredTransfers. Mutations refetch by operation name, so they reuse the same variables.
  • filteredTransfers takes a historyStart and begins the missed-month scan at the first monthly occurrence on or after it, stepping in whole months from recurringStart so the failed dates shown in the modal keep the schedule's day of the month.
  • Rows whose recurring transfer started before the window are flagged historyTruncated. For those rows only, FailedTransferModal adds a note that just the last 12 months of transfer history are shown, so the list doesn't look like it starts mid-stream for no reason. Transfers that fit entirely inside the window get no note.

Note: yarn extract produces a large unrelated diff on main right now, so only the one new string was added to translation.json by hand.

Follow-up worth filing: have SAA record and return missed recurring occurrences directly so the client can drop the inference entirely.

Checklist:

  • Tests, typecheck, and lint pass locally

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against df619f6

No significant changes found

SAA only returns about the last year of transfer history, but the
missed-month scan in filteredTransfers started at recurringStart. A
recurring transfer that started more than a year ago had no rows for
its older months, so every one of them was shown as a failed transfer
even when it ran fine.

- Have TransfersPage compute the history window start (start of the
  month one year ago, matching the SAA/mpdx_api default), send it to
  the query as transactedAtStart, and pass it to filteredTransfers
- Begin the missed-month scan at the first monthly occurrence on or
  after that window start, stepping in whole months from recurringStart
  so the failed dates keep the schedule's day of the month
- Flag rows whose recurring transfer started before the window as
  historyTruncated, and note in the failed-transfer modal for those
  rows only that just the last 12 months of history are shown

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@frett
frett force-pushed the MPDX-10044-history-window-failed-transfers branch from 594bb10 to 09d5af2 Compare September 18, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant