Skip to content

fix(desktop): dedupe clipboard image paste - #38306

Merged
OutThisLife merged 1 commit into
mainfrom
bb/desktop-clipboard-image-double-paste
Jun 3, 2026
Merged

fix(desktop): dedupe clipboard image paste#38306
OutThisLife merged 1 commit into
mainfrom
bb/desktop-clipboard-image-double-paste

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

  • Pasting a screenshot/image in the desktop composer attached twice because Chromium/Electron exposes the same clipboard image on both DataTransfer.items and .files as different Blob instances.
  • extractClipboardImageBlobs now dedupes by file metadata and only reads .files when .items did not yield an image.

Test plan

  • npm run test:ui -- src/app/chat/composer/text-utils.test.ts in apps/desktop
  • Manual: copy/screenshot an image, paste into composer — one attachment chip only

Chromium exposes the same pasted image on both DataTransfer.items and
.files as distinct Blob objects, which attached twice. Prefer items and
skip the files mirror when items already yielded images.
@OutThisLife
OutThisLife merged commit ecac659 into main Jun 3, 2026
15 checks passed
@OutThisLife
OutThisLife deleted the bb/desktop-clipboard-image-double-paste branch June 3, 2026 15:28
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: bb/desktop-clipboard-image-double-paste vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9733 on HEAD, 9733 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5043 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have labels Jun 3, 2026
davidgut1982 pushed a commit to davidgut1982/hermes-agent that referenced this pull request Jun 5, 2026
…ipboard-image-double-paste

fix(desktop): dedupe clipboard image paste
alt-glitch pushed a commit that referenced this pull request Jun 14, 2026
…e-double-paste

fix(desktop): dedupe clipboard image paste
T02200059 pushed a commit to T02200059/hermes-agent that referenced this pull request Jun 18, 2026
…ipboard-image-double-paste

fix(desktop): dedupe clipboard image paste
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…ipboard-image-double-paste

fix(desktop): dedupe clipboard image paste
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…ipboard-image-double-paste

fix(desktop): dedupe clipboard image paste
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…ipboard-image-double-paste

fix(desktop): dedupe clipboard image paste
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…ipboard-image-double-paste

fix(desktop): dedupe clipboard image paste
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants