You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Overlapping image pastes can reverse inline prompt references #37009
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
Open a thread and type Compare into the composer.
Paste one PNG that needs image preparation.
At the unchanged caret, paste another PNG while the first is still preparing.
Let the first preparation finish, followed by the second.
The shipped scenario scripts/scenarios/overlapping-image-pastes-keep-order.e2e.ts uses real wide PNGs, keyboard clipboard paste, and a gate around bitmap decoding to reproduce the overlap while preserving normal preparation.
Expected behavior
Inline image references follow paste order: first image, then second image.
Actual behavior
The inline references appear in reverse order when the first preparation finishes first. Both images survive. Sequential pastes and overlapping pastes where the second finishes first retain the expected order.
Impact
Minor bug or occasional failure. Timing-dependent; no incidence or preparation duration was measured.
Chromium, Linux, web composer. Provider-independent. Native mobile was not exercised.
Logs or stack traces
The original public editor/hook repro fails on main with Before second.png first.png instead of Before first.png second.png. Independently confirmed twice by Claude Opus 5.5 on f5ca0f9, then reproduced again on current main before this fix.
Workaround
Wait for each image to finish preparing before pasting the next.
Activity