update empty receipt in wide RHP to allow picking the receipt#81467
update empty receipt in wide RHP to allow picking the receipt#81467NikkiWines merged 18 commits intoExpensify:mainfrom
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.
|
|
@DylanDylann 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f9724dfee
ℹ️ 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".
|
@nkdengineer Could you check all the above comments from codex, gh action and codecov? |
trjExpensify
left a comment
There was a problem hiding this comment.
LGTM! CC: @Expensify/design
|
Running a build to test it out! |
|
🚧 @dannymcclain has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@DylanDylann Checked all of them |
Yeah I totally agree. It kinda feels like we now have a good separation of receipt and fields so I wonder if we should just have it be split horizontally so that dropping on the receipt thumbnail adds as receipt, but dropping it on the right fields or comments adds it to the thread. Kinda feels logical to me anyways? Then on smaller viewports, we could revert to the top/below treatment |
|
IMO, we shouldn't have a horizontal split on the empty receipt view. This view is only meant to notify users that the receipt is empty and that they can drag a receipt into it. I don't think we need to display anything additional to indicate that users can drag an attachment into the chat. |
|
@nkdengineer We have a lint warning |
|
Hmm I'm not entirely sure, I could see both sides of that but I think if we want to be consistent, we should allow the split drop zones since users can add any attachments they want to the expense chat. So I personally would vote to try the vertical 50/50 split if we can. |
src/components/ReceiptEmptyState.tsx
Outdated
| const theme = useTheme(); | ||
| const isLoadedRef = useRef(false); | ||
| const icons = useMemoizedLazyExpensifyIcons(['ReceiptPlaceholderPlus', 'Receipt']); | ||
| const {validateFiles, PDFValidationComponent, ErrorModal} = useFilesValidation(onReplaceReceipt); |
There was a problem hiding this comment.
@nkdengineer I'm curious why we're using onReplaceReceipt here? Shouldn't this change only affect the add new receipt flow?
There was a problem hiding this comment.
Add/Update the receipt, we use the same function is replaceReceipt function
There was a problem hiding this comment.
I agree, but I'd prefer sticking with setReceiptFiles to keep the meaning clear, just like we did in the original implementation.
|
@nkdengineer ReceiptEmptyState is used in other places. Should we limit this change to avoid impacting those places? |
@nkdengineer Please notice the codecov's comment |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9543f6431
ℹ️ 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".
| const source = URL.createObjectURL(file as Blob); | ||
| replaceReceipt({transactionID: linkedTransactionID, file: file as File, source, transactionPolicy: policy, transactionPolicyCategories: policyCategories}); |
There was a problem hiding this comment.
Use file URI when replacing receipt from wide RHP
setReceiptFile now always derives source via URL.createObjectURL(file as Blob), but the wide-RHP picker can run through AttachmentPicker/index.native.tsx, which returns native FileObjects with a uri rather than a web Blob/File; the existing native scan flow already uses file.uri directly (IOURequestStepScan/index.native.tsx). In native large-screen contexts where isDisplayedInWideRHP is true, this path can throw or produce an invalid source, preventing replaceReceipt from attaching the selected receipt.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
It's incorrect, the wide-RHP is only available on web.
@DylanDylann It's decreased because we've changed these files, and we don't have any automation tests. But how can we write the test with the flow open picker/drag and drop? Let me know if I missed something.
|
If that's the case, I think the test coverage should be maintained instead of decreasing. Perhaps these components are used in other components that already have test coverage. |
So what is the decrease here? Is this the manual test that isn't covered? |
These are unit tests |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-26.at.12.28.50.movAndroid: mWeb ChromeScreen.Recording.2026-02-26.at.12.26.51.moviOS: HybridAppiOS: mWeb SafariScreen.Recording.2026-02-26.at.12.28.14.movMacOS: Chrome / SafariScreen.Recording.2026-02-26.at.12.17.32.mov |
As I mentioned above, we don't have a way to write the test with the flow open picker/drag and drop. |
Could you clarify what's blocking here? This is draft tests, I think it can resolve our problem here DualDropZoneTest.tsx |
|
@DylanDylann Updated the test. For |
|
🚧 @NikkiWines 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.3.28-0 🚀
|
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.3.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.30-3 🚀
|


Explanation of Change
update empty receipt in wide RHP to allow picking the receipt
Fixed Issues
$ #79189
PROPOSAL:
Tests (Web only)
Offline tests
Same
QA Steps
Same as test
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: mWeb Chrome
Screen.Recording.2026-02-05.at.10.50.38.mov
iOS: Native
Screen.Recording.2026-02-05.at.10.48.19.mov
iOS: mWeb Safari
Screen.Recording.2026-02-05.at.10.49.48.mov
MacOS: Chrome / Safari
Screen.Recording.2026-02-05.at.10.46.57.mov