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-06-18] [HOLD] Start chat - All contacts load instead of 50 contacts per page #86089
Version Number: 9.3.42-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:#75026 Email or phone of affected tester (no customers):applausetester+jsodijsdnodjsi@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account that has more than 50 contacts.
Go to staging.new.expensify.com
Open FAB > Start chat.
Scroll down the contact list.
Expected Result:
The first 50 contacts will load, then the next 50 contacts will load when scrolled down.
👋 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: #75026 - "use useSearchSelector hook and remove unused and duplicated code" by @mkzie2 (High confidence) Related Issues: #74239 (regression test that should have caught this)
Recommendation: ROLL FORWARD
The fix is straightforward - UserSelectPopup needs to pass includeRecentReports: false to useSearchSelector. Rolling forward with a simple one-line fix is faster and safer than reverting this large refactoring PR that touches multiple files and has other dependent changes.
Labels: No label changes needed - keeping DeployBlockerCash as this is a frontend bug in the App repository.
📋 Detailed Analysis
Evidence
PR #75026 was merged on March 20, 2026 and is part of the current staging deploy (9.3.42-0). The bug is reproducible only on staging, not production, confirming it was introduced in this deploy cycle.
The PR refactored UserSelectPopup to use the new useSearchSelector hook instead of the old usePersonalDetailOptions hook. While the refactoring was well-intentioned to reduce code duplication, it inadvertently changed the behavior of the "Start chat" contact list pagination.
Since shouldAllowNameOnlyOptions defaults to false, this evaluates to includeRecentReports: true.
However, UserSelectPopup (used for "Start chat") should NOT include recent reports - it should only show personal details (contacts). The old code explicitly set includeRecentReports: false.
When includeRecentReports: true, the code path in getValidOptions changes how it calculates pagination, and in this specific case, it causes all contacts to load instead of paginating properly.
Fix
Add one line to UserSelectPopup.tsx at line 79:
includeRecentReports: false,
This matches the original behavior before the refactoring and will restore proper pagination of the contact list.
Please re-state the problem that we are trying to solve in this issue.
In the "Start chat" flow (FAB > Start chat), all contacts load at once instead of loading 50 contacts per page with more loading on scroll. This is reproducible in staging (v9.3.42-0) but not in production.
What is the root cause of that problem?
The root cause is PR #84887 ("Reapply: Make NewChatPage use new SelectionListWithSections"), not PR #75026 as initially suspected.
The oldSelectionListWithSections component (at src/components/SelectionListWithSections/) had built-in data-level pagination using slicedSections and MAX_SELECTION_LIST_PAGE_LENGTH = 50:
SectionList renders slicedSections (line 1060), not the full sections
The newSelectionListWithSections component (at src/components/SelectionList/SelectionListWithSections/) is FlashList-based and has no such pagination. It passes ALL flattenedData directly to FlashList (BaseSelectionListWithSections.tsx:384-410).
PR #84887 (merged March 20) migrated NewChatPage from the old component to the new one. Production still uses the old component (with 50-at-a-time pagination); staging uses the new one (without pagination). This perfectly explains the staging-only reproduction.
Timeline: PR #81869 (original migration, March 2) → PR #84068 (reverted due to group chat freeze, March 3) → PR #84887 (reapplied with FlashList patch, March 20).
What changes do you think we should make in order to solve the problem?
Add data-level pagination to the newBaseSelectionListWithSections component (src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx) that mirrors the old component's behavior:
Add currentPage state and slicedSections/slicedData logic that limits the flattenedData passed to FlashList to MAX_SELECTION_LIST_PAGE_LENGTH * currentPage items
In the onEndReached handler, call incrementPage (in addition to the existing onEndReached prop) to progressively load more items
This restores the 50-at-a-time loading behavior while still benefiting from the FlashList migration
What alternative solutions did you explore? (Optional)
Accept FlashList virtualization as equivalent: FlashList already virtualizes rendering (only renders visible items), so the scrollbar reflecting all items may be acceptable. However, this changes the user-perceived behavior and was flagged as a deploy blocker.
Add pagination in NewChatPage itself: Pass maxElements to getValidOptions and implement onEndReached at the page level. This would be more targeted but would only fix NewChatPage — other pages migrated to the new SelectionListWithSections would have the same issue.
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.
Pagination was purely visual. All of the data was already precomputed beforehand and pagination wasn't really doing anything aside from providing visual effect of 'loading more'.
Detailed Explanation
Meaning, it all of data was already calculated before and sent to the old SelectionListWithSections component. SelectionListWithSections did pagination with that data.
That was horrible on many levels:
You see pagination, you expect it to be an actual pagination. It wasn't. The new component doesn't have this logic that would introduce confusion and hide bad performance practices behind performative pagination.
This should be handled imo at the level of components that use SelectionListWithSections and with the correct usage of 'handleEndReached'.
This would entail refactor of the logic inside the NewChatPage.tsx that creates data.
Proposed solutions
Do refactor of the code that creates the data that is passed to the list.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.5-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
changed the title [-][HOLD] Start chat - All contacts load instead of 50 contacts per page[/-][+][Due for payment 2026-06-18] [HOLD] Start chat - All contacts load instead of 50 contacts per page[/+]on Jun 11, 2026
@NikkiWines@mallenexpensify@zfurtak / @sharabai / @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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 Mar 23, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #75026
melvin-bot commentedon Mar 23, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 23, 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 23, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #75026 - "use useSearchSelector hook and remove unused and duplicated code" by @mkzie2 (High confidence)
Related Issues: #74239 (regression test that should have caught this)
Recommendation: ROLL FORWARD
The fix is straightforward - UserSelectPopup needs to pass
includeRecentReports: falseto useSearchSelector. Rolling forward with a simple one-line fix is faster and safer than reverting this large refactoring PR that touches multiple files and has other dependent changes.Labels: No label changes needed - keeping
DeployBlockerCashas this is a frontend bug in the App repository.📋 Detailed Analysis
Evidence
PR #75026 was merged on March 20, 2026 and is part of the current staging deploy (9.3.42-0). The bug is reproducible only on staging, not production, confirming it was introduced in this deploy cycle.
The PR refactored
UserSelectPopupto use the newuseSearchSelectorhook instead of the oldusePersonalDetailOptionshook. While the refactoring was well-intentioned to reduce code duplication, it inadvertently changed the behavior of the "Start chat" contact list pagination.Verification
Affected file:
/home/runner/_work/App/App/src/components/Search/FilterDropdowns/UserSelectPopup.tsxBefore PR #75026:
usePersonalDetailOptionshookmemoizedGetValidOptionswith explicitincludeRecentReports: falseAfter PR #75026:
useSearchSelectorhookincludeRecentReportsparameterincludeRecentReports: true(via line 276 inuseSearchSelector.base.ts)Root Cause
In
useSearchSelector.base.tsline 276, when usingSEARCH_CONTEXT_GENERAL:Since
shouldAllowNameOnlyOptionsdefaults tofalse, this evaluates toincludeRecentReports: true.However, UserSelectPopup (used for "Start chat") should NOT include recent reports - it should only show personal details (contacts). The old code explicitly set
includeRecentReports: false.When
includeRecentReports: true, the code path ingetValidOptionschanges how it calculates pagination, and in this specific case, it causes all contacts to load instead of paginating properly.Fix
Add one line to UserSelectPopup.tsx at line 79:
This matches the original behavior before the refactoring and will restore proper pagination of the contact list.
MelvinBot commentedon Mar 23, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the "Start chat" flow (FAB > Start chat), all contacts load at once instead of loading 50 contacts per page with more loading on scroll. This is reproducible in staging (v9.3.42-0) but not in production.
What is the root cause of that problem?
The root cause is PR #84887 ("Reapply: Make NewChatPage use new SelectionListWithSections"), not PR #75026 as initially suspected.
The old
SelectionListWithSectionscomponent (atsrc/components/SelectionListWithSections/) had built-in data-level pagination usingslicedSectionsandMAX_SELECTION_LIST_PAGE_LENGTH = 50:currentPagestate starts at 1slicedSectionsmemo limits data to50 * currentPageitems (BaseSelectionListWithSections.tsx:320-333)incrementPageadds 50 more items when the user scrolls to the bottom (BaseSelectionListWithSections.tsx:301-308)slicedSections(line 1060), not the full sectionsThe new
SelectionListWithSectionscomponent (atsrc/components/SelectionList/SelectionListWithSections/) is FlashList-based and has no such pagination. It passes ALLflattenedDatadirectly to FlashList (BaseSelectionListWithSections.tsx:384-410).PR #84887 (merged March 20) migrated
NewChatPagefrom the old component to the new one. Production still uses the old component (with 50-at-a-time pagination); staging uses the new one (without pagination). This perfectly explains the staging-only reproduction.Timeline: PR #81869 (original migration, March 2) → PR #84068 (reverted due to group chat freeze, March 3) → PR #84887 (reapplied with FlashList patch, March 20).
What changes do you think we should make in order to solve the problem?
Add data-level pagination to the new
BaseSelectionListWithSectionscomponent (src/components/SelectionList/SelectionListWithSections/BaseSelectionListWithSections.tsx) that mirrors the old component's behavior:currentPagestate andslicedSections/slicedDatalogic that limits theflattenedDatapassed to FlashList toMAX_SELECTION_LIST_PAGE_LENGTH * currentPageitemsonEndReachedhandler, callincrementPage(in addition to the existingonEndReachedprop) to progressively load more itemsWhat alternative solutions did you explore? (Optional)
maxElementstogetValidOptionsand implementonEndReachedat the page level. This would be more targeted but would only fix NewChatPage — other pages migrated to the newSelectionListWithSectionswould have the same issue.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.sharabai commentedon Mar 23, 2026
TL;DR
Pagination was purely visual. All of the data was already precomputed beforehand and
paginationwasn't really doing anything aside from providing visual effect of 'loading more'.Detailed Explanation
Meaning, it all of data was already calculated before and sent to the old
SelectionListWithSectionscomponent.SelectionListWithSectionsdid pagination with that data.That was horrible on many levels:
You see pagination, you expect it to be an actual pagination. It wasn't. The new component doesn't have this logic that would introduce confusion and hide bad performance practices behind performative pagination.
This should be handled imo at the level of components that use
SelectionListWithSectionsand with the correct usage of 'handleEndReached'.This would entail refactor of the logic inside the
NewChatPage.tsxthat creates data.Proposed solutions
Do refactor of the code that creates the data that is passed to the list.
ZhenjaHorbach commentedon Mar 23, 2026
I think it's not a deploy blocker
Since it doesn't affect the user experience
95 remaining items
melvin-bot commentedon Jun 11, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.5-6 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-06-18. 🎊
For reference, here are some details about the assignees on this issue:
[-][HOLD] Start chat - All contacts load instead of 50 contacts per page[/-][+][Due for payment 2026-06-18] [HOLD] Start chat - All contacts load instead of 50 contacts per page[/+]melvin-bot commentedon Jun 11, 2026
@NikkiWines @mallenexpensify @zfurtak / @sharabai / @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
melvin-bot commentedon Jun 15, 2026
@dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
dukenv0307 commentedon Jun 16, 2026
@sharabai this issue is done, right?
sharabai commentedon Jun 16, 2026
@dukenv0307, yep it's done.
dukenv0307 commentedon Jun 16, 2026
Since this issue is quite complex, I'd like to request to increase the bounty. Here are the details
@NikkiWines can you please confirm?
NikkiWines commentedon Jun 16, 2026
@dukenv0307 yes, i think that's fine here 👍
mallenexpensify commentedon Jun 19, 2026
Payment Summary
Contributor+: @dukenv0307 due $750 via NewDot
quinthar commentedon Jul 5, 2026
Approved $750 to @dukenv0307