fix: Add updated automatic/scan flow to native share sheet creation flow#87142
Conversation
|
@hoangzinh 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
I kicked off an adhoc build. |
|
🚧 @JmillsExpensify 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! 🧪🧪
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-06.at.18.49.23.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-04-06.at.18.30.20.mov |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Tests well on the Adhoc. LGTM!
|
@MelvinBot review this PR |
PR ReviewOverall: This is a solid fix that correctly brings the share sheet "Details" screen in line with the core Create Expense > Scan flow. The approach is sound and the implementation closely mirrors the established patterns in CI StatusAll meaningful checks pass (ESLint, TypeScript, tests, perf, etc.). The only failing check is Code ReviewCorrect:
Minor observations (non-blocking):
No issues found that would block merging. The changes are well-scoped, mirror established patterns, and all tests/type checks pass. |
|
@TaduJR I found an issue. The first time (after login or clear Onyx data) I submit an expense via Share, it doesn't display "Category" select box, it works normally in normal scan expense. Screen.Recording.2026-04-06.at.20.03.59.mov |
Explanation of Change
When sharing a receipt via the native share sheet (Photos > Share > Expensify), the "Details" screen showed only a Description field, missing Category, Tags, Tax, Report, Reimbursable, compact receipt, and "Show more" toggle that the core Create Expense > Scan flow provides.
Root causes in
SubmitDetailsPage.tsx:initMoneyRequesthardcodedcurrentIouRequestType: SCAN, causing the merge path to skip settingiouRequestTypeon the draft —isScanRequest()returned falsesetMoneyRequestReceiptwas never called, sotransaction.receiptwas emptyisPolicyExpenseChatcascaded into hiding Category, Tags, Tax, Report, and ReimbursableiouType,policyID, billable/reimbursable init, toggle callbacks, and other display propsonConfirmdiscarded updated participants fromMoneyRequestConfirmationListChanges (all in
SubmitDetailsPage.tsx):initMoneyRequestto usetransaction?.iouRequestTypeinstead of hardcodedSCANsetMoneyRequestReceipteffect to populate the transaction draft receiptisPolicyExpenseChatfrom participants, dynamiciouType(TRACK for self-DM)onConfirmto accept and thread participants, changed header to "Confirm details"MoneyRequestConfirmationListFixed Issues
$ #86027
PROPOSAL: #86027 (comment)
Tests
Prerequisites: Use a mobile device (iOS or Android) with Expensify installed. Have a workspace with Categories, Tags, and Tax enabled.
Flow 1: Share sheet with workspace report (policy expense chat)
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
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
Android-Native.mp4
Android: mWeb Chrome
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari