fix: No error modal when sending a specific attachment via the receipt button#86189
fix: No error modal when sending a specific attachment via the receipt button#86189dangrous merged 6 commits intoExpensify:mainfrom
Conversation
|
@dukenv0307 @dangrous I notice that the native behavior is different from web behavior.
Let me know if we want to change any behavior. |
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.
|
|
@dukenv0307 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] |
|
Oh, I think we should do the same as on the native, we should resize first then do the validation cc @dangrous |
|
that makes sense to me! |
|
@dukenv0307 After checking, I think we should remove the resize logic in native and update It's a better approach because App/src/hooks/useFilesValidation.tsx Line 169 in 0a42bcf |
|
@nkdengineer how do you handle the resize logic in useFilesValidation? can we preserve the current behavior: resize -> validate? BTW, useFilesValidation is used in many places, is it safe to change it? |
@dukenv0307 We have the logic to handle the resize logic here in the App/src/hooks/useFilesValidation.tsx Lines 169 to 173 in 3900414 And this logic is the same as what we did here App/src/hooks/useFilesValidation.tsx Lines 235 to 349 in 3900414
It's safe because we always pick attachments first before going to this hook |
|
Sound good, let's do that |
|
@nkdengineer any updates on this PR? |
|
@dukenv0307 I updated. |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-09.at.10.52.22.movAndroid: mWeb ChromeScreen.Recording.2026-04-09.at.11.01.09.moviOS: HybridAppScreen.Recording.2026-04-09.at.10.30.12.moviOS: mWeb SafariScreen.Recording.2026-04-09.at.11.01.21.movMacOS: Chrome / SafariScreen.Recording.2026-04-09.at.10.59.16.mov |
|
🚧 @dangrous 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/dangrous in version: 9.3.58-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. This PR is a bug fix for attachment file validation logic — it corrects an issue where the error modal didn't appear when uploading an oversized attachment via the receipt button. The changes are internal (validation logic, image file type detection, test updates) and don't affect any user-facing feature names, workflows, settings, or terminology that would be documented in the help site. |
Explanation of Change
fix: No error modal when sending a specific attachment via the receipt button
Fixed Issues
$ #85951
PROPOSAL: #85951 (comment)
Tests
Offline tests
QA Steps
Same as test
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
Screen.Recording.2026-03-24.at.17.35.15.mov
Android: mWeb Chrome
Screen.Recording.2026-03-24.at.17.13.36.mov
iOS: Native
Screen.Recording.2026-03-24.at.17.40.06.mov
iOS: mWeb Safari
Screen.Recording.2026-03-24.at.17.43.43.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-24.at.17.09.20.mov