Repository navigation
Use a platform shim for the iOS-only export staging cleanup - #104268
Conversation
Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
|
@MelvinBot how about not creating a new directory |
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. |
…in a new directory Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
|
@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] |
|
Done. The new directory is gone. The shim now sits beside the migration as two flat files:
The unit test (12/12), |
|
@MelvinBot my bad, revert to the previous one |
…tead of in a new directory" This reverts commit f7601a7.
|
Done. I reverted the flat-file change, so the shim is back in its own directory:
The revert is a new commit, 893c03a. The code now matches f2fab22 exactly. That version passed |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppabc1.webmiOS: HybridAppSimulator.Screen.Recording.-.iPhone.15.Pro.-.2026-10-17.at.00.18.05.mov |
|
🚧 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.14-0 🚀
|
|
No help site update needed. This PR is an internal refactor of a file-storage migration, with no change users can see. |
|
Any QA steps here? |
|
No QA needed @IuliiaHerets |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.14-3 🚀
Bundle Size Analysis (Sentry): |



Explanation of Change
This is a follow-up to Only remove the old export staging directory on iOS. That PR stopped the
MoveFilesOutOfDocumentsmigration from deleting Android's share staging folder (filesDir/Expensify) on cold start. It did this with agetPlatform()check inside the migration.The cross-platform guidelines say platform-only features must use no-op shims in platform files instead. This PR:
MoveFilesOutOfDocuments/removeStaleExportStagingDir.ios.ts.MoveFilesOutOfDocuments/removeStaleExportStagingDir.tsused on all other platforms, including Android.getPlatform()check and its test mock.The shim files sit beside the migration, the same way
UnreadIndicatorUpdaterkeepsload.android.tsandload.tsbeside itsindex.ts. They are their own module, so the rule against puttingindex.native.tsandindex.ios.tsin the same module does not apply.There is no behavior change. iOS still removes the stale export folder, and Android still keeps the share staging folder.
AI Tests
npm test -- tests/unit/MoveFilesOutOfDocumentsTest.ts: 12/12 passednpm run lint-changed: passednpm run typecheck: passednpm run spell-changed: passedoxfmton changed files: no changesnpm run lint, and the Storybook smoke test. This PR changes no UI.Fixed Issues
$ #103662
PROPOSAL: #103662 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
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)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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari