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-11-16] [$175] Chat - "Latest messages" pill remains visible after sending a message #106015
Version Number: v9.5.32-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#104242 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: Mac 26.5.1 Safrai, iPhone 13 iOS 26.6 App Component: Chat Report View
The handed-over dev NewDot web session was accessible. Missing historical-message fixtures blocked reproduction of issue 106015.
Step
Status
1. Open the app in the handed-over sessionAuthenticated Home and Inbox rendered.
✅
2. Open an old-message deep link with newer messages offscreenFixture blocked: available Concierge history contained only its welcome message, without an eligible old-message link and newer-message history.
❌
3. Send and verify newest messages and the sent message become visibleNot executed: blocked by the missing historical-message fixture.
❌
4. Verify Latest messages disappears after the jumpNot executed: the required send-triggered jump could not be tested. The pill's presence alone does not reproduce the issue.
Likely stale scroll tracking after the jump; medium confidence, not reproduced. Sending hides the pill, but a subsequent content-size callback can show it again using the historical scroll offset. The deferred jump does not synchronize that offset or pill visibility.
Web verification was blocked by missing historical-message fixtures. The event sequence remains unconfirmed.
What changes do you think we should make in order to solve the problem?
Add a regression test covering deep-link list replacement, stale offset, content-size callbacks, and no subsequent scroll event. Synchronize offset and pill visibility when the newest-page jump completes, guarded by list readiness. Avoid unconditionally assuming a scroll request succeeded.
Verify scrolling upward restores the pill; cover offline sends and unread markers.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/106015) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Chat - "Latest messages" pill remains visible after sending a message[/-][+][$175] Chat - "Latest messages" pill remains visible after sending a message[/+]on Nov 4, 2026
Please re-state the problem that we are trying to solve in this issue
When opening a chat via a deep link to an older message (where the "Latest messages" pill is visible) and sending a new message, the chat list jumps to the newest messages at the bottom, but the "Latest messages" pill remains visible on screen instead of disappearing.
What is the root cause of that problem?
When a report is opened at a deep-linked older message (linkedReportActionID), scrollOffsetRef.current (provided by ActionListContext above InvertedFlashList) holds the non-zero scroll offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD) from the deep-linked position, and isFloatingMessageCounterVisible is true.
When the current user sends a message from that deep-linked view, useReportActionsNewActionLiveTail.ts runs the live-tail jump sequence:
Once openReport finishes loading (src/pages/inbox/report/useReportActionsNewActionLiveTail.ts, lines 191-205), it sets setTreatAsNoPaginationAnchor(true), calls clearLinkedActionParam() (navigation.setParams({reportActionID: ''})), and transitions to stage: 'await_scroll'.
In the next effect (src/pages/inbox/report/useReportActionsNewActionLiveTail.ts, lines 207-221), once hasNewestReportAction is true, it calls setIsFloatingMessageCounterVisible(false) and schedules setIsScrollToBottomEnabled(true) in a microtask:
liveTailJumpRef.current={stage: 'await_prune'};setIsFloatingMessageCounterVisible(false);// Defer so this effect does not synchronously chain a second render from setState (eslint react-hooks/set-state-in-effect).queueMicrotask(()=>{setIsScrollToBottomEnabled(true);});
Clearing linkedReportActionID changes listID in src/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts (line 71: const listID = [reportID, linkedReportActionID, ...].join(':')), which is passed as key={listID} to <InvertedFlashList> (ReportActionsListContent.tsx, line 265). This remounts InvertedFlashList at the bottom (index 0, scroll offset 0), while ActionListContext's scrollOffsetRef.current remains mounted above it and still retains the stale deep-link offset (> ACTION_VISIBLE_THRESHOLD).
When the remounted list fires onContentSizeChange (src/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts, lines 214-217):
trackVerticalScrolling(undefined) calls updatePillVisibility() (src/pages/inbox/report/useReportUnreadMessageScrollTracking.ts, lines 98-120) with event === undefined, so scrollOffsetRef.current is not updated. Because scrollOffsetRef.current still holds the old deep-link offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD) and isFloatingMessageCounterVisible was just set to false, updatePillVisibility() immediately sets setIsFloatingMessageCounterVisible(true) again!
6. Right after that, flushPendingScrollToBottom() runs (src/hooks/useReportActionsScroll.ts, lines 426-433):
Because the remounted InvertedFlashList is already positioned at index 0 (or scrollToIndex({index: 0, animated: false}) is a no-op at offset 0), no native onScroll event is emitted, scrollOffsetRef.current is never reset to 0, and flushPendingScrollToBottom() never hides the pill or clears the stale offset. Furthermore, any subsequent onContentSizeChange callback after flushPendingScrollToBottom() will continue reading the stale scrollOffsetRef.current > ACTION_VISIBLE_THRESHOLD and re-showing the pill.
What changes do you think we should make in order to solve the problem?
In src/hooks/useReportActionsScroll.ts inside flushPendingScrollToBottom (lines 426-433), reset scrollOffsetRef.current = 0 and call setIsFloatingMessageCounterVisible(false) when flushing the pending scroll to the bottom:
Resetting scrollOffsetRef.current = 0 and hiding the floating message counter in flushPendingScrollToBottom ensures that:
Even if onContentSizeChange ran trackVerticalScrolling(undefined) right before flushPendingScrollToBottom() (or while isScrollToBottomEnabled was queued), the pill is hidden once the jump to the bottom is flushed.
Any subsequent onContentSizeChange (trackVerticalScrolling(undefined)) sees scrollOffsetRef.current === 0 (matching the actual bottom position of the list) and does not re-enable the pill until the user actually scrolls up in history.
What alternative solutions did you consider?
We considered resetting scrollOffsetRef.current = 0 when listID changes in useReportActionsListScroll.ts, or swapping the order of flushPendingScrollToBottom() and trackVerticalScrolling(undefined) in onContentSizeChange. However, onContentSizeChange can also fire on the render before the queueMicrotask(() => setIsScrollToBottomEnabled(true)) state update commits, and flushPendingScrollToBottom is also called from onLayout and non-remount live-tail jumps (where hasNewerActions was true without a linkedReportActionID change). Synchronizing scrollOffsetRef.current = 0 and setIsFloatingMessageCounterVisible(false) directly inside flushPendingScrollToBottom() handles both deep-link remount jumps and in-place live-tail jumps in one place.
Please re-state the problem that we are trying to solve in this issue
When opening a chat from a deep link to an old message and then sending a message, the chat list jumps to the newest messages at the bottom, but the "Latest messages" floating pill remains visible instead of disappearing.
What is the root cause of that problem?
When a chat is opened from a deep link (linkedReportActionID in route params), <InvertedFlashList key={listID} /> mounts at initialScrollIndex = targetIndex (> 0). Its onScroll handler (trackScrollPositionAndThreshold in src/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts, lines 146-149) sets scrollOffsetRef.current (stored in ActionListContextProvider, src/pages/inbox/ActionListContext.tsx, line 53) to the deep-linked scroll offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD) and calls onScrolledOverThresholdChange(true) (hasScrolledOverThreshold = true in ReportActionsListContent.tsx, line 119). Once onLoad runs (src/hooks/useReportActionsScroll.ts, lines 436-443), updatePillVisibility() sees currentVerticalScrollingOffsetRef.current > CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD and sets isFloatingMessageCounterVisible = true.
When the current user sends a message while viewing the deep-linked message, scrollToBottomForCurrentUserAction in src/pages/inbox/report/useReportActionsNewActionLiveTail.ts (lines 125-136) enters the shouldJumpToLiveTail branch (!!linkedReportActionID is true), sets liveTailJumpRef.current = {stage: 'open_report'}, and calls openReportAtLiveTail().
When openReport finishes (prevIsLoadingInitialReportActions === true && reportLoadingState?.isLoadingInitialReportActions === false), two separate effects in useReportActionsNewActionLiveTail.ts run across consecutive renders:
clearLinkedActionParam() calls navigation.setParams({reportActionID: ''}), changing linkedReportActionID to ''.
In the render caused by setTreatAsNoPaginationAnchor(true) and clearLinkedActionParam(), listID in useReportActionsListScroll.ts (line 71: [reportID, linkedReportActionID, ...].join(':')) changes immediately. This unmounts the deep-linked <InvertedFlashList key={listID} /> and mounts a brand-new <InvertedFlashList> instance at scroll offset 0 (initialScrollIndex = undefined).
Crucially, during the render in which the new <InvertedFlashList> mounts and fires its initial onLayout and onContentSizeChange, isScrollToBottomEnabled is still false, because the second effect at lines 207-221:
only runs after hasNewestReportAction becomes true (once treatAsNoPaginationAnchor is true), and then further defers setIsScrollToBottomEnabled(true) inside a queueMicrotask.
Because the remounted <InvertedFlashList> starts at offset 0, it never emits an onScroll event. Meanwhile, scrollOffsetRef.current in ActionListContextProvider still holds the stale deep-linked offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD), and hasScrolledOverThreshold in ReportActionsListContent remains true (which also leaves maintainVisibleContentPosition.disabled = false and useMarkAsRead's isScrolledToEnd = false).
When onContentSizeChange fires on the list (useReportActionsListScroll.ts, lines 214-217):
If onContentSizeChange fires before the queueMicrotask sets isScrollToBottomEnabled = true, flushPendingScrollToBottom() returns early at if (!isScrollToBottomEnabled) return;. And once isScrollToBottomEnabled flips to true on the subsequent render, if layout and content size have already settled on the remounted list, flushPendingScrollToBottom() (and completeLiveTailPruneAfterScrollToBottom()) does not run until a future layout/content-size event.
And whenever onContentSizeChange runs (either during initial layout or after pruneReportActionPagesToNewestWindow prunes older pages), trackVerticalScrolling(undefined) calls updatePillVisibility() (src/pages/inbox/report/useReportUnreadMessageScrollTracking.ts, lines 98-110), which reads the stale currentVerticalScrollingOffsetRef.current > CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD and immediately calls setIsFloatingMessageCounterVisible(true), turning the "Latest messages" pill back on.
Offending PR / Regression History:
In PR feat: Open reports at first unread action V2 #90072 (4ac01f2d, Open reports at first unread action V2), key={listID} was originally placed on <ReportActionsList key={listID} /> in ReportActionsView.tsx.
In PR Decompose ReportActionsList: 10 #94149 (856bc8e1, Decompose ReportActionsList: 10), key={listID} was moved down onto <InvertedFlashList key={listID} /> while ReportActionsListContent was keyed by key={reportID}, so useReportActionsScroll, useReportUnreadMessageScrollTracking, and ActionListContext's scrollOffsetRef.current remained mounted when clearLinkedActionParam() remounted <InvertedFlashList key={listID} /> at offset 0.
What changes do you think we should make in order to solve the problem?
Reset scrollOffsetRef.current and hasScrolledOverThreshold when releasing the linked-action anchor and jumping to the live tail:
Pass onScrolledOverThresholdChange into useReportActionsScroll and expose a resetScrollToBottomState callback (which sets scrollOffsetRef.current = 0, calls onScrolledOverThresholdChange(false), and calls setIsFloatingMessageCounterVisible(false)) to useReportActionsNewActionLiveTail.
In src/pages/inbox/report/useReportActionsNewActionLiveTail.ts, call resetScrollToBottomState() when releasing the linked-action anchor (in the open_report completion effect at lines 202-204, the await_scroll effect at lines 215-220, and the offline linked-action send branch at lines 139-143) so that scrollOffsetRef.current is 0 and hasScrolledOverThreshold is falsebefore the remounted <InvertedFlashList key={listID} /> mounts and runs onContentSizeChange.
Flush pending scroll-to-bottom when isScrollToBottomEnabled becomes true and reset scroll state inside flushPendingScrollToBottom:
In src/hooks/useReportActionsScroll.ts inside flushPendingScrollToBottom (lines 426-433), also call resetScrollToBottomState(), and invoke flushPendingScrollToBottom() from an effect when isScrollToBottomEnabled becomes true (once the list ref is laid out) so the scroll and pagination prune are not missed if onLayout / onContentSizeChange already fired before the queueMicrotask render:
Only resetting scrollOffsetRef.current = 0 inside flushPendingScrollToBottom(): This is not sufficient on its own because clearLinkedActionParam() remounts <InvertedFlashList key={listID} /> in the render beforequeueMicrotask(() => setIsScrollToBottomEnabled(true)) commits, so isScrollToBottomEnabled is still false when the remounted list fires its initial onLayout and onContentSizeChange, and hasScrolledOverThreshold in ReportActionsListContent would also stay true (leaving maintainVisibleContentPosition enabled and useMarkAsRead's isScrolledToEnd as false).
Resetting scrollOffsetRef.current = 0 in ActionListContext.registerListRef on every unmount/mount: ReportActionsListThresholdTest specifically requires scrollOffsetRef.current to persist across mount when preserving scroll position above the threshold. Resetting scrollOffsetRef.current = 0 and onScrolledOverThresholdChange(false) specifically during a live-tail / scroll-to-bottom jump preserves mount-time threshold behavior.
Activity
applause-bot commentedon Nov 4, 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/856c26d65da95854a9a909090893790e861bbb6206a51b00fe02424d2612f4c1
MelvinBot commentedon Nov 4, 2026
🤖 Web test steps verification results:⚠️ partial
The handed-over dev NewDot web session was accessible. Missing historical-message fixtures blocked reproduction of issue 106015.
1. Open the app in the handed-over session
Authenticated Home and Inbox rendered.2. Open an old-message deep link with newer messages offscreen
Fixture blocked: available Concierge history contained only its welcome message, without an eligible old-message link and newer-message history.3. Send and verify newest messages and the sent message become visible
Not executed: blocked by the missing historical-message fixture.4. Verify Latest messages disappears after the jump
Not executed: the required send-triggered jump could not be tested. The pill's presence alone does not reproduce the issue.view run
MelvinBot commentedon Nov 4, 2026
Proposal
What is the root cause of that problem?
Likely stale scroll tracking after the jump; medium confidence, not reproduced. Sending hides the pill, but a subsequent content-size callback can show it again using the historical scroll offset. The deferred jump does not synchronize that offset or pill visibility.
Code evidence and limits
Web verification was blocked by missing historical-message fixtures. The event sequence remains unconfirmed.
What changes do you think we should make in order to solve the problem?
Add a regression test covering deep-link list replacement, stale offset, content-size callbacks, and no subsequent scroll event. Synchronize offset and pill visibility when the newest-page jump completes, guarded by list readiness. Avoid unconditionally assuming a scroll request succeeded.
Verify scrolling upward restores the pill; cover offline sends and unread markers.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/106015)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run · view recording
melvin-bot commentedon Nov 4, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)[-]Chat - "Latest messages" pill remains visible after sending a message[/-][+][$175] Chat - "Latest messages" pill remains visible after sending a message[/+]melvin-bot commentedon Nov 4, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022118101852933175590
aion-citadel-forge commentedon Nov 4, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue
When opening a chat via a deep link to an older message (where the "Latest messages" pill is visible) and sending a new message, the chat list jumps to the newest messages at the bottom, but the "Latest messages" pill remains visible on screen instead of disappearing.
What is the root cause of that problem?
When a report is opened at a deep-linked older message (
linkedReportActionID),scrollOffsetRef.current(provided byActionListContextaboveInvertedFlashList) holds the non-zero scroll offset (>CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD) from the deep-linked position, andisFloatingMessageCounterVisibleistrue.When the current user sends a message from that deep-linked view,
useReportActionsNewActionLiveTail.tsruns the live-tail jump sequence:scrollToBottomForCurrentUserAction(lines 125-136) callsopenReportAtLiveTail()and setsliveTailJumpRef.current = {stage: 'open_report'}.openReportfinishes loading (src/pages/inbox/report/useReportActionsNewActionLiveTail.ts, lines 191-205), it setssetTreatAsNoPaginationAnchor(true), callsclearLinkedActionParam()(navigation.setParams({reportActionID: ''})), and transitions tostage: 'await_scroll'.src/pages/inbox/report/useReportActionsNewActionLiveTail.ts, lines 207-221), oncehasNewestReportActionis true, it callssetIsFloatingMessageCounterVisible(false)and schedulessetIsScrollToBottomEnabled(true)in a microtask:linkedReportActionIDchangeslistIDinsrc/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts(line 71:const listID = [reportID, linkedReportActionID, ...].join(':')), which is passed askey={listID}to<InvertedFlashList>(ReportActionsListContent.tsx, line 265). This remountsInvertedFlashListat the bottom (index 0, scroll offset 0), whileActionListContext'sscrollOffsetRef.currentremains mounted above it and still retains the stale deep-link offset (> ACTION_VISIBLE_THRESHOLD).onContentSizeChange(src/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts, lines 214-217):trackVerticalScrolling(undefined)callsupdatePillVisibility()(src/pages/inbox/report/useReportUnreadMessageScrollTracking.ts, lines 98-120) withevent === undefined, soscrollOffsetRef.currentis not updated. BecausescrollOffsetRef.currentstill holds the old deep-link offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD) andisFloatingMessageCounterVisiblewas just set tofalse,updatePillVisibility()immediately setssetIsFloatingMessageCounterVisible(true)again!6. Right after that,
flushPendingScrollToBottom()runs (src/hooks/useReportActionsScroll.ts, lines 426-433):Because the remounted
InvertedFlashListis already positioned at index 0 (orscrollToIndex({index: 0, animated: false})is a no-op at offset 0), no nativeonScrollevent is emitted,scrollOffsetRef.currentis never reset to0, andflushPendingScrollToBottom()never hides the pill or clears the stale offset. Furthermore, any subsequentonContentSizeChangecallback afterflushPendingScrollToBottom()will continue reading the stalescrollOffsetRef.current > ACTION_VISIBLE_THRESHOLDand re-showing the pill.What changes do you think we should make in order to solve the problem?
In
src/hooks/useReportActionsScroll.tsinsideflushPendingScrollToBottom(lines 426-433), resetscrollOffsetRef.current = 0and callsetIsFloatingMessageCounterVisible(false)when flushing the pending scroll to the bottom:Resetting
scrollOffsetRef.current = 0and hiding the floating message counter influshPendingScrollToBottomensures that:onContentSizeChangerantrackVerticalScrolling(undefined)right beforeflushPendingScrollToBottom()(or whileisScrollToBottomEnabledwas queued), the pill is hidden once the jump to the bottom is flushed.onContentSizeChange(trackVerticalScrolling(undefined)) seesscrollOffsetRef.current === 0(matching the actual bottom position of the list) and does not re-enable the pill until the user actually scrolls up in history.What alternative solutions did you consider?
We considered resetting
scrollOffsetRef.current = 0whenlistIDchanges inuseReportActionsListScroll.ts, or swapping the order offlushPendingScrollToBottom()andtrackVerticalScrolling(undefined)inonContentSizeChange. However,onContentSizeChangecan also fire on the render before thequeueMicrotask(() => setIsScrollToBottomEnabled(true))state update commits, andflushPendingScrollToBottomis also called fromonLayoutand non-remount live-tail jumps (wherehasNewerActionswas true without alinkedReportActionIDchange). SynchronizingscrollOffsetRef.current = 0andsetIsFloatingMessageCounterVisible(false)directly insideflushPendingScrollToBottom()handles both deep-link remount jumps and in-place live-tail jumps in one place.sonofkratos92 commentedon Nov 4, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue
When opening a chat from a deep link to an old message and then sending a message, the chat list jumps to the newest messages at the bottom, but the "Latest messages" floating pill remains visible instead of disappearing.
What is the root cause of that problem?
linkedReportActionIDin route params),<InvertedFlashList key={listID} />mounts atinitialScrollIndex = targetIndex(> 0). ItsonScrollhandler (trackScrollPositionAndThresholdinsrc/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts, lines 146-149) setsscrollOffsetRef.current(stored inActionListContextProvider,src/pages/inbox/ActionListContext.tsx, line 53) to the deep-linked scroll offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD) and callsonScrolledOverThresholdChange(true)(hasScrolledOverThreshold = trueinReportActionsListContent.tsx, line 119). OnceonLoadruns (src/hooks/useReportActionsScroll.ts, lines 436-443),updatePillVisibility()seescurrentVerticalScrollingOffsetRef.current > CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLDand setsisFloatingMessageCounterVisible = true.scrollToBottomForCurrentUserActioninsrc/pages/inbox/report/useReportActionsNewActionLiveTail.ts(lines 125-136) enters theshouldJumpToLiveTailbranch (!!linkedReportActionIDistrue), setsliveTailJumpRef.current = {stage: 'open_report'}, and callsopenReportAtLiveTail().openReportfinishes (prevIsLoadingInitialReportActions === true && reportLoadingState?.isLoadingInitialReportActions === false), two separate effects inuseReportActionsNewActionLiveTail.tsrun across consecutive renders:clearLinkedActionParam()callsnavigation.setParams({reportActionID: ''}), changinglinkedReportActionIDto''.setTreatAsNoPaginationAnchor(true)andclearLinkedActionParam(),listIDinuseReportActionsListScroll.ts(line 71:[reportID, linkedReportActionID, ...].join(':')) changes immediately. This unmounts the deep-linked<InvertedFlashList key={listID} />and mounts a brand-new<InvertedFlashList>instance at scroll offset0(initialScrollIndex = undefined).<InvertedFlashList>mounts and fires its initialonLayoutandonContentSizeChange,isScrollToBottomEnabledis stillfalse, because the second effect at lines 207-221:hasNewestReportActionbecomestrue(oncetreatAsNoPaginationAnchoristrue), and then further deferssetIsScrollToBottomEnabled(true)inside aqueueMicrotask.<InvertedFlashList>starts at offset0, it never emits anonScrollevent. Meanwhile,scrollOffsetRef.currentinActionListContextProviderstill holds the stale deep-linked offset (> CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLD), andhasScrolledOverThresholdinReportActionsListContentremainstrue(which also leavesmaintainVisibleContentPosition.disabled = falseanduseMarkAsRead'sisScrolledToEnd = false).onContentSizeChangefires on the list (useReportActionsListScroll.ts, lines 214-217):onContentSizeChangefires before thequeueMicrotasksetsisScrollToBottomEnabled = true,flushPendingScrollToBottom()returns early atif (!isScrollToBottomEnabled) return;. And onceisScrollToBottomEnabledflips totrueon the subsequent render, if layout and content size have already settled on the remounted list,flushPendingScrollToBottom()(andcompleteLiveTailPruneAfterScrollToBottom()) does not run until a future layout/content-size event.onContentSizeChangeruns (either during initial layout or afterpruneReportActionPagesToNewestWindowprunes older pages),trackVerticalScrolling(undefined)callsupdatePillVisibility()(src/pages/inbox/report/useReportUnreadMessageScrollTracking.ts, lines 98-110), which reads the stalecurrentVerticalScrollingOffsetRef.current > CONST.REPORT.ACTIONS.ACTION_VISIBLE_THRESHOLDand immediately callssetIsFloatingMessageCounterVisible(true), turning the "Latest messages" pill back on.4ac01f2d, Open reports at first unread action V2),key={listID}was originally placed on<ReportActionsList key={listID} />inReportActionsView.tsx.856bc8e1, Decompose ReportActionsList: 10),key={listID}was moved down onto<InvertedFlashList key={listID} />whileReportActionsListContentwas keyed bykey={reportID}, souseReportActionsScroll,useReportUnreadMessageScrollTracking, andActionListContext'sscrollOffsetRef.currentremained mounted whenclearLinkedActionParam()remounted<InvertedFlashList key={listID} />at offset0.088b2bb3, Show the Latest messages pill in a read chat when scrolled up past the visible threshold), the pill threshold inuseReportUnreadMessageScrollTracking.tswas lowered fromLATEST_MESSAGES_PILL_SCROLL_OFFSET_THRESHOLD(2000) toACTION_VISIBLE_THRESHOLD(250), causingtrackVerticalScrolling(undefined)ononContentSizeChangeto re-show the pill whenever the stale deep-linkedscrollOffsetRef.current > 250. (PR Scroll to the user's own comment in expense reports when the new-message indicator is showing #103174 /2403f672and PR fix: show offline messages sent from linked actions #104845 /c9084eb8further wiredflushPendingScrollToBottom()aftertrackVerticalScrolling(undefined)inonContentSizeChangeand added the offline linked-action anchor release; PR Read the Concierge chat on press instead of subscribing to it in render #104242 /bc5e11dfon the current staging checklist Deploy Checklist: New Expensify 2026-11-04 #105971 only refactoredopenReportAtLiveTailto read Onyx inputs viaOnyx.multiGet/Onyx.get, which is why the regression test on Read the Concierge chat on press instead of subscribing to it in render #104242 surfaced this pre-existing behavior.)What changes do you think we should make in order to solve the problem?
scrollOffsetRef.currentandhasScrolledOverThresholdwhen releasing the linked-action anchor and jumping to the live tail:onScrolledOverThresholdChangeintouseReportActionsScrolland expose aresetScrollToBottomStatecallback (which setsscrollOffsetRef.current = 0, callsonScrolledOverThresholdChange(false), and callssetIsFloatingMessageCounterVisible(false)) touseReportActionsNewActionLiveTail.src/pages/inbox/report/useReportActionsNewActionLiveTail.ts, callresetScrollToBottomState()when releasing the linked-action anchor (in theopen_reportcompletion effect at lines 202-204, theawait_scrolleffect at lines 215-220, and the offline linked-action send branch at lines 139-143) so thatscrollOffsetRef.currentis0andhasScrolledOverThresholdisfalsebefore the remounted<InvertedFlashList key={listID} />mounts and runsonContentSizeChange.isScrollToBottomEnabledbecomestrueand reset scroll state insideflushPendingScrollToBottom:src/hooks/useReportActionsScroll.tsinsideflushPendingScrollToBottom(lines 426-433), also callresetScrollToBottomState(), and invokeflushPendingScrollToBottom()from an effect whenisScrollToBottomEnabledbecomestrue(once the list ref is laid out) so the scroll and pagination prune are not missed ifonLayout/onContentSizeChangealready fired before thequeueMicrotaskrender:flushPendingScrollToBottom()beforetrackVerticalScrolling(undefined)inonContentSizeChange:src/pages/inbox/report/ReportActionsList/useReportActionsListScroll.ts(lines 214-217):What alternative solutions did you consider?
scrollOffsetRef.current = 0insideflushPendingScrollToBottom(): This is not sufficient on its own becauseclearLinkedActionParam()remounts<InvertedFlashList key={listID} />in the render beforequeueMicrotask(() => setIsScrollToBottomEnabled(true))commits, soisScrollToBottomEnabledis stillfalsewhen the remounted list fires its initialonLayoutandonContentSizeChange, andhasScrolledOverThresholdinReportActionsListContentwould also staytrue(leavingmaintainVisibleContentPositionenabled anduseMarkAsRead'sisScrolledToEndasfalse).scrollOffsetRef.current = 0inActionListContext.registerListRefon every unmount/mount:ReportActionsListThresholdTestspecifically requiresscrollOffsetRef.currentto persist across mount when preserving scroll position above the threshold. ResettingscrollOffsetRef.current = 0andonScrolledOverThresholdChange(false)specifically during a live-tail / scroll-to-bottom jump preserves mount-time threshold behavior.camesenin commentedon Nov 4, 2026
melvin-bot commentedon Nov 4, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
33 remaining items
expensify-chore-bot commentedon Nov 15, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)expensify-chore-bot commentedon Nov 15, 2026
Payment Summary
Resolving PRs:
Hide Latest messages pill after sending from an old-message link #106064
Reviewer: @ikevin127 owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Nov 17, 2026
Claude posting on behalf of Matt:
Ready. Job price: $175 (standard, no Help Wanted, assigned 2026-11-04).
No deploy blockers. The offending PRs 100793 and 104242 name no payee.
Next: press Caps+Y, then pay.
Evidence
PAYPREP v1mallenexpensify commentedon Nov 19, 2026
Payment Summary
Contributor+: @ikevin127 due $175 via NewDot