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
Chat-Nothing happens after tapping "New message" badge after receiving a new message #91901
Version Number: 9.3.84-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/13176910/test-cases/41237479 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: iPhone 15 iOS 26.5 App Component: Chat Report View
Action Performed:
Preconditions:
User A is logged in on the main testing device, User B on secondary device.
User A and User B have a chat with 15+ messages.
There is no unread messages in the chat
As User A, open the chat with User B
Scroll to the top of the conversation
As User B, send a new message in the chat
As User A, tap the "New Messages" badge
Verify the user is scrolled to the bottom of the conversation
Expected Result:
The conversation is scrolled to the new message at the bottom
Actual Result:
Nothing happens after tapping the "New message" badge, the conversation is not scrolled to a new message
👋 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.
PR #91296 (merged 2026-05-27) is the regression source. It is the only change between production and staging that touches ReportActionsList.tsx and related rendering files, which aligns with the bug reproducing on staging but not production.
The PR made two key changes to renderItem in ReportActionsList:
Wrapped each list item in a ReportActionIndexContext.Provider (replacing a bare <> Fragment) — ReportActionsList.tsx:744-774. When a new message arrives at index 0 in the inverted list, every existing item's index shifts by 1, causing every Provider to receive a new value. This changes the component tree structure from what FlashList's recycler expects (Fragment → Provider), which can interfere with FlashList's internal layout tracking on iOS.
Changed the renderItem dependency from report to reportStable — ReportActionsList.tsx:789. reportStable deliberately strips heartbeat fields (lastVisibleActionCreated, lastReadTime, etc.) via getStableReportSelector. This means renderItem no longer recreates when new messages arrive, which may cause FlashList on iOS to not properly update its internal layout state before scrollToIndex({animated: false, index: 0}) is called.
When the user taps the "New Messages" badge, scrollToBottomAndMarkReportAsRead fires and calls scrollToIndex({index: 0}), but on iOS the inverted FlashList silently fails to execute the scroll — likely because the recycler's internal model is stale due to the memoization change, or because the Provider-wrapped cell structure disrupts FlashList's scroll-to-index calculation.
What changes do you think we should make in order to solve the problem?
Since this is a deploy blocker, the safest path is to revert PR #91296. The performance optimization it introduced (preventing re-renders on chat heartbeat fields) is valuable but needs to be reworked to not break FlashList's scrollToIndex on iOS.
If a revert is not preferred, an alternative targeted fix would be to:
Remove the ReportActionIndexContext.Provider wrapping from renderItem and find another way to pass index to the rare consumers that need it (e.g., pass it only when entering edit mode)
OR restore report (instead of reportStable) in the renderItem dependency array to ensure FlashList gets a fresh renderItem reference when new messages arrive
What alternative solutions did you explore? (Optional)
I verified that no other files in the scroll pipeline changed between production and staging — useReportScrollManager, useScrollToEndOnNewMessageReceived, useReportUnreadMessageScrollTracking, FloatingMessageCounter, InvertedFlashList, and useFlashListScrollKey are all identical across both builds. The only dependency change is FullStory's babel plugin (1.5.2 → 1.6.4), which is unrelated to scroll behavior.
MVCP context: When scrolled to top, shouldMaintainVisibleContentPosition is true (ReportActionsList.tsx:365), so maintainVisibleContentPosition is enabled. On iOS, this could interact with the stale renderItem to prevent the programmatic scroll from taking effect.
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.
#91296 — perf: stabilize ReportActionItem with getStableReportSelector and index context by LukasMod, merged 2026-05-27.
It is the only PR between production and staging that modifies ReportActionsList.tsx or any scroll-related rendering file. See my detailed analysis above for the specific mechanism.
Activity
applause-bot commentedon May 27, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/c313d08c037cc3e53e44a37cd2eb3a30c464be059fbe772ab2f9a90657aefd00
melvin-bot commentedon May 27, 2026
Triggered auto assignment to @deetergp (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 27, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 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:
MelvinBot commentedon May 27, 2026
Proposal
What is the root cause of that problem?
PR #91296 (merged 2026-05-27) is the regression source. It is the only change between production and staging that touches
ReportActionsList.tsxand related rendering files, which aligns with the bug reproducing on staging but not production.The PR made two key changes to
renderIteminReportActionsList:Wrapped each list item in a
ReportActionIndexContext.Provider(replacing a bare<>Fragment) —ReportActionsList.tsx:744-774. When a new message arrives at index 0 in the inverted list, every existing item's index shifts by 1, causing every Provider to receive a newvalue. This changes the component tree structure from what FlashList's recycler expects (Fragment → Provider), which can interfere with FlashList's internal layout tracking on iOS.Changed the
renderItemdependency fromreporttoreportStable—ReportActionsList.tsx:789.reportStabledeliberately strips heartbeat fields (lastVisibleActionCreated,lastReadTime, etc.) viagetStableReportSelector. This meansrenderItemno longer recreates when new messages arrive, which may cause FlashList on iOS to not properly update its internal layout state beforescrollToIndex({animated: false, index: 0})is called.When the user taps the "New Messages" badge,
scrollToBottomAndMarkReportAsReadfires and callsscrollToIndex({index: 0}), but on iOS the inverted FlashList silently fails to execute the scroll — likely because the recycler's internal model is stale due to the memoization change, or because the Provider-wrapped cell structure disrupts FlashList's scroll-to-index calculation.What changes do you think we should make in order to solve the problem?
Since this is a deploy blocker, the safest path is to revert PR #91296. The performance optimization it introduced (preventing re-renders on chat heartbeat fields) is valuable but needs to be reworked to not break FlashList's
scrollToIndexon iOS.If a revert is not preferred, an alternative targeted fix would be to:
ReportActionIndexContext.Providerwrapping fromrenderItemand find another way to passindexto the rare consumers that need it (e.g., pass it only when entering edit mode)report(instead ofreportStable) in therenderItemdependency array to ensure FlashList gets a freshrenderItemreference when new messages arriveWhat alternative solutions did you explore? (Optional)
I verified that no other files in the scroll pipeline changed between production and staging —
useReportScrollManager,useScrollToEndOnNewMessageReceived,useReportUnreadMessageScrollTracking,FloatingMessageCounter,InvertedFlashList, anduseFlashListScrollKeyare all identical across both builds. The only dependency change is FullStory's babel plugin (1.5.2→1.6.4), which is unrelated to scroll behavior.Investigation details
Scroll flow when badge is tapped:
FloatingMessageCounter.onClick→scrollToBottomAndMarkReportAsRead(ReportActionsList.tsx:897)setIsFloatingMessageCounterVisible(false)(ReportActionsList.tsx:683)hasNewestReportActionis checked — in this scenario (15+ messages, no pagination), it should betrue(ReportActionsList.tsx:444)reportScrollManager.scrollToBottom()→flatListRef.current.scrollToIndex({animated: false, index: 0})(index.native.ts:30)The handler code itself hasn't changed — the regression is in how the FlashList processes the scroll command given the new renderItem structure.
Fields stripped by
getStableReportSelector:lastMessageText,lastVisibleActionCreated,lastReadTime,lastReadSequenceNumber,lastMentionedTime,lastVisibleActionLastModified,lastMessageHtml,lastActorAccountID,lastActionType(Report.ts:65-77)MVCP context: When scrolled to top,
shouldMaintainVisibleContentPositionistrue(ReportActionsList.tsx:365), somaintainVisibleContentPositionis enabled. On iOS, this could interact with the stale renderItem to prevent the programmatic scroll from taking effect.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.deetergp commentedon May 27, 2026
@MelvinBot which PR is likely to have caused this?
MelvinBot commentedon May 27, 2026
#91296 — perf: stabilize ReportActionItem with getStableReportSelector and index context by
LukasMod, merged 2026-05-27.It is the only PR between production and staging that modifies
ReportActionsList.tsxor any scroll-related rendering file. See my detailed analysis above for the specific mechanism.deetergp commentedon May 27, 2026
@MelvinBot can you comment on that PR that you think it's the cause of this deploy blocker?
LukasMod commentedon May 28, 2026
Looking into this right now
LukasMod commentedon May 28, 2026
I created revert PR for #91296 and still cant repro that. I think its something else.
I did some debugging and there is missing list ref in scroll action. It makes sense its related to #91446 based on PR description
Edit: I did some additional checks based on main branch commits and couldn't repro on my PR pointed by Melvin #91394 (comment)
IuliiaHerets commentedon May 28, 2026
Reproducible on iPhone 13/iOS 26.3 v9.3.88-0
ScreenRecording_05-28-2026.17-15-03_1.MP4
mountiny commentedon May 28, 2026
Fixed