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
👋 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.
Please re-state the problem that we are trying to solve in this issue.
When an employee/approver holds one of the expenses in a workspace chat, the page jumps unexpectedly. The scroll position should remain stable when holding an expense.
What is the root cause of that problem?
When holding an expense, putOnHold() in src/libs/actions/IOU/Hold.ts:322 calls:
notifyNewAction(currentReportID, undefined, true)
The action parameter is undefined. This triggers scrollToBottomForCurrentUserAction in src/pages/inbox/report/ReportActionsList.tsx:559-599. Because action is undefined, it falls into the else branch at line 590-593:
This unconditionally calls scrollToBottom(), which performs a non-animated instant scroll to offset 0 (bottom of inverted list). Additionally, line 595 sets isScrollToBottomEnabled = true, which triggers yet another scroll on the next layout event (lines 812-818).
The auto-scroll effect at lines 416-428 may also contribute -- when hold adds new optimistic actions to the transaction thread (HOLD action + comment), and the report uses getCombinedReportActions to merge transaction thread actions into the visible list, sortedVisibleReportActions.length changes, which can trigger another scrollToBottom() call.
The core issue is that notifyNewAction is designed for new messages where scrolling to bottom makes sense, but holding an expense is an in-place state change where the scroll position should be preserved.
What changes do you think we should make in order to solve the problem?
Remove the notifyNewAction call at src/libs/actions/IOU/Hold.ts:322. Holding/unholding an expense is not a new message action that warrants scrolling the user to the bottom of the chat. The line:
Both of these trigger unnecessary scroll-to-bottom jumps when the user holds or unholds an expense.
What alternative solutions did you explore? (Optional)
An alternative would be to pass the actual HOLD report action as the second argument to notifyNewAction, and then add a check in scrollToBottomForCurrentUserAction to skip scrolling for HOLD/UNHOLD action types. However, removing the call entirely is simpler and more correct -- hold/unhold is a status change, not a new conversation message, so notifying the chat of a "new action" is semantically wrong.
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.
Activity
melvin-bot commentedon Mar 20, 2026
Triggered auto assignment to @Valforte (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Mar 20, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 20, 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 Mar 20, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an employee/approver holds one of the expenses in a workspace chat, the page jumps unexpectedly. The scroll position should remain stable when holding an expense.
What is the root cause of that problem?
When holding an expense,
putOnHold()insrc/libs/actions/IOU/Hold.ts:322calls:The
actionparameter isundefined. This triggersscrollToBottomForCurrentUserActioninsrc/pages/inbox/report/ReportActionsList.tsx:559-599. Becauseactionisundefined, it falls into theelsebranch at line 590-593:This unconditionally calls
scrollToBottom(), which performs a non-animated instant scroll to offset 0 (bottom of inverted list). Additionally, line 595 setsisScrollToBottomEnabled = true, which triggers yet another scroll on the next layout event (lines 812-818).The auto-scroll effect at lines 416-428 may also contribute -- when hold adds new optimistic actions to the transaction thread (HOLD action + comment), and the report uses
getCombinedReportActionsto merge transaction thread actions into the visible list,sortedVisibleReportActions.lengthchanges, which can trigger anotherscrollToBottom()call.The core issue is that
notifyNewActionis designed for new messages where scrolling to bottom makes sense, but holding an expense is an in-place state change where the scroll position should be preserved.What changes do you think we should make in order to solve the problem?
Remove the
notifyNewActioncall atsrc/libs/actions/IOU/Hold.ts:322. Holding/unholding an expense is not a new message action that warrants scrolling the user to the bottom of the chat. The line:should be removed from the
putOnHoldfunction.The same pattern should also be checked in
unholdRequestat line 530:Both of these trigger unnecessary scroll-to-bottom jumps when the user holds or unholds an expense.
What alternative solutions did you explore? (Optional)
An alternative would be to pass the actual HOLD report action as the second argument to
notifyNewAction, and then add a check inscrollToBottomForCurrentUserActionto skip scrolling for HOLD/UNHOLD action types. However, removing the call entirely is simpler and more correct -- hold/unhold is a status change, not a new conversation message, so notifying the chat of a "new action" is semantically wrong.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.cristipaval commentedon Mar 20, 2026
Asked for a retest here
IuliiaHerets commentedon Mar 20, 2026
Windows 10 / Chrome
v9.3.41-3
Not Repro
repro.-.85888.mp4
cristipaval commentedon Mar 20, 2026
Thanks, closing