Problem
When returning to a room or DM that has multiple unread messages, the chat positions you at the "New" unread marker but shows only the first unread message. No ↓ New messages floating pill appears, so there is no indication that more messages exist below the fold. The same issue occurs when multiple messages arrive rapidly while you are already in the chat.
Reproducible consistently in rooms (e.g. #social) and DMs.
Repro steps
Scenario A – returning to a chat after being away
- Be active in a room or DM and send or read a message (so you have a "last read" position).
- Leave the chat / go offline for a period while other people post multiple messages.
- Return to the chat.
- Expected: The chat opens at the "New" marker AND a
↓ New messages pill appears indicating more messages exist below.
- Actual: The chat opens at the "New" marker showing only the first unread message. No pill appears. All subsequent messages are hidden below the fold with no indication they exist.
Scenario B – multiple messages arrive while you are in the chat
- Be in a DM or room with another person.
- Have the other person send 5+ messages in quick succession.
- Expected: Either auto-scroll to the newest message, OR show the
↓ New messages pill.
- Actual: View stays put, only the most recent message (nearest the unread marker) is visible, no pill appears.
Root cause analysis
There are two related mechanisms at play:
1. Auto-scroll intentionally skips the recipient
useReportActionsNewActionLiveTail.ts only auto-scrolls to the bottom for messages sent by the current user (isFromCurrentUser). For incoming messages the recipient is expected to rely on the floating pill — which is where the bug lies.
2. The pill is gated on the unread marker's visibility, not the bottom's
In useReportUnreadMessageScrollTracking.ts, the pill is force-hidden whenever the unread marker row is considered visible:
const unreadActionVisible = isInverted ? unreadActionIndex >= minIndex : unreadActionIndex <= maxIndex;
if (unreadActionVisible && hasUnreadMarkerReportAction) {
setIsFloatingMessageCounterVisible(false);
}
The implicit assumption is "if you can see the New marker, you can see all the new messages." This only holds when the entire unread block fits in one viewport.
When many messages have accumulated, ReportActionsList.tsx positions the list at the unread marker (via initialScrollKey), which places the marker near the top of the visible area. The marker row is technically visible so the pill is suppressed — but all the newer messages below the marker are off-screen with no way to know they exist.
Suggested fix direction: Gate the pill on whether the newest / bottom action is visible (combined with "has unread"), rather than solely on whether the unread marker is visible. This way, landing at the marker with more messages below the fold will still surface the ↓ New messages pill.
Affected areas
src/pages/inbox/report/useReportUnreadMessageScrollTracking.ts
src/pages/inbox/report/useReportActionsNewActionLiveTail.ts
src/components/ReportActionsList.tsx (initialScrollKey / scroll-on-mount logic)
Platform
All platforms (confirmed on web/desktop NewDot)
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mkhutornyi
Problem
When returning to a room or DM that has multiple unread messages, the chat positions you at the "New" unread marker but shows only the first unread message. No
↓ New messagesfloating pill appears, so there is no indication that more messages exist below the fold. The same issue occurs when multiple messages arrive rapidly while you are already in the chat.Reproducible consistently in rooms (e.g.
#social) and DMs.Repro steps
Scenario A – returning to a chat after being away
↓ New messagespill appears indicating more messages exist below.Scenario B – multiple messages arrive while you are in the chat
↓ New messagespill.Root cause analysis
There are two related mechanisms at play:
1. Auto-scroll intentionally skips the recipient
useReportActionsNewActionLiveTail.tsonly auto-scrolls to the bottom for messages sent by the current user (isFromCurrentUser). For incoming messages the recipient is expected to rely on the floating pill — which is where the bug lies.2. The pill is gated on the unread marker's visibility, not the bottom's
In
useReportUnreadMessageScrollTracking.ts, the pill is force-hidden whenever the unread marker row is considered visible:The implicit assumption is "if you can see the New marker, you can see all the new messages." This only holds when the entire unread block fits in one viewport.
When many messages have accumulated,
ReportActionsList.tsxpositions the list at the unread marker (viainitialScrollKey), which places the marker near the top of the visible area. The marker row is technically visible so the pill is suppressed — but all the newer messages below the marker are off-screen with no way to know they exist.Suggested fix direction: Gate the pill on whether the newest / bottom action is visible (combined with "has unread"), rather than solely on whether the unread marker is visible. This way, landing at the marker with more messages below the fold will still surface the
↓ New messagespill.Affected areas
src/pages/inbox/report/useReportUnreadMessageScrollTracking.tssrc/pages/inbox/report/useReportActionsNewActionLiveTail.tssrc/components/ReportActionsList.tsx(initialScrollKey/ scroll-on-mount logic)Platform
All platforms (confirmed on web/desktop NewDot)
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mkhutornyi