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-04-14] Chat header is not scrolled to the bottom #86787
Version Number: v9.3.51-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/test-runs/TR-14590/folder/13176686/41236624/1295549336?sort=%2Bidentifier Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11/ Chrome App Component: Chat Report View
Action Performed:
Sign in to staging.new.expensify.com
Create a workspace
Navigate to workspace chat with no conversation
Expected Result:
Chat header and welcome message is scrolled to the bottom
Actual Result:
Chat header and welcome message is not scrolled to the bottom
👋 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: #83078 - "Fix: Bottom comments briefly visible when switching between chats in Expenses" by @marufsharifi (High confidence) Related Issues: This is the same issue that PR #85788 (currently closed/not merged) was attempting to fix
Recommendation: REVERT
PR #83078 should be reverted. The PR was intended to fix bottom comments briefly being visible when switching between chats in expense reports, but it introduced a regression where workspace chat welcome messages are not properly scrolled to the bottom on initial load.
Labels: Removing DeployBlocker (backend label). Keeping DeployBlockerCash since this is a frontend bug that requires an App PR to be reverted.
Detailed Analysis
Evidence
PR #83078 modified ReportActionsList.tsx and introduced a new function getReportActionsListInitialNumToRender that determines how many report actions to initially render based on various conditions including shouldScrollToEndAfterLayout and hasCreatedActionAdded flags.
This change affects the initial rendering and scrolling behavior for workspace chats. When navigating to a newly created workspace chat (which has no conversation), the scroll position is not properly set to the bottom, leaving the welcome header and message not scrolled into view.
The bug is reproducible on staging but NOT on production, confirming it was introduced in this deploy
The issue affects workspace chats specifically, which aligns with the changes made to scroll behavior in ReportActionsList
Root Cause
The PR introduced logic to render all visible report actions when shouldScrollToEndAfterLayout is true and either the created action hasnt been added or the app is offline. This prevents the normal scroll-to-bottom mechanism from working correctly for workspace chats with welcome messages, as the initial render count affects how the FlatList positions content.
Additionally, PR #85788 was created to fix this exact issue (titled "Fix: Welcome header showing after contents in workspace chat") but is currently closed and not merged. The author of that PR identified the problem in the scrollToBottomForCurrentUserAction function where workspace chats dont go through the shouldFocusToTopOnMount scroll path, causing a race condition with the FlatList layout.
PR #80122 switched ReportActionsList from using InvertedFlatList to FlatListWithScrollKey (a non-inverted list). This fundamentally changes how short-content chats are displayed:
Before (production, InvertedFlatList): The list uses a CSS scaleY(-1) transform. When content (just the welcome message/header) is shorter than the viewport, items naturally appear at the visual bottom because the entire list is flipped vertically. No scrolling is needed.
After (staging, FlatListWithScrollKey): The list is non-inverted. The chatContentScrollView style applies flexGrow: 1 + justifyContent: 'flex-start' (src/styles/index.ts), which makes the container fill the viewport but pins content to the top. The mount-time scrollToBottom() call (ReportActionsList.tsx line ~547) invokes scrollToEnd(), but this is a no-op when content height is less than viewport height — there is nothing to scroll to.
For workspace chats with no conversation, the only content is the CREATED action (welcome message + header), which is shorter than the viewport. With the non-inverted list, this content is stuck at the top with no mechanism to push it to the bottom.
A secondary contributor is PR #83078, which changed the initialNumToRender calculation to depend on reactive values like sortedVisibleReportActions.length. This can cause FlatList re-renders that race with the mount-time scrollToBottom(), potentially affecting even chats with enough content to scroll.
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 #80122. This restores InvertedFlatList which naturally handles short-content chats by rendering content at the visual bottom.
If a revert is not desired (because PR #80122 fixed keyboard navigation issues), an alternative fix would be to change the contentContainerStyle for the non-inverted list to use justifyContent: 'flex-end' so that short content is pushed to the bottom of the container. This would need to be applied in ReportActionsList.tsx where FlatListWithScrollKey is rendered (around line ~935). The style would need to be conditional — only for non-inverted, non-linked-action views.
What alternative solutions did you explore? (Optional)
Fix scrollToBottom to handle short content — Not viable. scrollToEnd() on a FlatList physically cannot scroll past the content boundary. The issue is layout, not scrolling.
Add a spacer view above content — Could work by inserting a flex spacer that pushes content down when content is shorter than viewport. More complex and fragile than the justifyContent: 'flex-end' approach.
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.
changed the title [-]Chat header is not scrolled to the bottom[/-][+][Due for payment 2026-04-14] Chat header is not scrolled to the bottom[/+]on Apr 7, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Krishna2323@mallenexpensify 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]
Activity
melvin-bot commentedon Mar 31, 2026
Triggered auto assignment to @chuckdries (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Mar 31, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 31, 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 31, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #83078 - "Fix: Bottom comments briefly visible when switching between chats in Expenses" by @marufsharifi (High confidence)
Related Issues: This is the same issue that PR #85788 (currently closed/not merged) was attempting to fix
Recommendation: REVERT
PR #83078 should be reverted. The PR was intended to fix bottom comments briefly being visible when switching between chats in expense reports, but it introduced a regression where workspace chat welcome messages are not properly scrolled to the bottom on initial load.
Labels: Removing DeployBlocker (backend label). Keeping DeployBlockerCash since this is a frontend bug that requires an App PR to be reverted.
Detailed Analysis
Evidence
PR #83078 modified
ReportActionsList.tsxand introduced a new functiongetReportActionsListInitialNumToRenderthat determines how many report actions to initially render based on various conditions includingshouldScrollToEndAfterLayoutandhasCreatedActionAddedflags.The problematic logic is in the new function:
This change affects the initial rendering and scrolling behavior for workspace chats. When navigating to a newly created workspace chat (which has no conversation), the scroll position is not properly set to the bottom, leaving the welcome header and message not scrolled into view.
Verification
Root Cause
The PR introduced logic to render all visible report actions when
shouldScrollToEndAfterLayoutis true and either the created action hasnt been added or the app is offline. This prevents the normal scroll-to-bottom mechanism from working correctly for workspace chats with welcome messages, as the initial render count affects how the FlatList positions content.Additionally, PR #85788 was created to fix this exact issue (titled "Fix: Welcome header showing after contents in workspace chat") but is currently closed and not merged. The author of that PR identified the problem in the
scrollToBottomForCurrentUserActionfunction where workspace chats dont go through theshouldFocusToTopOnMountscroll path, causing a race condition with the FlatList layout.MelvinBot commentedon Mar 31, 2026
Proposal
What is the root cause of that problem?
PR #80122 switched
ReportActionsListfrom usingInvertedFlatListtoFlatListWithScrollKey(a non-inverted list). This fundamentally changes how short-content chats are displayed:Before (production,
InvertedFlatList): The list uses a CSSscaleY(-1)transform. When content (just the welcome message/header) is shorter than the viewport, items naturally appear at the visual bottom because the entire list is flipped vertically. No scrolling is needed.After (staging,
FlatListWithScrollKey): The list is non-inverted. ThechatContentScrollViewstyle appliesflexGrow: 1+justifyContent: 'flex-start'(src/styles/index.ts), which makes the container fill the viewport but pins content to the top. The mount-timescrollToBottom()call (ReportActionsList.tsxline ~547) invokesscrollToEnd(), but this is a no-op when content height is less than viewport height — there is nothing to scroll to.For workspace chats with no conversation, the only content is the CREATED action (welcome message + header), which is shorter than the viewport. With the non-inverted list, this content is stuck at the top with no mechanism to push it to the bottom.
A secondary contributor is PR #83078, which changed the
initialNumToRendercalculation to depend on reactive values likesortedVisibleReportActions.length. This can cause FlatList re-renders that race with the mount-timescrollToBottom(), potentially affecting even chats with enough content to scroll.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 #80122. This restores
InvertedFlatListwhich naturally handles short-content chats by rendering content at the visual bottom.If a revert is not desired (because PR #80122 fixed keyboard navigation issues), an alternative fix would be to change the
contentContainerStylefor the non-inverted list to usejustifyContent: 'flex-end'so that short content is pushed to the bottom of the container. This would need to be applied inReportActionsList.tsxwhereFlatListWithScrollKeyis rendered (around line ~935). The style would need to be conditional — only for non-inverted, non-linked-action views.What alternative solutions did you explore? (Optional)
scrollToBottomto handle short content — Not viable.scrollToEnd()on a FlatList physically cannot scroll past the content boundary. The issue is layout, not scrolling.justifyContent: 'flex-end'approach.Detailed Investigation
Evidence Chain
InvertedFlatListwithFlatListWithScrollKeyinReportActionsList.tsxchatContentScrollViewstyle usesflexGrow: 1+justifyContent: 'flex-start'— content fills viewport but starts at topscrollToBottom()→scrollToEnd()is a no-op when content < viewport heightRelevant Code
src/pages/inbox/report/ReportActionsList.tsx:935— Now usesFlatListWithScrollKeyinstead ofInvertedFlatListsrc/hooks/useReportScrollManager/index.ts:32—scrollToEnd()is a no-op when content < viewportsrc/styles/index.ts:1984—chatContentScrollViewusesjustifyContent: 'flex-start'src/pages/inbox/report/ReportActionsList.tsx:536-550— Mount-time scroll effect that can't fix short contentTimeline
InvertedFlatList— content naturally at bottom ✅FlatListWithScrollKey— content stuck at top ❌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.16 remaining items
mallenexpensify commentedon Apr 1, 2026
Payment Summary
Contributor+: @Krishna2323 due $250 via NewDot
I think we're good to close
melvin-bot commentedon Apr 1, 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.
mallenexpensify commentedon Apr 2, 2026
@Krishna2323 eyes on the deploy blocker comment above plz
Krishna2323 commentedon Apr 2, 2026
@mallenexpensify not repro: #86813 (comment)
Krishna2323 commentedon Apr 4, 2026
Requested in ND.
twisterdotcom commentedon Apr 5, 2026
@Krishna2323 has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-c25c-abc3-84db-61c909fc75d4[-]Chat header is not scrolled to the bottom[/-][+][Due for payment 2026-04-14] Chat header is not scrolled to the bottom[/+]melvin-bot commentedon Apr 7, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 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-04-14. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 7, 2026
@Krishna2323 @mallenexpensify 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]
quinthar commentedon Apr 13, 2026
Approved $250 to @Krishna2323