-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Spun off from Expensify/Expensify#599556 per marcaaron's request.
Problem
In a Concierge chat, the user-facing "Concierge is thinking..." / "Concierge is waiting for you to finish..." status indicator can get stuck and not clear until the user refreshes the page.
The useAgentZeroStatusIndicator() hook sets an optimistic "Concierge is waiting for you to finish..." label when the user sends a message. If the Pusher updates carrying the intermediate/clearing labels are dropped, the optimistic label stays stuck until a refresh.
The server-side clearing mechanisms are confirmed to be working correctly (the indicator clears after a page refresh, confirming DB state is correct). The issue is on the client side — the real-time Onyx push update is being missed.
Expected Behavior
The typing/status indicator should reliably clear without requiring a page refresh.
Debugging Info
- Example chat/reportID: 61393108
- Current indicator hook reference:
const WAITING_LABEL = 'Concierge is waiting for you to finish...'; - Observed behavior from logs: Server did set the value that clears the indicator, but client likely missed the Pusher/Onyx update (indicator cleared after refresh, implying DB state was correct).
- Log search (AgentZero request): https://www.expensify.com/_devportal/tools/logSearch/#sort=asc&size=10000&query=(%22agentZeroRequestID_kVDrBA%22)%20timestamp%3A%5B2026-02-11T00%3A00%20TO%202026-02-12T23%3A59%5D&engine=victorialogs
Investigation Notes (from Expensify/Expensify#599556)
Server-side clearing (confirmed working — 3 layers of redundancy):
- Auth C++
finalizeResponse()callsemitConciergeStatus(reportID, "", true)→UpdateConciergeStatusPHP API - PHP main flow
clearUserFacingIndicator()→Auth::setReportNameValuePair()→ generates Onyx update - PHP
finallyblock safety net → sameAuth::setReportNameValuePair()path
Client-side (suspected problem area):
- The
agentZeroProcessingRequestIndicatorrNVP IS included in the reliable Onyx updates system (clients can catch up on missed updates viaGetOnyxUpdates) - The
useAgentZeroStatusIndicator()hook sets an optimistic label when the user sends a message — if Pusher updates are dropped, this optimistic label gets stuck - There is no polling/reconciliation mechanism for this specific indicator
- A possible fix: add a client-side timeout to clear the indicator if no update is received within a reasonable window
Potential Solutions
- Investigate why the Onyx update clearing the indicator is being missed by the client
- Consider adding a timeout-based fallback in
useAgentZeroStatusIndicatorto clear the stuck indicator after a reasonable duration - Investigate if there is a Pusher reliability issue or an Onyx re-sync gap for this specific rNVP
Issue Owner
Current Issue Owner: @QichenZhuUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022027538040479794626
- Upwork Job ID: 2027538040479794626
- Last Price Increase: 2026-02-28