Repository navigation
FIX: revoke removed attachment blob URLs in the conversation editor - #3186
Merged
Roman Lutz (romanlutz) merged 4 commits intoOct 14, 2026
Merged
Roman Lutz (romanlutz) merged 4 commits into
Roman Lutz (romanlutz) merged 4 commits into
Conversation
The chat composer revokes a dropped attachment's blob object URL when the attachment is removed, but the conversation editor forwarded the new attachment list straight through, so removed files stayed pinned until the draft was discarded or the editor unmounted. Revoke the media piece's blob URL when the next list no longer references it. Fixes microsoft#3185 Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49f13576-5cf7-4b3d-beba-39e00c34aca4
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49f13576-5cf7-4b3d-beba-39e00c34aca4
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49f13576-5cf7-4b3d-beba-39e00c34aca4
Roman Lutz (romanlutz)
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3185
ChatInputArea.changeAttachmentsrevokes a removed attachment's blob object URL, but the conversation editor path (ConversationEditorcalling intouseConversationDraft.changeAttachments) forwarded the new attachment list with no revocation, so removing an attachment in the editor pinned itsblob:URL and File payload until the draft was discarded or the editor unmounted. The editor now revokes the media piece's blob URL when the incoming attachment list no longer references it, matched by URL since the draft attachment object is rebuilt each render.Tests and Documentation
Added
revokes the blob URL when an attachment is removed from the editortoConversationEditor.test.tsx: it uploads a file through the editor, removes it, and assertsURL.revokeObjectURLwas called with the attachment's blob URL. Fails on main, passes with the change. The fullConversationEditor.test.tsxandChatWindow.test.tsxsuites pass (219 tests) andtsc --noEmitis clean.No documentation change needed, so I did not run JupyText.