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
Android - Reports - Expense row is not higlighted after creating expense #85640
Version Number: 9.3.39-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:#84910 Email or phone of affected tester (no customers):sdjsdjosijnsodiosd@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android 16 App Component: Search
Action Performed:
Launch Expensify app.
Go to Reports > Expenses.
Open FAB > Create expense > Manual.
Create a manual expense.
Expected Result:
Expense row will be highlighted.
Actual Result:
Expense row is not higlighted after creating expense.
👋 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: #84910 - "Optimize submit-to-Search navigation performance" by @JakubKorytko (High confidence) Related Issues: None
Recommendation: REVERT
PR #84910 refactored the highlight logic in SearchList but introduced a bug by omitting canSelectMultiple from the renderItem dependency array, causing stale closure references that break the expense row highlighting functionality.
Labels: Keeping DeployBlockerCash (frontend bug in App). No label changes needed as the issue is correctly labeled.
📋 Detailed Analysis
Evidence
PR #84910 was a performance optimization that refactored how selection state is applied to search list items. The PR is the only one in the staging deploy that modifies the Search list rendering logic, and the bug reproduces only on staging (where this PR is deployed) but not production.
Verification
The bug affects expense row highlighting after creation in the Search component. PR #84910 modified the following key files:
src/components/Search/SearchList/index.tsx - The core file where the bug exists
constitemsWithSelection=useMemo(()=>data.map((item)=>applySelectionToItem(item,canSelectMultiple,selectedTransactions)),[data,canSelectMultiple,selectedTransactions]);// In renderItem:constitemData=itemsWithSelection.at(index);constitemWithSelection=itemData?.itemWithSelection??item;
// itemsWithSelection memo was removed// In renderItem (line 426):const{itemWithSelection}=applySelectionToItem(item,canSelectMultiple,selectedTransactions);// Dependency array (lines 467-496):[type,groupBy,newTransactionIDByItemKey,shouldAnimate,data.length,// ... other deps ...selectedTransactions,// Added// canSelectMultiple is MISSING!]
Root Cause
The refactoring moved applySelectionToItem from a separate memoized structure into the renderItem callback. However, canSelectMultiple is used inside renderItem (line 426) but was not added to the dependency array (lines 467-496).
This creates a stale closure: when canSelectMultiple changes, renderItem is not recreated, so it continues using the old value. This breaks the selection/highlight logic that determines which expense rows should be highlighted.
While selectedTransactions was correctly added to the dependency array (line 495), the omission of canSelectMultiple causes the highlighting to fail.
We already have an issue for it here #85521 - it is a race condition that became more apparent after making this flow faster. I dont think we need to block on this
Activity
melvin-bot commentedon Mar 18, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #84910
melvin-bot commentedon Mar 18, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 18, 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 Mar 18, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #84910 - "Optimize submit-to-Search navigation performance" by @JakubKorytko (High confidence)
Related Issues: None
Recommendation: REVERT
PR #84910 refactored the highlight logic in SearchList but introduced a bug by omitting
canSelectMultiplefrom therenderItemdependency array, causing stale closure references that break the expense row highlighting functionality.Labels: Keeping
DeployBlockerCash(frontend bug in App). No label changes needed as the issue is correctly labeled.📋 Detailed Analysis
Evidence
PR #84910 was a performance optimization that refactored how selection state is applied to search list items. The PR is the only one in the staging deploy that modifies the Search list rendering logic, and the bug reproduces only on staging (where this PR is deployed) but not production.
Verification
The bug affects expense row highlighting after creation in the Search component. PR #84910 modified the following key files:
src/components/Search/SearchList/index.tsx- The core file where the bug existssrc/components/Search/index.tsx- Parent componentThe changes in SearchList/index.tsx show:
Before PR #84910:
After PR #84910:
Root Cause
The refactoring moved
applySelectionToItemfrom a separate memoized structure into therenderItemcallback. However,canSelectMultipleis used insiderenderItem(line 426) but was not added to the dependency array (lines 467-496).This creates a stale closure: when
canSelectMultiplechanges,renderItemis not recreated, so it continues using the old value. This breaks the selection/highlight logic that determines which expense rows should be highlighted.While
selectedTransactionswas correctly added to the dependency array (line 495), the omission ofcanSelectMultiplecauses the highlighting to fail.MelvinBot commentedon Mar 18, 2026
I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here).
Failure details: https://github.com/Expensify/Expensify/actions/runs/23244292241
mountiny commentedon Mar 18, 2026
We already have an issue for it here #85521 - it is a race condition that became more apparent after making this flow faster. I dont think we need to block on this
melvin-bot commentedon Mar 26, 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.