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
Reports - Reject report level is not shown when bulk rejecting expense #86836
Version Number: 9.3.51-1 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#84853 Email or phone of affected tester (no customers):soidnjonjdisojosj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Search
Action Performed:
Precondition:
User A invites User B and User C to the workspace.
Edit default approval workflow so that User B is the first approver and User A is the last approver.
Go to staging.new.expensify.com
[User C] Create an expense in workspace chat and click Submit.
[User B] Open User C's expense report and click Approve.
[User A] Open User C's expense report.
[User A] Click More > Reject.
→ Reject report level is shown - Expected.
[User A] Go to Reports > Expenses.
[User A] Select User C's expense via checkbox.
[User A] Click dropdown button > Reject.
Expected Result:
Reject report level will be shown when bulk rejecting expense.
Actual Result:
Reject report level is not shown when bulk rejecting expense.
This issue also happens when user rejects one of the expenses in multi-expense report, reject report level is missing.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
The PR introduced a new report-level rejection flow that includes user selection (last approver vs submitter), but the implementation is incomplete. The new flow was only integrated for single-report rejection via MoneyReportHeader, but bulk rejection from Search still uses the old flow which bypasses the new UI.
The fix should be straightforward: update the bulk rejection flow in Search to also navigate through the new RejectExpenseReportPage when rejecting full reports, or alternatively, add the user selection logic to the existing SearchRejectReasonPage.
Labels: No label changes needed - this is a frontend bug and DeployBlockerCash should remain.
Detailed Analysis
Evidence
PR #84853 added a comprehensive report-level rejection feature that includes:
New route: REJECT_EXPENSE_REPORT → RejectExpenseReportPage
User selection UI allowing rejectors to choose between:
Last approver (if there was a previous FORWARDED action)
Submitter (report owner)
New form: REPORT_REJECT_FORM with comment and target selection
The PR modified MoneyReportHeader.tsx to navigate to this new page:
PR #84853 added a new RejectExpenseReportPage that allows an approver to choose who to return a rejected report to (previous approver or submitter). However, this page is only navigated to from the report header's three-dot menu (MoneyReportHeader.tsx:2148-2162).
The bulk reject flows from Search use a completely different code path:
Search bulk actions (useSearchBulkActions.ts:961-984) navigates to SEARCH_REJECT_REASON_RHP → renders SearchRejectReasonPage → calls rejectMoneyRequestsOnSearch() which performs transaction-level rejection (rejectMoneyRequest/rejectMoneyRequestInBulk).
Selection mode within a report (useSelectedTransactionsActions.ts:290-306) navigates to SEARCH_MONEY_REQUEST_REPORT_REJECT_TRANSACTIONS → same SearchRejectReasonPage → same transaction-level rejection.
Neither of these flows navigates to RejectExpenseReportPage or calls rejectExpenseReport(). They always perform transaction-level rejection, so the user never sees the target selection UI (previous approver vs submitter).
What changes do you think we should make in order to solve the problem?
The bulk reject flows need to detect when the rejection is effectively a report-level reject and navigate to RejectExpenseReportPage instead of SearchRejectReasonPage.
Specifically:
In useSearchBulkActions.ts: When the selected expenses all belong to a single report where canRejectReportAction returns true, the onSelected handler for the reject option should navigate to ROUTES.REJECT_EXPENSE_REPORT.getRoute(reportID) instead of ROUTES.SEARCH_REJECT_REASON_RHP.
In useSelectedTransactionsActions.ts: Similarly, when the selection represents a report-level reject scenario (user is manager, report is processing), navigate to ROUTES.REJECT_EXPENSE_REPORT.getRoute(reportID) instead of ROUTES.SEARCH_MONEY_REQUEST_REPORT_REJECT_TRANSACTIONS.
This ensures the report-level reject page with target selection is shown in all contexts where the user is performing a report-level rejection, not just from the report header menu.
What alternative solutions did you explore? (Optional)
An alternative would be to add the target selection (previous approver vs submitter) directly into SearchRejectReasonPage. However, this would duplicate logic already in RejectExpenseReportPage and create maintenance burden. Reusing the existing page by navigating to it is cleaner and consistent.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Apr 1, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84853
melvin-bot commentedon Apr 1, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 1, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Apr 1, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #84853 - "feat: Release 3 - add reject report level" by @truph01 (High confidence)
Related Issues: N/A
Recommendation: ROLL FORWARD
The PR introduced a new report-level rejection flow that includes user selection (last approver vs submitter), but the implementation is incomplete. The new flow was only integrated for single-report rejection via
MoneyReportHeader, but bulk rejection from Search still uses the old flow which bypasses the new UI.The fix should be straightforward: update the bulk rejection flow in Search to also navigate through the new
RejectExpenseReportPagewhen rejecting full reports, or alternatively, add the user selection logic to the existingSearchRejectReasonPage.Labels: No label changes needed - this is a frontend bug and
DeployBlockerCashshould remain.Detailed Analysis
Evidence
PR #84853 added a comprehensive report-level rejection feature that includes:
REJECT_EXPENSE_REPORT→RejectExpenseReportPageREPORT_REJECT_FORMwith comment and target selectionThe PR modified
MoneyReportHeader.tsxto navigate to this new page:Root Cause
The bug occurs because the bulk rejection flow was not updated.
When rejecting from Search (bulk or single expense):
ROUTES.SEARCH_REJECT_REASON_RHP(line 979 inuseSearchBulkActions.ts)SearchRejectReasonPagewhich only asks for a commentrejectMoneyRequestsOnSearchwhich does transaction-level rejectionWhen rejecting from the report header (single report):
ROUTES.REJECT_EXPENSE_REPORTRejectExpenseReportPagewith user selection UIVerification
Confirmed that:
/src/pages/RejectExpenseReportPage.tsx(new file with user selection)/src/components/MoneyReportHeader.tsxto use the new route/src/hooks/useSearchBulkActions.tswas NOT modified to use the new flowFiles Affected
/src/pages/RejectExpenseReportPage.tsx- New page with user selection (only used from MoneyReportHeader)/src/hooks/useSearchBulkActions.ts- Bulk rejection flow (not updated, still uses old path)/src/pages/Search/SearchRejectReasonPage.tsx- Old rejection page (still used for bulk, missing user selection)MelvinBot commentedon Apr 1, 2026
Proposal
What is the root cause of that problem?
PR #84853 added a new
RejectExpenseReportPagethat allows an approver to choose who to return a rejected report to (previous approver or submitter). However, this page is only navigated to from the report header's three-dot menu (MoneyReportHeader.tsx:2148-2162).The bulk reject flows from Search use a completely different code path:
useSearchBulkActions.ts:961-984) navigates toSEARCH_REJECT_REASON_RHP→ rendersSearchRejectReasonPage→ callsrejectMoneyRequestsOnSearch()which performs transaction-level rejection (rejectMoneyRequest/rejectMoneyRequestInBulk).useSelectedTransactionsActions.ts:290-306) navigates toSEARCH_MONEY_REQUEST_REPORT_REJECT_TRANSACTIONS→ sameSearchRejectReasonPage→ same transaction-level rejection.Neither of these flows navigates to
RejectExpenseReportPageor callsrejectExpenseReport(). They always perform transaction-level rejection, so the user never sees the target selection UI (previous approver vs submitter).What changes do you think we should make in order to solve the problem?
The bulk reject flows need to detect when the rejection is effectively a report-level reject and navigate to
RejectExpenseReportPageinstead ofSearchRejectReasonPage.Specifically:
In
useSearchBulkActions.ts: When the selected expenses all belong to a single report wherecanRejectReportActionreturns true, theonSelectedhandler for the reject option should navigate toROUTES.REJECT_EXPENSE_REPORT.getRoute(reportID)instead ofROUTES.SEARCH_REJECT_REASON_RHP.In
useSelectedTransactionsActions.ts: Similarly, when the selection represents a report-level reject scenario (user is manager, report is processing), navigate toROUTES.REJECT_EXPENSE_REPORT.getRoute(reportID)instead ofROUTES.SEARCH_MONEY_REQUEST_REPORT_REJECT_TRANSACTIONS.This ensures the report-level reject page with target selection is shown in all contexts where the user is performing a report-level rejection, not just from the report header menu.
What alternative solutions did you explore? (Optional)
An alternative would be to add the target selection (previous approver vs submitter) directly into
SearchRejectReasonPage. However, this would duplicate logic already inRejectExpenseReportPageand create maintenance burden. Reusing the existing page by navigating to it is cleaner and consistent.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.lakchote commentedon Apr 1, 2026
Not planned for the moment. We can close this one.
cc @garrettmknight