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 - Newly added category is not selected with bulk select #80691
Version Number: v9.3.10-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:#80333 Email or phone of affected tester (no customers):gibethlehem@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: macOS/chrome App Component: Other
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create some expenses with different category for the first time
Navigate to the Reports page > Group by category
Bulk Select
Expected Result:
"Bulk Select" selects all the category rows
Actual Result:
"Bulk Select" selects only the ones that have been interacted with
👋 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: #80333 - "feat: [Insights] [Release 1] Top Categories - Add group-by:category" by @TaduJR (High confidence) Related Issues: N/A
Recommendation: REVERT
PR #80333 introduced the groupBy:category feature but contains a critical bug in the bulk select functionality. The bulk select feature only works for categories whose transactions have already been loaded (expanded), leaving newly created categories unselectable.
The issue states that "Bulk Select" only selects category rows that have been interacted with, not newly added ones. This aligns perfectly with how PR #80333 implemented lazy loading for grouped transactions.
/src/libs/SearchUIUtils.ts - Added getCategorySections() function
Multiple other files to support the category grouping feature
Verification
The affected functionality is in /src/components/Search/index.tsx:
Lines 458-483: Transactions are loaded lazily from snapshots when groups are expanded:
constenriched=(baseFilteredDataasTransactionGroupListItemType[]).map((item)=>{constsnapshot=item.transactionsQueryJSON?.hash ? groupByTransactionSnapshots[String(item.transactionsQueryJSON.hash)] : undefined;if(!snapshot?.data){returnitem;// Returns item with empty transactions array}// ... loads transactions from snapshotreturn{...item,transactions: transactions1asTransactionListItemType[]};});
Lines 1024-1040: The toggleAllTransactions() function (called by "Bulk Select") tries to select all transactions:
if(areItemsGrouped){setSelectedTransactions(Object.fromEntries((filteredDataasTransactionGroupListItemType[]).flatMap((item)=>item.transactions// BUG: Empty array for unexpanded categories!.filter((t)=>!isTransactionPendingDelete(t)).map((transactionItem)=>{// ... selection logic}),),),filteredData,);}
Lines 2188-2194 in /src/libs/SearchUIUtils.ts: Categories are initialized with empty transaction arrays:
categorySections[key]={groupedBy: CONST.SEARCH.GROUP_BY.CATEGORY,transactions: [],// Empty until expanded!
transactionsQueryJSON,
...categoryGroup,
formattedCategory,};
Root Cause
When a user creates new expenses with categories and navigates to Reports > Group by category, the category groups are created with empty transactions arrays. The transactions are only loaded from snapshots when the user expands a category group.
When "Bulk Select" is clicked, the toggleAllTransactions() function iterates through all category groups and attempts to select item.transactions. For unexpanded categories, this array is empty, so no transactions get selected even though they exist in the backend data.
Categories that have been "interacted with" (expanded) work correctly because their transactions have already been loaded from the snapshot into the item.transactions array.
Chatted with @trjExpensify and he said this is how bulk select should work with group by, due to performance limitations with the current design. Not new nor an issue at this point.
Activity
melvin-bot commentedon Jan 27, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #80333
melvin-bot commentedon Jan 27, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jan 27, 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 27, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #80333 - "feat: [Insights] [Release 1] Top Categories - Add group-by:category" by @TaduJR (High confidence)
Related Issues: N/A
Recommendation: REVERT
PR #80333 introduced the
groupBy:categoryfeature but contains a critical bug in the bulk select functionality. The bulk select feature only works for categories whose transactions have already been loaded (expanded), leaving newly created categories unselectable.Labels: Keeping
DeployBlockerCash(App deploy blocker - Frontend bug)📋 Detailed Analysis
Evidence
The issue states that "Bulk Select" only selects category rows that have been interacted with, not newly added ones. This aligns perfectly with how PR #80333 implemented lazy loading for grouped transactions.
PR #80333 modified:
/src/components/Search/index.tsx- Added category grouping logic/src/libs/SearchUIUtils.ts- AddedgetCategorySections()functionVerification
The affected functionality is in
/src/components/Search/index.tsx:Lines 458-483: Transactions are loaded lazily from snapshots when groups are expanded:
Lines 1024-1040: The
toggleAllTransactions()function (called by "Bulk Select") tries to select all transactions:Lines 2188-2194 in
/src/libs/SearchUIUtils.ts: Categories are initialized with empty transaction arrays:Root Cause
When a user creates new expenses with categories and navigates to Reports > Group by category, the category groups are created with empty
transactionsarrays. The transactions are only loaded from snapshots when the user expands a category group.When "Bulk Select" is clicked, the
toggleAllTransactions()function iterates through all category groups and attempts to selectitem.transactions. For unexpanded categories, this array is empty, so no transactions get selected even though they exist in the backend data.Categories that have been "interacted with" (expanded) work correctly because their transactions have already been loaded from the snapshot into the
item.transactionsarray.neil-marcellini commentedon Jan 27, 2026
Chatted with @trjExpensify and he said this is how bulk select should work with group by, due to performance limitations with the current design. Not new nor an issue at this point.