Skip to content

[Bug]: Composer silently drops different images with matching metadata #37115

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a thread and enter some text in the composer.
  2. Paste a red PNG named image.png.
  3. Paste a different blue PNG with the same filename, MIME type and encoded byte size.

The fix PR includes a deterministic scenario with valid red and blue PNG fixtures: scripts/scenarios/distinct-same-size-pasted-images-both-attach.e2e.ts.

Expected behavior

Both different images remain attached. Pasting the same image again is still deduplicated.

Actual behavior

The blue image silently disappears because the draft store treats matching metadata as image identity. This affects matching-size images with generic clipboard filenames; different-size images do not collide.

Impact

Minor bug or occasional failure

Version or commit

Reproduced on main at 3ee4aa62ec0ed16375e3f28c8ad2138a44ebaa88.

Environment

Web client, Chromium, isolated development state, Replay provider.

Logs or stack traces

The draft-store repro fails with expected length 2, received 1. The real-app scenario fails on base at the attachment assertion and passes with the fix.

Screenshots, recordings, or supporting files

Before

Workaround

Use different filenames before attaching the images.

Activity

  1. added
    vouch:trusted
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions