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-30] [Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting #88087
Version Number: v9.3.60-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: N/A Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: Windows 11/ Chrome App Component: Chat Report View
Action Performed:
Sign in to staging.new.expensify.com
Navigate to a conversation
Paste a text in compose box and send (copy a comment and paste in the compose box)
Hover over the comments in view
Expected Result:
Each comment is highlighted when hovered upon
Actual Result:
Comments are not highlighted when hovered upon and highlight function only starts working if the user scrolls through the conversation
👋 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.
After pasting text in the compose box and sending a message, hovering over comments no longer highlights them. Hover highlighting only resumes after the user manually scrolls.
What is the root cause of that problem?
Bug in useEmitComposerScrollEvents — when the first scroll event fires, it emits SCROLLING: true but never schedules SCROLLING: false.
The key logic error is on line 81: the setTimeout that emits SCROLLING: false is only scheduled when lastScrollEvent.current is truthy, but on the first call it's null (initialized on line 21). So lastScrollEvent.current gets set to the timestamp after the check, but the timeout is never created.
When a message is sent, the list auto-scrolls via scrollToOffset({animated: false, offset: 0}) which fires exactly one scroll event. That single event hits this first-call bug: SCROLLING: true is emitted, SCROLLING: false never follows. ActiveHoverable suppresses all hover updates while isScrollingRef.current is true, so hover highlighting breaks globally.
Manual scrolling generates multiple scroll events — the second event finds lastScrollEvent.current truthy, properly schedules the timeout, and SCROLLING: false eventually fires, restoring hover.
What changes do you think we should make in order to fix the problem?
Move the lastScrollEvent.current = timestamp assignment before the if (lastScrollEvent.current) check, or remove the guard entirely so the timeout is always scheduled (matching the pattern in useScrollEventEmitter which correctly always schedules the timeout).
Specifically in src/hooks/useEmitComposerScrollEvents/index.ts, change emitComposerScrollEvents to:
constemitComposerScrollEvents=()=>{if(!enabled||!inverted){return;}onScroll();consttimestamp=Date.now();if(scrollEndTimeout.current){clearTimeout(scrollEndTimeout.current);}// Always schedule the scroll-end timeout (removed the lastScrollEvent.current guard)scrollEndTimeout.current=setTimeout(()=>{if(lastScrollEvent.current!==timestamp){return;}lastScrollEvent.current=null;onScrollEnd();},250);lastScrollEvent.current=timestamp;};
The bug in useEmitComposerScrollEvents means a single scroll event leaves SCROLLING stuck as true
Comparison with useScrollEventEmitter: The older useScrollEventEmitter hook (used by LHN and other lists) does not have this bug — it always schedules the SCROLLING: false timeout unconditionally on every call.
Introduced in: PR #87418, which created the useEmitComposerScrollEvents hook.
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.
Yes — this is a regression from #85114 ("Migrate main chat to FlashList with inverted flag" by VickyStash, merged Apr 15 2026).
That PR created src/components/FlashList/index.tsx, which wraps every FlashListonScroll with useEmitComposerScrollEvents(). The hook has a pre-existing first-call bug (see my proposal above) where a single scroll event emits SCROLLING: true but never schedules SCROLLING: false. Before this PR, the report actions list used FlatList and didn't go through this wrapper, so the bug was never triggered on the chat view.
After sending a message, the list auto-scrolls via scrollToOffset({animated: false, offset: 0}), which fires exactly one scroll event through the new FlashList wrapper → hits the first-call bug → hover stays permanently suppressed until the user manually scrolls (which generates a second event that clears the stuck state).
changed the title [-]Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/-][+][Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/+]on Apr 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.60-22 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@situchan 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]
changed the title [-][Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/-][+][Due for payment 2026-04-30] [Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/+]on Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@situchan 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 Apr 16, 2026
Triggered auto assignment to @mollfpr (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Apr 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 16, 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 Apr 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After pasting text in the compose box and sending a message, hovering over comments no longer highlights them. Hover highlighting only resumes after the user manually scrolls.
What is the root cause of that problem?
Bug in
useEmitComposerScrollEvents— when the first scroll event fires, it emitsSCROLLING: truebut never schedulesSCROLLING: false.The key logic error is on line 81: the
setTimeoutthat emitsSCROLLING: falseis only scheduled whenlastScrollEvent.currentis truthy, but on the first call it'snull(initialized on line 21). SolastScrollEvent.currentgets set to the timestamp after the check, but the timeout is never created.When a message is sent, the list auto-scrolls via
scrollToOffset({animated: false, offset: 0})which fires exactly one scroll event. That single event hits this first-call bug:SCROLLING: trueis emitted,SCROLLING: falsenever follows.ActiveHoverablesuppresses all hover updates whileisScrollingRef.currentistrue, so hover highlighting breaks globally.Manual scrolling generates multiple scroll events — the second event finds
lastScrollEvent.currenttruthy, properly schedules the timeout, andSCROLLING: falseeventually fires, restoring hover.This is web-only because the native implementation is a no-op.
What changes do you think we should make in order to fix the problem?
Move the
lastScrollEvent.current = timestampassignment before theif (lastScrollEvent.current)check, or remove the guard entirely so the timeout is always scheduled (matching the pattern inuseScrollEventEmitterwhich correctly always schedules the timeout).Specifically in
src/hooks/useEmitComposerScrollEvents/index.ts, changeemitComposerScrollEventsto:Investigation details
Evidence chain:
PureReportActionItemwraps each action in<Hoverable shouldHandleScroll>(PureReportActionItem.tsx:1648)ActiveHoverablelistens forSCROLLINGevents and suppresses hover when scrolling is true (ActiveHoverable.tsx:30-32,ActiveHoverable.tsx:50-61)FlashListwraps the report actions list and callsemitComposerScrollEvents()on every scroll (FlashList/index.tsx:10-14)scrollToBottomfires a non-animated scroll (useReportScrollManager/index.ts:23-29)useEmitComposerScrollEventsmeans a single scroll event leavesSCROLLINGstuck astrueComparison with
useScrollEventEmitter: The olderuseScrollEventEmitterhook (used by LHN and other lists) does not have this bug — it always schedules theSCROLLING: falsetimeout unconditionally on every call.Introduced in: PR #87418, which created the
useEmitComposerScrollEventshook.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.mollfpr commentedon Apr 16, 2026
@MelvinBot Any regression from the recent PR deployed to staging?
MelvinBot commentedon Apr 16, 2026
Yes — this is a regression from #85114 ("Migrate main chat to FlashList with inverted flag" by
VickyStash, merged Apr 15 2026).That PR created
src/components/FlashList/index.tsx, which wraps everyFlashListonScrollwithuseEmitComposerScrollEvents(). The hook has a pre-existing first-call bug (see my proposal above) where a single scroll event emitsSCROLLING: truebut never schedulesSCROLLING: false. Before this PR, the report actions list usedFlatListand didn't go through this wrapper, so the bug was never triggered on the chat view.After sending a message, the list auto-scrolls via
scrollToOffset({animated: false, offset: 0}), which fires exactly one scroll event through the new FlashList wrapper → hits the first-call bug → hover stays permanently suppressed until the user manually scrolls (which generates a second event that clears the stuck state).mollfpr commentedon Apr 16, 2026
@VickyStash could you check this? Thanks!
8 remaining items
Julesssss commentedon Apr 17, 2026
Verified fixed here
[-]Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/-][+][Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/+]melvin-bot commentedon Apr 21, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.60-22 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-28. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 21, 2026
@situchan 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]
[-][Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/-][+][Due for payment 2026-04-30] [Due for payment 2026-04-28] Web - Comment/ expense not highlighted when hovered upon in a conversation after pasting[/+]melvin-bot commentedon Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 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-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 23, 2026
@situchan 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]