Skip to content

[Due for payment 2026-06-26] [Due for payment 2026-06-25] Expense - Exported file is not received in Concierge chat #93873

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.10-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: #92169
Email or phone of affected tester (no customers): soidnjosjdojsdojsojsoi11@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Go to Spend > Expenses.
  5. Select the expense via checkbox.
  6. Click dropdown button > Export > All Data - expense level.
  7. Quickly click "Send me the file when it's ready", then click "Go to Concierge".

Expected Result:

User will receive the exported file in Concierge chat.

Actual Result:

User does not receive the exported file in Concierge chat.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7183823_1781722053035.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7183823

Issue OwnerCurrent Issue Owner: @truph01

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 17, 2026
  2. applause-bot commented on Jun 17, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/a524494de3d9d04a986a1b75b60fba8645508ec6294bf0e3be47885dca56b814

  3. melvin-bot commented on Jun 17, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #92169

  4. melvin-bot commented on Jun 17, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 17, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 17, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    When the export is still PREPARING, clicking "Send me the file when it's ready" and then quickly "Go to Concierge" fires a ClearExportDownload request that cancels the export job before the backend has finished preparing and delivering it to Concierge.

    The race is entirely on the App side:

    1. The export is created in PREPARING state (Search.ts:1253-1284).
    2. Clicking "Send me the file when it's ready" calls sendExportFileFromConcierge, which optimistically sets shouldSendFromConcierge: true and fires SendExportFileFromConcierge (Export.ts:10-30).
    3. Clicking "Go to Concierge" calls onClose() → handleExportModalClose (ExportDownloadStatusModal.tsx:88-93).
    4. In handleExportModalClose the early-return guard is state === PREPARING && !shouldSendFromConcierge. Because shouldSendFromConcierge is now true, the guard does not fire, so it proceeds to call clearExportDownload(...) → ClearExportDownload (Export.ts:32-52).

    So the App sends ClearExportDownload for an export that is still preparing, immediately after asking the backend to deliver it via Concierge — clearing the in-flight job and preventing delivery. This matches the symptom: it only fails when clicking "quickly" (while still PREPARING); waiting until the export finishes works.

    What changes do you think we should make in order to solve the problem?

    In handleExportModalClose, do not call clearExportDownload while the export is still PREPARING. Closing the modal in Concierge mode should only dismiss the local UI (reset activeExportID, selection) and let the backend job continue to delivery. Only clear the download record once the export has reached a terminal state (READY/FAILED).

    Concretely: extend the guard so that when state === PREPARING (regardless of shouldSendFromConcierge) we skip clearExportDownload but still reset the local state (setActiveExportID(undefined), selectAllMatchingItems(false), clearSelectedTransactions). Stale preparing entries are already left intact by clearStaleExportDownloads, which skips PREPARING entries (Export.ts:67).

    Verification notes & confidence
    • handleExportModalClose and the shouldSendFromConcierge exception in the guard were both introduced by feat: Wire ExportDownloadStatusModal into CSV export flow #92169 — the PR this deploy blocker is assigned to.
    • The exact server-side effect of ClearExportDownload could not be verified here (the backend command lives outside the App repo). The App-side race is confirmed by code; the "file never delivered" outcome implies ClearExportDownload cancels/removes the still-preparing export job. An internal engineer should confirm the backend behavior of ClearExportDownload when an export is mid-flight.
    • Related issue: #86614 — Report - The export file does not receive in Concierge chat once online again describes the same "file not received in Concierge" symptom and may share this root cause.

    What alternative solutions did you explore? (Optional)

    Alternatively, the modal could remain open (non-dismissible) until the export reaches a terminal state even in Concierge mode, but that defeats the purpose of the "send from Concierge" flow which is meant to let users leave. Skipping the clear-while-preparing is the minimal fix.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement this to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. truph01 commented on Jun 18, 2026

    @truph01
    Contributor

    I am unable to reproduce this bug; I have always received the files.

  8. mollfpr commented on Jun 18, 2026

    @mollfpr
    Contributor

    I can reproduce this with a slow network and quickly click on "Send me the file when it's ready" and "Go to Concierge". I think this is coming from when the user picks Concierge and then "Go to Concierge", the modal closes, which fires clearExportDownload. That deletes the NVP, including the shouldSendFromConcierge flag, before the worker reads it. So the worker falls back to direct download, and the file never reaches Concierge.

    const handleExportModalClose = useCallback(() => {
    if (activeExportDownload?.state === CONST.EXPORT_DOWNLOAD.STATE.PREPARING && !activeExportDownload?.shouldSendFromConcierge) {
    return;
    }
    if (activeExportID) {
    clearExportDownload(activeExportID, activeExportDownload);
    }
    .

    So I think we should skip the clear NVP when closing the modal if the flag shouldSendFromConcierge is true.

    // For the Concierge path the worker deletes the NVP after sending, so clearing it here
    // would wipe shouldSendFromConcierge before the worker reads it.
    if (activeExportID && !activeExportDownload?.shouldSendFromConcierge) {
        clearExportDownload(activeExportID, activeExportDownload);
    }
    

    cc @truph01

  9. 2 remaining items

  10. IuliiaHerets commented on Jun 18, 2026

    @IuliiaHerets

    Chrome / v9.4.14-1
    Passed

    bandicam.2026-06-18.18-22-30-733.mp4
  11. changed the title [-]Expense - Exported file is not received in Concierge chat[/-] [+][Due for payment 2026-06-25] Expense - Exported file is not received in Concierge chat[/+] on Jun 18, 2026
  12. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.14-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-06-25. 🎊

    For reference, here are some details about the assignees on this issue:

    • @truph01 requires payment through NewDot Manual Requests
    • @daledah requires payment through NewDot Manual Requests
  14. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    @truph01 / @daledah The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  15. changed the title [-][Due for payment 2026-06-25] Expense - Exported file is not received in Concierge chat[/-] [+][Due for payment 2026-06-26] [Due for payment 2026-06-25] Expense - Exported file is not received in Concierge chat[/+] on Jun 19, 2026
  16. melvin-bot commented on Jun 19, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.15-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-06-26. 🎊

    For reference, here are some details about the assignees on this issue:

    • @truph01 requires payment through NewDot Manual Requests
    • @daledah requires payment through NewDot Manual Requests
  17. melvin-bot commented on Jun 19, 2026

    @melvin-bot

    @truph01 / @daledah The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions