Repository navigation
Ignore pasted files in the composer while editing a comment - #96729
Conversation
Editing a comment on narrow layouts reuses the main composer, but the paste handler still forwarded files to the attachment picker. The picked file landed in attachmentFileRef, which made Send take the addAttachmentWithComment branch and create a separate text + attachment message instead of saving the edit. Gate onPasteFile on the same condition useComposerSubmit uses to detect an edit submission, so pasted files are dropped for the whole edit window, including after the composer height reset flips isEditingInComposer back to false.
|
Bump @eh2077 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-24.at.4.34.49.PM.movAndroid: mWeb ChromeScreen.Recording.2026-07-24.at.4.33.23.PM.moviOS: HybridAppScreen.Recording.2026-07-24.at.4.26.29.PM.moviOS: mWeb SafariScreen.Recording.2026-07-24.at.4.22.50.PM.movMacOS: Chrome / SafariScreen.Recording.2026-07-24.at.4.18.26.PM.mov |
|
@marcaaron kindly bump |
|
🚧 marcaaron 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/marcaaron in version: 9.4.46-0 🚀
|
|
🤖 Help site review: no docs changes required I reviewed the changes in this PR against the help site articles under This PR is a bug fix that ignores pasted files in the composer while a comment is being edited. Previously, pasting an image during an edit left it stuck loading and, on Send, produced a stray separate text + attachment message (#94879). The change simply removes that unintended behavior. Why no docs update is needed:
Since no help site content is affected, I did not create a draft docs PR. @mukhrr, please confirm you agree no help site changes are needed here. If you believe an article should call out that files can't be pasted while editing, let me know and I'll draft the docs PR. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.46-10 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #94879
PROPOSAL: #94879 (comment)
Tests
Verify you cannot paste an image while editing a comment.
Verify that no errors appear in the JS console
Offline tests
QA Steps
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_app.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios_app.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4