Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Jan 16, 2026

Summary

When editing a message with attached images, users could not remove those images - the remove (×) button was hidden.

Changes

  • Frontend: Always pass imageParts during edit (even if empty) so the backend knows removals are intentional
  • Backend: Only preserve original attachments when imageParts is undefined, not when it's an explicit empty array
  • Enable the remove button in ImageAttachments during edit mode
  • Update toast message to say "Images cannot be added" (since removal now works)

Testing

Tested manually:

  1. Sent a message with multiple images attached
  2. Clicked "Edit" on that message
  3. Deleted one image using the × button
  4. Submitted the edit
  5. Verified the deleted image was removed and the other image remained

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high • Cost: $0.88

Previously, when editing a message with attached images, users could not
remove those images - the remove button was hidden. Additionally, even
if removal was enabled, the backend would preserve the original images
when imageParts was empty (treating it the same as omitted).

Changes:
- Frontend: Always pass imageParts during edit (even if empty) so the
  backend knows removals are intentional
- Backend: Only preserve original attachments when imageParts is
  undefined, not when it's an explicit empty array
- Enable the remove button in ImageAttachments during edit mode

Fixes the issue where users couldn't delete images from messages they
were editing.
@github-actions github-actions bot added the enhancement New feature or functionality label Jan 16, 2026
@ethanndickson ethanndickson added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit 481e0f5 Jan 19, 2026
21 checks passed
@ethanndickson ethanndickson deleted the messaging-jnqz branch January 19, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant