You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-11-09] [$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals) #102977
The selection-mode pay hold menu. Call showHoldMenu inside the onHoldMenuOpen handlers in useSelectionModeReportActions.ts:106-112 and :249-254. Pass requestType, paymentType, methodID, the amounts, and onConfirm. Forward the currently dropped _onConfirm, the way the header dropdown does. transactionCount currently includes expenses being deleted, so pass it in or accept the small difference.
The report-preview pay hold menu. Call showHoldMenu directly from PayActionButton.confirmPayment. Compute the amounts with getNonHeldAndFullAmount, pass the report IDs (the wrapper reads the reports from Onyx), and pass onConfirm: startAnimation.
Code to remove
src/components/ProcessMoneyReportHoldMenu.tsx. Point the type-only ActionHandledType imports in useSelectionModePayment.ts and useSelectionModeReportActions.ts at @hooks/useHoldMenuSubmit.
In useSelectionModeReportActions.ts: the isHoldMenuVisible, paymentType, requestType, and selectedVBBAToPayFromHoldMenu state (L85-88), plus handleHoldMenuClose.
In SelectionToolbar: the hold-menu block and the values it reads from the hook.
In the report preview: ReportPreviewHoldMenu.tsx, its use in MoneyRequestReportPreviewBody.tsx, and the holdMenu state and ReportPreviewHoldMenuContext in MoneyRequestReportPreviewProvider.tsx and MoneyRequestReportPreviewContext.ts.
Tests to update
tests/ui/components/ReportPreviewHoldMenuTest.tsx: delete it or rewrite it.
tests/ui/MoneyRequestReportPreview.test.tsx: mock useHoldMenuModal instead of ProcessMoneyReportHoldMenu.
tests/unit/hooks/useSelectionModeReportActions.test.ts: it checks isHoldMenuVisible, handleHoldMenuClose, and handleHoldMenuConfirm.
Gotchas
Amounts become a snapshot taken at show time. The header and ExpenseReportListItem already rely on this.
Unmount safety improves. Confirming currently clears the selection and unmounts the toolbar while the modal closes. A global modal survives that.
Acceptance criteria
Paying a report with held expenses shows the hold menu from both selection mode and the report preview, and both "pay only" and "pay full amount" behave as before.
ProcessMoneyReportHoldMenu and ReportPreviewHoldMenu are deleted.
Existing relevant tests pass. Add or update coverage where needed.
It moves both callers in the issue to useHoldMenuModal().showHoldMenu. It also deletes ProcessMoneyReportHoldMenu, ReportPreviewHoldMenu, and the related state and context.
Selection mode: both onHoldMenuOpen handlers now open the global modal. The dropped lifecycle onConfirm is now forwarded, as the header dropdown does.
Report preview:PayActionButton.confirmPayment opens the global modal directly with onConfirm: startAnimation.
iOS: both callers wait one animation frame before opening, matching the header.
One expected difference: selection mode's transactionCount now excludes expenses pending deletion.
Checks: typecheck, ESLint, and the React Compiler check pass. Related Jest suites pass: 23 suites, 495 tests.
Not yet tested: the manual pay flow. An automated web run failed because the test session showed a blank page before reaching the app. spell-changed could not run in the shallow clone.
changed the title [-][Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/-][+][$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/+]on Oct 23, 2026
changed the title [-][$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/-][+][Due for payment 2026-11-09] [$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/+]on Nov 2, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.27-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-11-09. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
melvin-bot commentedon Oct 8, 2026
melvin-bot commentedon Oct 12, 2026
ZhenjaHorbach commentedon Oct 13, 2026
melvin-bot commentedon Oct 16, 2026
melvin-bot commentedon Oct 20, 2026
roryabraham commentedon Oct 20, 2026
Making this a weekly
ZhenjaHorbach commentedon Oct 21, 2026
@MelvinBot
Create the PR to migrate all modals from the issue description
MelvinBot commentedon Oct 21, 2026
🤖 Draft PR created: Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview
Please mark it as "Ready for review" or ask me to do that for you when it is ready for review.
It moves both callers in the issue to
useHoldMenuModal().showHoldMenu. It also deletesProcessMoneyReportHoldMenu,ReportPreviewHoldMenu, and the related state and context.onHoldMenuOpenhandlers now open the global modal. The dropped lifecycleonConfirmis now forwarded, as the header dropdown does.PayActionButton.confirmPaymentopens the global modal directly withonConfirm: startAnimation.One expected difference: selection mode's
transactionCountnow excludes expenses pending deletion.Checks: typecheck, ESLint, and the React Compiler check pass. Related Jest suites pass: 23 suites, 495 tests.
Not yet tested: the manual pay flow. An automated web run failed because the test session showed a blank page before reaching the app.
spell-changedcould not run in the shallow clone.[-][Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/-][+][$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/+]melvin-bot commentedon Oct 23, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022113592031897211794
[-][$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/-][+][Due for payment 2026-11-09] [$175] [Batch 3] Replace ProcessMoneyReportHoldMenu with useHoldMenuModal in SelectionToolbar and report preview (2 modals)[/+]melvin-bot commentedon Nov 2, 2026
@ZhenjaHorbach
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.27-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-11-09. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]