fix(web): show attachments in session-start framed messages - #11
Open
Antisophy wants to merge 1 commit into
Open
fix(web): show attachments in session-start framed messages#11Antisophy wants to merge 1 commit into
Antisophy wants to merge 1 commit into
Conversation
The first message of a task renders through the SystemUserMessage framing (session-start label, body variable, "Full message" expander), which extracted only the text blocks from the message content. Image blocks were dropped, so an attachment on the first message appeared while the optimistic plain user message was showing, then vanished when the framed canonical message replaced it on replay. The image itself was fine: the backend keeps attachment blocks beside the rendered prompt and the model receives them; only the framed rendering lost them. Render the image blocks in both framed branches, above the prompt text in each (below the label header), with the same markup and ordering the plain user message uses: attachments first, then text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A task's first message renders through the session-start framing (the label header, the body variable, and the "Full message" expander). That renderer extracted only the text blocks from the message content, so image blocks were dropped from the display.
The visible effect: an attachment on a task's first message appears briefly (the optimistic plain user message renders it) and then vanishes when the framed canonical message replaces it on history replay. The attachment itself is fine throughout: the backend keeps image blocks beside the rendered prompt and the model receives them; only the framed rendering lost them.
The fix renders the image blocks in both framed branches, above the prompt text in each (below the label header), using the same markup and ordering as the plain user message: attachments first, then text. Display-only, so previously affected messages recover on their next history load with no re-send.
A regression test renders a framed message carrying an image block and asserts both that the attachment appears and that it appears above the body text.
nix flake check: full set built; four integration checks failed under parallel load and passed serially (a disjoint set from other recent runs of the suite, so load-related rather than related to this change).