Repository navigation
[Payment due @TaduJR] Show Concierge thinking immediately - #106142
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b92e65d38
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Do you need a review here @inimaga? |
|
@TaduJR eventually, yes, when the PR comes off hold |
|
Sure I will keep an eye on reviewing the code til then |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMac-Chrome.mp4 |
Pending sends are kept per message with the reply ID the client reserves, so an older reply or completion cannot clear a newer message. The server decision and completion events apply on every tab without waiting for that tab's request queue. The reconnect completion lookup is removed because the reply itself, or the worker's completion event, finishes each message.
…d Concierge messages
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
The escalation notice is saved on the report by the server and comes back on the next OpenReport, so the 120 second safety clear and the reconnect clear now leave it in place and only drop the local waiting state. The live label a run sends is a per-agent map, so a plain string on the report is the saved kind. Also cover a pregenerated followup creating no waiting state, reuse the store's fresh-entry lookup, name the reply-matching hook, and explain the move guards.
Keep both new selectors in src/selectors/ReportAction.ts. Main and this branch each added one middleware, so the registration tests now expect 20.
|
@TaduJR This PR is now ready for review. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
🤖 Web test steps verification results: No confirmed regression; web verification remains incomplete. All 72 tests across five focused unit suites passed, with React
|
|
I think the PR description can be updated the WE PR is deployed? |
|
🚧 inimaga has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
TaduJR
left a comment
There was a problem hiding this comment.
Thanks @inimaga.
The main flow works: the indicator shows right after send, two quick questions in one thread work, and switching chats keeps it. I left a few inline comments. Two more things:
- One reply for several pending messages. With 3 images sent in an existing thread, each file becomes its own turn (Report/index.ts#L1429). Concierge replied once at ~21 s, but "thinking" stayed until ~35 s, when the server finished the other two without a reply. Two quick questions answered in one reply did the same, ~7 s extra. Is that expected from the backend, or can it finish the other messages when it answers them together?
| */ | ||
| function hasPersistedAgentZeroProcessingLabelSelector(reportNameValuePairs: OnyxEntry<ReportNameValuePairs>): boolean { | ||
| const indicator = reportNameValuePairs?.agentZeroProcessingRequestIndicator; | ||
| return typeof indicator === 'string' && !!indicator.trim(); |
There was a problem hiding this comment.
Every live label on staging came as a per-agent map. Does any backend path still write a live label as a plain string? If so, this treats it as saved and it no longer clears locally.
There was a problem hiding this comment.
Confirmed on the backend: No live progress path writes a plain string anymore. All live status updates are sent as a per-agent map. Only the persisted escalation and human-handling notices are written as plain strings, so treating non-empty strings as saved labels won't stop any live label from clearing locally.
|
@TaduJR This is ready for another review round! Also added some screenshots for the testing. Regarding your question:
That's expected from the backend today rather than something the client can infer safely. When multiple messages are batched into the same backend run before it starts, the backend already finishes all of them together when that run completes. However, when extra messages (or the 2nd and 3rd files from a multi-attachment send in an existing thread, since each file is sent as a separate request) arrive after the first run is already in flight, they are queued into a follow-up run. The first run only knows about its own batch, so the extra messages stay pending until that follow-up run checks them and finishes without posting another reply. Having the client clear all pending turns on a single reply would reintroduce the bug where an older reply prematurely hides the indicator for a genuinely newer question that still needs its own answer. |
|
@NicolasBonet Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🎯 @TaduJR, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
Please create the Payment issue on App side |
|
Created Payment issue for TaduJR — Show Concierge thinking immediately review, assigned to Payment timing and amount remain pending confirmation; the PR is not yet merged. |
|
🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.5.57-0 🚀
|
|
No help site update needed — this PR fixes the existing Concierge thinking indicator’s timing and reliability without adding a new workflow or making existing article guidance incorrect. |


Explanation of Change
The “Concierge is thinking” indicator can appear late or fail to appear after you send a message. This change shows it as soon as you send a message in a Concierge DM or thread.
App tracks each message separately. A reply or completion clears the indicator for that message, so it stays visible while a newer message is still waiting. It also clears when Concierge won’t respond, when a queued offline message is deleted before send, or when the message fails to send. For messages queued while offline, the 120-second safety window restarts when the request is dispatched after reconnecting, and brief disconnects mid-run preserve active server labels and reasoning history.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/695383
PROPOSAL: N/A
Tests
Note: the Concierge processing update is already merged and deployed.
Offline tests
QA Steps
Repeat the test steps on staging.
Query Timings/Plans
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Immediate "Concierge is thinking..." upon sending:

Concierge reply arrives and clears indicator automatically:

Two quick questions in the same Concierge thread:

Switching chats and returning preserves the thinking indicator:

Offline send stays pending with no thinking indicator:

Reconnecting shows the thinking indicator and clears once Concierge replies:

