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 does not scroll to the bottom when submitting expenses while being at the top of the chat #55693
Version Number: 9.0.89-2 Reproducible in staging?: Yes Reproducible in production?: No If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/5508042 Email or phone of affected tester (no customers):applausetester+100106kh@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.0 / Chrome App Component: Chat Report View
Action Performed:
Go to staging.new.expensify.com
Open DM with any user.
Send about 50 messages so that the chat is scrollable.
Scroll to the top.
Submit an expense to the user.
Note that the chat scrolls to the bottom.
Scroll to the top again.
Submit another expense.
Expected Result:
Chat will scroll to the bottom every time user submits an expense while being at the top of the chat (production behavior).
Actual Result:
Chat only scrolls to the bottom when user submits the first expense. It no longer scrolls down when submitting more expenses while at the top of the chat.
👋 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.
that return true on first expense and useEffect condition
if(isNewMessageDisplayed){
pass and it take us to bottom of the screen
but when we submit another expense both lastAction?.reportActionID and lastPrevVisibleAction?.reportActionID remain same that don't trigger the useEffect, and because isNewMessageDisplayed if false so it does't scroll to bottom.
What changes do you think we should make in order to solve the problem?
In isNewMessageDisplayed we should define a new const
I think since we are now closer to the deployment, this seems like an edge case flow, and it might have been fixed as well with the linked CP @samranahm. Are you still able to reproduce it?
Activity
melvin-bot commentedon Jan 24, 2025
Triggered auto assignment to @rlinoz (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jan 24, 2025
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Jan 24, 2025
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jan 24, 2025
👋 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:
samranahm commentedon Jan 24, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-01-24 15:20:14 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat does not scroll to the bottom when submitting expenses while being at the top of the chat
What is the root cause of that problem?
when user create an expense this
useEffecttriggerApp/src/pages/home/report/ReportActionsList.tsx
Lines 487 to 499 in aa849f1
Here one of the dependency
isNewMessageDisplayedcheck if thethat return true on first expense and useEffect condition
pass and it take us to bottom of the screen
but when we submit another expense both
lastAction?.reportActionIDandlastPrevVisibleAction?.reportActionIDremain same that don't trigger the useEffect, and becauseisNewMessageDisplayedif false so it does't scroll to bottom.What changes do you think we should make in order to solve the problem?
In
isNewMessageDisplayedwe should define a new constthis will check if we have more than 1
childMoneyRequestand return trueWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
POC
Screen.Recording.2025-01-24.at.8.12.51.PM.mov
rlinoz commentedon Jan 24, 2025
But I mean, shouldn't
lastAction?.reportActionIDget updated?Also, it looks related to this PR as was pointed out in the slack thread #54071
4 remaining items
rlinoz commentedon Jan 24, 2025
Oh it shouldn't because it is the same reportpreview 🤦♂
samranahm commentedon Jan 24, 2025
Exactly
samranahm commentedon Jan 24, 2025
Proposal updated
mountiny commentedon Jan 27, 2025
I think since we are now closer to the deployment, this seems like an edge case flow, and it might have been fixed as well with the linked CP @samranahm. Are you still able to reproduce it?
Going to demote this now
samranahm commentedon Jan 27, 2025
@mountiny Issue is clearly reproducible and my updated proposal is gently fixing it
rlinoz commentedon Jan 27, 2025
@samranahm your proposal doesn't address the case where the report may not be the last action, but we still should scroll to the bottom of the chat.
mountiny commentedon Jan 27, 2025
@samranahm Will your proposal fix this blocker too? #55780
samranahm commentedon Jan 27, 2025
@mountiny already on it, will update here really soon
melvin-bot commentedon Jan 27, 2025
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.
samranahm commentedon Jan 27, 2025
@rlinoz, this issue should be addressed by handle like this. Please take a look.
mountiny commentedon Jan 27, 2025
Did the revert from Amy fix this?
samranahm commentedon Jan 27, 2025
@mountiny Yes, this issue no more reproducible after the revert #54071
rlinoz commentedon Jan 28, 2025
Yeah, that was the original PR, closing this one then