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
[Insights] Reports - Expense report does not open #80814
Version Number: v9.3.11-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://test-management.browserstack.com/projects/2219752/folder/13176730/test-cases/41237110 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Windows 11, Chrome App Component: Other
👋 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.
Classification: Frontend bug Causing PR: #80684 - "Add support for groupBy week in Search" by @mountiny (High confidence) Related Issues: None
Recommendation: REVERT
PR #80684 introduced a logic error that breaks expense report navigation from the Reports page.
Labels: No label changes needed - issue is correctly labeled as DeployBlockerCash
Detailed Analysis
Evidence
PR #80684 was merged at 2026-01-28T22:20:07Z, just 27 minutes before the staging deploy was cut at 2026-01-28T22:47:05Z. The PR added support for grouping by week in Search functionality.
The PR modified src/components/Search/index.tsx and introduced a critical bug in the onSelectRow callback function around line 937-939:
// After handling all group types, item should be TransactionListItemType or ReportActionListItemTypeif(!isTransactionItem&&!isReportActionListItemType(item)){return;}
This early return check was placed AFTER handling various group types (member, card, withdrawal, category, merchant, tag, month, week) but BEFORE the crucial check for TransactionGroupListItemType (expense reports) at line 965.
Verification
When a user clicks on an expense report from the Reports > Reports page:
The item is of type TransactionGroupListItemType (an expense report)
The code processes all the specific group type checks (lines 809-934)
At line 937, the code checks if the item is NOT a transaction item AND NOT a report action
Since TransactionGroupListItemType items are neither of those types, the function returns early
The navigation logic at line 965 that would handle TransactionGroupListItemType is never reached
Result: The report does not open - exactly matching the reported bug
The affected file: /home/runner/work/App/App/src/components/Search/index.tsx
Root Cause
The developer added a type-safety check comment "After handling all group types, item should be TransactionListItemType or ReportActionListItemType" and an early return, but this assumption is incorrect. The function still needs to handle TransactionGroupListItemType items (expense reports), which are processed later in the code at line 965.
The early return at line 937-939 prevents all expense reports from being opened when clicked from the Reports page.
👋 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 investigation found that PR #80684 introduced a logic error in /home/runner/work/App/App/src/components/Search/index.tsx where an early return statement was added that prevented TransactionGroupListItemType items (expense reports) from being handled properly. This caused expense reports to not open when clicked from the Reports page.
The revert removes this problematic code and should restore the expected functionality.
No further action needed - the blocker label should remain until the revert is verified on staging.
The logic using prevReportIDFromRoute and isInitialMountRef may have a race condition or edge case where:
On first render, prevReportIDFromRoute from usePrevious could return the same value as reportIDFromRoute in some navigation scenarios (especially when navigating from within Reports)
If prevReportIDFromRoute === reportIDFromRoute on initial navigation, isInitialMountRef.current won't be reset to true
Combined with visibleTransactions.length > 2, this could cause openReport to never be called
Add support for groupBy week in Search #80684 - "Add support for groupBy week in Search" - This was already reverted via #80824, suggesting it caused issues. If the revert wasn't complete or introduced its own issues, it could be related.
Recommendation
Start by investigating PR #80613 since it directly touches the report opening logic. The usePrevious hook behavior when navigating from within the same screen type could be the root cause.
Most Likely Offending PR: #80613 - "Fix SearchMoneyRequestReport page calls openReport at least once"
This PR directly modified SearchMoneyRequestReportPage.tsx, which is the exact page that handles opening expense reports from the Reports section.
I agree with @ZhenjaHorbach. My PR isn't related to this issue because the report itself doesn't even open. For my changes to take effect, the report needs to open at least for a millisecond. The investigation should probably focus on the search page, since the navigation to the report is supposed to happen there upon clicking the button.
Activity
melvin-bot commentedon Jan 28, 2026
Triggered auto assignment to @marcochavezf (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jan 28, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jan 28, 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 Jan 28, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #80684 - "Add support for groupBy week in Search" by @mountiny (High confidence)
Related Issues: None
Recommendation: REVERT
PR #80684 introduced a logic error that breaks expense report navigation from the Reports page.
Labels: No label changes needed - issue is correctly labeled as
DeployBlockerCashDetailed Analysis
Evidence
PR #80684 was merged at 2026-01-28T22:20:07Z, just 27 minutes before the staging deploy was cut at 2026-01-28T22:47:05Z. The PR added support for grouping by week in Search functionality.
The PR modified
src/components/Search/index.tsxand introduced a critical bug in theonSelectRowcallback function around line 937-939:This early return check was placed AFTER handling various group types (member, card, withdrawal, category, merchant, tag, month, week) but BEFORE the crucial check for
TransactionGroupListItemType(expense reports) at line 965.Verification
When a user clicks on an expense report from the Reports > Reports page:
TransactionGroupListItemType(an expense report)TransactionGroupListItemTypeitems are neither of those types, the function returns earlyTransactionGroupListItemTypeis never reachedThe affected file:
/home/runner/work/App/App/src/components/Search/index.tsxRoot Cause
The developer added a type-safety check comment "After handling all group types, item should be TransactionListItemType or ReportActionListItemType" and an early return, but this assumption is incorrect. The function still needs to handle
TransactionGroupListItemTypeitems (expense reports), which are processed later in the code at line 965.The early return at line 937-939 prevents all expense reports from being opened when clicked from the Reports page.
puneetlath commentedon Jan 28, 2026
Drafted a revert to see if it's definitely caused by that PR: #80824
8 remaining items
melvin-bot commentedon Jan 29, 2026
Triggered auto assignment to @flodnv (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jan 29, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jan 29, 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 Jan 29, 2026
Investigation Status Update
The previous investigation by OSBotify was correct and the revert has been successfully merged.
Current Status:
DeployBlockerCashis presentClassification Confirmation: Frontend bug (App repository)
The investigation found that PR #80684 introduced a logic error in
/home/runner/work/App/App/src/components/Search/index.tsxwhere an early return statement was added that preventedTransactionGroupListItemTypeitems (expense reports) from being handled properly. This caused expense reports to not open when clicked from the Reports page.The revert removes this problematic code and should restore the expected functionality.
No further action needed - the blocker label should remain until the revert is verified on staging.
marcochavezf commentedon Jan 29, 2026
AI analysis:
Most Likely Offending PR: #80613 - "Fix SearchMoneyRequestReport page calls openReport at least once"
This PR directly modified
SearchMoneyRequestReportPage.tsx, which is the exact page that handles opening expense reports from the Reports section.The Changes Made
Original code:
New code:
Potential Issue
The logic using
prevReportIDFromRouteandisInitialMountRefmay have a race condition or edge case where:prevReportIDFromRoutefromusePreviouscould return the same value asreportIDFromRoutein some navigation scenarios (especially when navigating from within Reports)prevReportIDFromRoute === reportIDFromRouteon initial navigation,isInitialMountRef.currentwon't be reset totruevisibleTransactions.length > 2, this could causeopenReportto never be calledSecondary Suspects
[HomePage] Foundation: Add Home Navigation (1/2) - Core #80504 / [No QA][Home Page] Foundation: Add Home Navigation (2/2) - Rename the home directory to inbox #80571 - Home Navigation changes that significantly modified navigation components and routes. Could affect how the Reports section navigates to expense reports.
Add support for groupBy week in Search #80684 - "Add support for groupBy week in Search" - This was already reverted via
#80824, suggesting it caused issues. If the revert wasn't complete or introduced its own issues, it could be related.Recommendation
Start by investigating PR #80613 since it directly touches the report opening logic. The
usePrevioushook behavior when navigating from within the same screen type could be the root cause.cc @collectioneur @ZhenjaHorbach @blazejkustra
ZhenjaHorbach commentedon Jan 29, 2026
But a report (where we updated the code) was not even opened in the bug
So I'm not sure if that is related to our changes
But I actually can't reproduce to confirm this
cristipaval commentedon Jan 29, 2026
the revert PR should hit the staging soon
cristipaval commentedon Jan 29, 2026
we merged the revert yesterday but forgot to CP it 🤦♂️
Sorry!
neil-marcellini commentedon Jan 29, 2026
revert PR is on staging
collectioneur commentedon Jan 30, 2026
I agree with @ZhenjaHorbach. My PR isn't related to this issue because the report itself doesn't even open. For my changes to take effect, the report needs to open at least for a millisecond. The investigation should probably focus on the search page, since the navigation to the report is supposed to happen there upon clicking the button.
melvin-bot commentedon Jan 31, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.