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]: Editing a queued message breaks inline image and file attachment chips #40944
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
Start the web app and open a thread using Replay (dev) (showcase model) with an active turn (or send a message to start a turn so the next message queues).
While the turn is running, type Check in the composer and paste a PNG image from the clipboard (an inline image.png chip appears in the editor alongside the image thumbnail).
Queue the message (Ctrl/Cmd+Enter). (Optionally click Stop generation so the queued message stays queued while you inspect it.)
Click Edit queued message on the queued message.
Look at the inline image.png chip inside the composer editor and hover over it.
Expected behavior
The inline image.png chip in the queued-message edit composer stays resolved with its thumbnail preview and file size (matching docs/internals/composer-context-references.md, where pasted images render as resolved inline chips backed by the thumbnail inventory, and matching apps/mobile/src/state/queued-run-edit.ts, which seeds the edit draft with the full message context). Clicking the chip opens the expanded image preview, and removing the thumbnail above the editor removes the inline chip cleanly.
This is the attachment counterpart of #30850 (fixed in #30889 for thread and environment context records in useQueuedRunEdit.ts).
Actual behavior
The thumbnail still appears above the editor with a remove (×) button, but the inline chip in the rich-text editor renders as an unavailable chip (◌ image.png) with the tooltip "This context is no longer available. Remove it or attach it again.", even though the image is still attached and sent on save.
Root cause: useQueuedRunEdit keeps existing attachments in editing.existingAttachments instead of the edit draft's images/files arrays, and composerContextRecordsFromDraft only indexes live draft images/files, so existing attachment t3-context:// links have no matching record in ComposerContextRecordsContext.
Impact
Minor bug or occasional failure
Version or commit
v0.1.12-nightly.20261122.5098 (also reproduced on main @ 9de4ec1bfa0b)
Environment
Web client (reproduced on macOS desktop browser and headless Chromium via vp run scenarios --target web with Replay (dev) and no external provider account)
Logs or stack traces
No console or server errors.
Screenshots, recordings, or supporting files
Workaround
Leave the unavailable chip untouched and save the queued message (the underlying attachment is still preserved on save), or remove the attachment and paste it again.
Activity