Repository navigation
[CP Staging] Keep a video attachment when a comment is edited twice while it uploads - #98702
Conversation
Matching only the opening tag stored a truncated video that parsed back to nothing, so a second edit read the attachment as deleted and dropped it from the queued send. The synced swap path had the same assumption.
|
🚧 Beamanator has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@mukhrr The original issue seems to have been resolved, but I found an inconsistency and wonder if it falls within the scope of our issue:
Expected Result:
Actual Result:
bug.mov |
|
@brunovjk Do you think this is NAB? |
|
I'm not sure,what do you think, @youssef-lr? I can't reproduce the bug in production because the edit option isn't available while the file is still uploading or offline. |
…ment The still-uploading attachment was appended after a fixed separator, so deleting the whole comment left the separator with nothing before it and the next edit reopened with blank lines above the attachment.
c989798 to
88ea76b
Compare
|
@brunovjk anyways, I fixed it |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-08-17.at.12.38.50.movAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-08-17.at.12.50.50.moviOS: mWeb SafariMacOS: Chrome / Safari98702_web_chrome.mov |
|
@mukhrr can you pull main or something to retrigger all the failed checks? |
|
nvm i manually retried them all :D |
|
🚧 Beamanator 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! 🧪🧪
|
Keep a video attachment when a comment is edited twice while it uploads (cherry picked from commit 12b0038) (cherry-picked to staging by Beamanator)
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.54-3 🚀
|
|
🤖 I reviewed the changes in this PR against the help site content under No help site changes are required. This is a bug fix that restores previously-intended behavior — it keeps a video attachment on a message when the comment is edited twice while the upload is still in progress (and fixes a related blank-lines issue when all text is deleted). The change is entirely internal (
Because there's no behavioral or UI change that the public help articles need to reflect, I did not create a draft docs PR.
|
|
🔁 Filed a Staging retest request for deploy blockers #98692 after this PR was cherry-picked to staging. |
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.54-3 🚀
|
|
🤖 Re-confirming my earlier review: no help site changes are required for this PR. This is a bug fix that restores previously-intended behavior — it keeps a video attachment on a message when the comment is edited twice while its upload is still in progress, and fixes a related blank-lines issue when all text is deleted. The change is internal only (
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.54-4 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.55-0 🚀
|
|
🤖 Still no help site changes required — same conclusion as my earlier reviews on this PR. This is a bug fix that restores intended behavior (keeping a video attachment on a message when the comment is edited twice while it uploads, plus a blank-lines fix). The change is internal only (
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.55-4 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Editing a comment twice while its video was still uploading dropped the video for good.
The optimistic message re-appends the still-uploading attachment so it stays on screen while the edit is saved, but the tag was matched with a pattern that only covers an opening tag. A video keeps its label between the tags, so what got stored was a truncated
<video …>with no closing tag. That parses back to nothing, so the second edit's draft had no reference to the attachment left in it, the edit was read as the user having deleted it, and the file was dropped from the queued send.Videos are now matched as whole elements. The same assumption was in the path that swaps a local reference for the synced attachment once the upload lands, where a truncated element would have produced empty markdown and wiped the attachment there too, so both are fixed.
Second, the attachment was put back after a fixed separator, so an edit that deleted all of the text left the separator with nothing in front of it and the comment reopened with blank lines above the attachment. The parts are joined now, and an empty one is dropped.
Fixed Issues
$ #98692
PROPOSAL:
Tests
+ > Add attachment, pick a video, and send it, so the text and the video go out as one message..csv) and verify both still behave the same as before.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
REC-20260815063928.mp4