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
Concierge-After returning to Concierge user lands on unread message but marker is not visible #105438
Version Number: 9.5.26-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#100552 Email or phone of affected tester (no customers):ibellicotest+3215@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11 / Chrome App Component: Other
Action Performed:
Prerequisite: Concierge chat has chat history.
Prerequisite 2: “Track expenses for my business “ selected during onboarding.
Open the staging.new.expensify.com website.
Navigate to Concierge chat.
Scroll up and mark any message as unread.
Click on "Hide chat history" at the bottom of the chat.
Navigate to a different chat and return to "Concierge"
Note that chat is expanded and you land on unread message, but unread marker is not displayed.
Expected Result:
After returning to Concierge chat, user should be navigated to unread message and unread marker should be visible above it.
Actual Result:
After marking a message as unread and returning to "Concierge", chat is expanded and user lands on unread message, but unread marker is not displayed.
👋 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.
Recommendation: Fix forward and consider demoting. Don't revert. You still land on the right message; only the "New" divider is missing. The flow is narrow and desktop-only, no data is lost, and the feature isn't in production. Reverting a 58-file PR with a backend dependency carries more risk.
Likely root cause (medium confidence, not reproduced): The PR removed the main Concierge chat's newMessageBoundaryTime. ReportActionsList.tsx:225 now passes undefined unless you're in the side panel (useReportActionsVisibility.ts:63). When history auto-expands on return, the marker logic treats older loaded messages as "just arrived" and skips them. It then moves unreadMarkerTime past the unread message (useUnreadMarker.ts:156-168).
Suggested fix:
Record a historyExpandedAt time in ConciergeChatHistoryProvider when setShowFullHistory(true) runs. Pass it as newMessageBoundaryTime for the main chat when history is expanded.
Why desktop only: On wide layouts the report screen stays mounted (ReportFetchHandler.tsx:505-507), so the stale marker state from the hide step carries over.
Open gap: Hiding marks the chat read, yet the repro shows it unread again on return. No app code was found that re-marks it unread. A late MarkAsUnread response may overwrite the read time, but that's unconfirmed.
The most likely fix is in useUnreadMarker. When lastReadTime moves backwards, move unreadMarkerTime back with it. Right now the marker time is set once at mount, so it can stay stuck at the "read" time that "Hide chat history" set.
This corrects my earlier comment. Restoring newMessageBoundaryTime for the main chat probably won't help. In the main chat, the actions are already in the list before the welcome screen returns early, so none of them count as "just arrived."
const [unreadMarkerTime, setUnreadMarkerTime] = useState(reportLastReadTime);
+ // lastReadTime moved backwards (marked unread, or the server replaced an optimistic read with an older time).+ // Move the watermark back so the unread action can show the New marker.+ const [prevReportLastReadTime, setPrevReportLastReadTime] = useState(reportLastReadTime);+ if (prevReportLastReadTime !== reportLastReadTime) {+ setPrevReportLastReadTime(reportLastReadTime);+ if (reportLastReadTime && reportLastReadTime < unreadMarkerTime) {+ setUnreadMarkerTime(reportLastReadTime);+ }+ }
The change only moves the marker time backwards. Live auto-read and the forward push at useUnreadMarker.ts:166 work as before.
Fallback: if you'd rather keep the change inside the Concierge code, skip readNewestAction in collapseHistory (ConciergeChatHistoryContext.tsx:47-50) when manuallyMarkedUnreadReportActionID is set. Hiding history then won't overwrite a manual mark-as-unread.
Why the marker disappears (medium confidence, not reproduced)
"Hide chat history" calls readNewestAction(conciergeReportID, true). This sets Onyx lastReadTime to now but doesn't send the marker-reset event (Report/index.ts:3320-3337).
When you come back, the list mounts and useState(reportLastReadTime) captures that "now" value (useUnreadMarker.ts:82). After that, it only changes through the two events at :89-94 or by moving forward.
lastReadTime then goes back to the older value, which is why the chat counts as unread again. ReportActionsSkeletonGuard.tsx:49-54 expands history and scrolls to the message. But the marker scan compares each message against the stale "now" time, so it finds nothing.
OpenReport clears the manual-unread anchor on a return trip (Report/index.ts:1769-1788), so the timestamp scan is the only way left to show the marker.
Not confirmed:
Why lastReadTime goes back to the older value after hiding. Check the ReadNewestAction request sent on hide and the lastReadTime in the OpenReport response on return. If the server keeps the older time on purpose, use the fallback.
Whether the list remounts on return. The bug suggests it does. If it stayed mounted, the old marker time would survive and the marker would show.
Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this.
Activity
applause-bot commentedon Oct 30, 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/a84295c0740efc8770be5c936ad0aff308aeaf7ba2bef8c2cfbcd9d24d053bfb
melvin-bot commentedon Oct 30, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #100552
melvin-bot commentedon Oct 30, 2026
@puneetlath @mkhutornyi you have been assigned to this deploy blocker because you reviewed the offending PR: #100552
melvin-bot commentedon Oct 30, 2026
@rushatgabhane you have been assigned to this deploy blocker because you authored the offending PR: #100552
melvin-bot commentedon Oct 30, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 30, 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:
rushatgabhane commentedon Oct 30, 2026
@MelvinBot how to fix this?
rushatgabhane commentedon Oct 30, 2026
not blocker worthy
unless you mark as unread can't be reproduced
MelvinBot commentedon Oct 30, 2026
Deploy Blocker Analysis
Causing PR: [Payment due @mkhutornyi] Add ask Concierge screen (merge
0ae60d72), high confidence. It is the only PR in Deploy Checklist: New Expensify 2026-10-29 that touches Concierge or unread-marker code. It added every part of the repro: "Hide chat history," marking the chat read on hide, and auto-expanding history when a message is unread.Recommendation: Fix forward and consider demoting. Don't revert. You still land on the right message; only the "New" divider is missing. The flow is narrow and desktop-only, no data is lost, and the feature isn't in production. Reverting a 58-file PR with a backend dependency carries more risk.
Likely root cause (medium confidence, not reproduced): The PR removed the main Concierge chat's
newMessageBoundaryTime.ReportActionsList.tsx:225now passesundefinedunless you're in the side panel (useReportActionsVisibility.ts:63). When history auto-expands on return, the marker logic treats older loaded messages as "just arrived" and skips them. It then movesunreadMarkerTimepast the unread message (useUnreadMarker.ts:156-168).Suggested fix:
historyExpandedAttime inConciergeChatHistoryProviderwhensetShowFullHistory(true)runs. Pass it asnewMessageBoundaryTimefor the main chat when history is expanded.collapseHistory(ConciergeChatHistoryContext.tsx:47-50), callreadNewestAction(conciergeReportID, true, true)so the marker state resets.useUnreadMarkertest: unread Concierge message, history loaded after mount, marker stays on that message.Investigation details
useConciergeAskState.ts:54-61skips the welcome screen when there's an unread message from someone else.ReportActionsSkeletonGuard.tsx:46-54then callssetShowFullHistory(true), which overrides the user's earlier "Hide chat history."loadOlderChats(true)(useReportActionsVisibility.ts:116-118) fail the check atshouldDisplayNewMarkerOnReportAction.ts:119-123. OpenReport also clears the manual unread anchor (Report/index.ts:1769-1788), and the page marks the chat read on open (useMarkAsRead.ts:222-245).ReportFetchHandler.tsx:505-507), so the stale marker state from the hide step carries over.MarkAsUnreadresponse may overwrite the read time, but that's unconfirmed.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.MelvinBot commentedon Oct 30, 2026
The most likely fix is in
useUnreadMarker. WhenlastReadTimemoves backwards, moveunreadMarkerTimeback with it. Right now the marker time is set once at mount, so it can stay stuck at the "read" time that "Hide chat history" set.This corrects my earlier comment. Restoring
newMessageBoundaryTimefor the main chat probably won't help. In the main chat, the actions are already in the list before the welcome screen returns early, so none of them count as "just arrived."Suggested change, right after
useUnreadMarker.ts:82:The change only moves the marker time backwards. Live auto-read and the forward push at
useUnreadMarker.ts:166work as before.Fallback: if you'd rather keep the change inside the Concierge code, skip
readNewestActionincollapseHistory(ConciergeChatHistoryContext.tsx:47-50) whenmanuallyMarkedUnreadReportActionIDis set. Hiding history then won't overwrite a manual mark-as-unread.Why the marker disappears (medium confidence, not reproduced)
readNewestAction(conciergeReportID, true). This sets OnyxlastReadTimeto now but doesn't send the marker-reset event (Report/index.ts:3320-3337).useState(reportLastReadTime)captures that "now" value (useUnreadMarker.ts:82). After that, it only changes through the two events at:89-94or by moving forward.lastReadTimethen goes back to the older value, which is why the chat counts as unread again.ReportActionsSkeletonGuard.tsx:49-54expands history and scrolls to the message. But the marker scan compares each message against the stale "now" time, so it finds nothing.Report/index.ts:1769-1788), so the timestamp scan is the only way left to show the marker.Not confirmed:
lastReadTimegoes back to the older value after hiding. Check theReadNewestActionrequest sent on hide and thelastReadTimein theOpenReportresponse on return. If the server keeps the older time on purpose, use the fallback.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this.puneetlath commentedon Oct 30, 2026
Demoting.