Repository navigation
[NoQA] Keep first Concierge send span alive across the thread switch - #104240
mjasikowski merged 5 commits into
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@MelvinBot review |
ReviewThe fix looks correct. Each send is now cancelled only by the report it renders in, so the side-panel thread switch no longer kills the first Concierge send. I found no blocking issues. CI checks pass, except the approval check. Suggestions (non-blocking):
What I checked
|
83dde6c to
f02d2b9
Compare
f02d2b9 to
cb08a1b
Compare
|
@MelvinBot test |
Codex Review SummaryThis 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. |
|
@mjasikowski 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] |
|
|
||
| const SEND_MESSAGE_VISIBLE_PREFIX = `${CONST.TELEMETRY.SPAN_SEND_MESSAGE_VISIBLE}_`; | ||
|
|
||
| // Report each in-flight send renders in, keyed by parent span id. A Concierge respond-in-thread send renders in the new thread, not in the chat it was typed in. |
There was a problem hiding this comment.
Report each in-flight send renders in
Can you convert this to human language please? 😄
dylanexpensify
left a comment
There was a problem hiding this comment.
@LukasMod mind confirming this comment:
The remaining gap is validation: the web test used a different chat and couldn’t inspect span cancellation attributes. Before calling it fully verified, I’d confirm a first Concierge respond-in-thread send finishes
|
@dylanexpensify
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
…read-send-span-cancel
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.5.24-1 🚀
|
|
No help site update is needed. This PR only changes internal Sentry performance spans for sent messages, and users see no change in the app. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.24-8 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
ManualSendMessageVisiblespan cancelled after about 200ms, before the message rendered.openSidePanel({reportID: conciergeThreadReportID})(useComposerSubmit.ts:150).SidePanelReportis not keyed, so the sameReportScreengets a newreportID. TheReportLifecycleHandlercleanup then rancancelAllSendMessageSpans(), which cancels every send span regardless of report. This started with "Open thread in sidepanel" (945f4678d5f4).sendMessageSpans.ts:15,:25;useComposerSubmit.ts:116,:127).ReportLifecycleHandlernow callscancelSendMessageSpansForReport(onyxReportID)(ReportLifecycleHandler.tsx:55,sendMessageSpans.ts:103), which cancels only that report's spans and their phase spans.SearchMoneyRequestReportPageis scoped the same way. Its unmount callscancelSendMessageSpansForReport(reportIDFromRoute)(SearchMoneyRequestReportPage.tsx:246), andcancelAllSendMessageSpansis removed. A normal span end deletes its own map entry (sendMessageSpans.ts:84), and the sweep drops stale entries too (:109).report_idand the other span attributes are unchanged, so Sentry queries keep working. The target report lives in a module-level map onlyCould be related to this changes: #99317, deployed to production on Sep 16 with beta flag.
https://expensify.sentry.io/dashboard/9443290/?statsPeriod=30d
Fixed Issues
$ #104663
PROPOSAL:
Tests
Test 1: Concierge side panel, first message
Test 2: Concierge side panel, follow-up in the thread
Test 3: Concierge chat in the main view, first message
Test 4: Regular chat
Test 5: Expense report in Search
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-10-20.at.09.06.41.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-10-19.at.17.00.50.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
web.concierge.mov