feat: Wire ExportDownloadStatusModal into CSV export flow#92169
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1fd1abe69
ℹ️ 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".
| exportID, | ||
| }) as QueueExportSearchItemsToCSVParams; | ||
|
|
||
| API.write(WRITE_COMMANDS.QUEUE_EXPORT_SEARCH_ITEMS_TO_CSV, finalParameters, {optimisticData}); |
There was a problem hiding this comment.
Add failure data for failed queued exports
When QueueExportSearchToCSV returns a non-200 response, SaveResponseInOnyx only applies the request's failureData; this request now writes an optimistic preparing export entry but provides no rollback. In that failure scenario the new CSV export modal remains stuck in the non-dismissible preparing state because the Onyx entry is never cleared or moved to failed (the same pattern appears in queueExportSearchWithTemplate below). Please include failure/finally data that clears or fails the export entry.
Useful? React with 👍 / 👎.
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 With the current Please help investigate. |
Issue AnalysisRoot Cause: The URL itself is fine ( Recommended Fix: Mirror the existing secure-file download pattern — wrap the URL with import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL';
// ...
const [session] = useOnyx(ONYXKEYS.SESSION);
const encryptedAuthToken = session?.encryptedAuthToken ?? '';
// ...
fileDownload(translate, addEncryptedAuthTokenToURL(downloadURL, encryptedAuthToken, true));
Investigation details & evidenceWhy the fetch fails without the token.
Proven working pattern (same URL shape, same (Note: the other CSV-export call sites — Optional secondary nit: the modal passes no Next Steps: Reply with |
|
@truph01 is this PR ready for review? |
|
@truph01 bump on the question above. |
Agree with that Tom, I think that'd be nice. |
|
Yeahhh, I miss that part 😅 @truph01 I think we only need to update |
|
Love it! Thanks @truph01! |
|
@truph01 the changes looks good to me! Only need to fix the failing test. |
|
@mollfpr All good now |
|
🚧 @mollfpr 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/mollfpr in version: 9.4.10-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — docs update required ✅This PR changes how Search bulk exports (CSV/template) are delivered: instead of the old "Concierge will send the file" confirmation, users now see an in-app Preparing download window that downloads the file directly, with an option to Send me the file when it's ready via Concierge. This makes the Export as CSV sections (Web + Mobile) and the How do I receive my export? FAQ in Draft help site PR: #93866 What changed in the docs
UI copy (Send me the file when it's ready, Preparing download) was sourced from the merged @truph01, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #93873 was identified to be related to this PR. |
|
Deploy Blocker #93874 was identified to be related to this PR. |
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.4.12-0 🚀
Bundle Size Analysis (Sentry): |
Help site changes required ✅This PR changes a user-facing flow: CSV/template exports from Spend no longer always arrive as a Concierge direct message. Instead, the new The existing help article Draft help site PR: #93890 It updates the Export as CSV (Web), Export as CSV (Mobile), and FAQ → How do I receive my export? sections to describe the status-window + in-app download behavior. UI labels were verified against the @truph01, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.4.14-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.14-1 🚀
|
Explanation of Change
This change wires the new
ExportDownloadStatusModalinto the Search bulk-export (CSV/template) flow so users get in-app feedback on their export instead of relying solely on the "Concierge will send" confirmation.Fixed Issues
$ #90298
PROPOSAL:
Tests
Test 1:
Test 2:
Offline tests
QA Steps
Test 1:
Test 2:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: mWeb Chrome
Screen.Recording.2026-06-15.at.09.51.15.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2026-06-15.at.09.47.16.mov
MacOS: Chrome / Safari
Screen.Recording.2026-06-15.at.09.44.30.mov
Screen.Recording.2026-06-15.at.17.25.16.mov