Repository navigation
Skip preview modal for native platform when adding attachment - #98528
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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb Chromeandorid-mweb.moviOS: HybridAppios.moviOS: mWeb Safariios-mweb.movMacOS: Chrome / Safariweb.mov |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 240fcdad81
ℹ️ 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 {validateFiles, PDFValidationComponent} = useFilesValidation(onFilesValidated); | ||
|
|
||
| const pickAttachments = ({dragEvent, files}: {dragEvent?: DragEvent; files?: FileObject | FileObject[]}) => { |
There was a problem hiding this comment.
addAttachment and pickAttachments is a near-verbatim copy of useAttachmentPicker.ts - only onFilesValidated is platform-specific.
Can we extract the shared extraction/cleaning into a helper?
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ 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". |
daledah
left a comment
There was a problem hiding this comment.
Just one minor refactor comment. Otherwise, LGTM and tested well.
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #98049 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@daledah you need to complete the checklist. When you do, please ping me. |
| @@ -0,0 +1,73 @@ | |||
| import useFilesValidation from '@hooks/useFilesValidation'; | |||
There was a problem hiding this comment.
Hmmmm this has a lot of duplication from the non mobile version, can we refactor it somehow so we don't have that much duplicated logic?
There was a problem hiding this comment.
@hungvu193 I agree with this point and I've already left a comment here.
There was a problem hiding this comment.
The first solution I added a if (native) so it was likely 2,3 line changes only. But codex complained about the platform specific that we should create .native.ts for platform specific code 🤦
Are we ok with adding platform check instead if creating new .native.ts file?
There was a problem hiding this comment.
I think I would be fine with that. @daledah what do you think?
There was a problem hiding this comment.
I agree with that. I think a platform check is fine here
There was a problem hiding this comment.
Cool. I'll update it then
|
@iwiznia i've complete the checklist |
|
🚧 iwiznia 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/iwiznia in version: 9.4.58-0 🚀
|
|
🤖 No help site changes required. I reviewed the change in this PR against the help articles under What this PR changes: On native platforms (iOS/Android), choosing an attachment from the + menu now sends it immediately, skipping the intermediate "Send attachment" preview screen. Web still shows the preview modal ( Why no docs change: The help site never documents the "Send attachment" preview/confirmation step. The only article that covers this flow — Chat features and moderation tools — describes adding an attachment generically ("click the plus icon and select Add attachment") with no mention of a preview screen. Since the removed step was never in the docs, there is nothing to reconcile, and no draft PR is being created. Search details
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.58-4 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Coming from here: #98049 (comment), we want to remove preview modal for native platforms.
Fixed Issues
$ #98049
PROPOSAL: N/A
Tests
Same as QA steps.
Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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-08-13.at.14.04.39.mov
iOS: Native
Screen.Recording.2026-08-13.at.14.01.35.mov
iOS: mWeb Safari
Screen.Recording.2026-08-13.at.13.59.15.mov
MacOS: Chrome / Safari
Screen.Recording.2026-08-13.at.13.50.14.mov