Repository navigation
HERD-36: a message with pictures no longer stays on "Sending…" - #121
Merged
makefunstuff merged 5 commits intoNov 8, 2026
Merged
Conversation
A sent message stays pending until the transcript shows it, matched by its text. A message with pictures goes as `@path` mentions before the words, but an agent may record the pictures its own way: Claude Code as `[Image #1]`, Codex and pi as image blocks beside the words. The pending copy then never matched, and stayed on "Sending…" until the chat was rebuilt (terminal and back). SentMatch now takes a picture message as matched by its words (or, with only pictures, by another picture-only message), in the transcript and on the screen. The bubble no longer shows Claude's `[Image #N]` marks among the words; "2 images attached" says it. New scene chat-pictures-sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, unseen tested - Pictures alone are found on the screen by Claude Code's `[Image #` too. - Only the agents' own marks count as pictures (`[Image #1]`, Codex's `[image 1024x768 PNG]`); the person's own `[image of …]` stays words, on both sides of the match. - The pending check moved from AgentChat to SentMatch.unseen, tested with a Claude Code transcript line that carries its marks and image blocks. - The regexes are built once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bble keeps its spacing - unconfirmed keys a picture message by its words, so two picture messages (or two with the same words) each need their own match. - The bubble strips only the agent's marks (SentMatch.withoutMarks): an indented trace sent with a screenshot keeps its indentation. - The screen count's limit for pictures alone is written down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… count up together - unconfirmed keys a picture message by its words, like a plain one; only pictures alone get their own key. The match goes both ways (words sent alone match a message the agent shows with picture marks), so neither of two such messages is confirmed early or left pending. - withoutMarks takes a mark's line break with it and keeps the first line's indentation; text without a mark is left as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #100
In an agent's chat, a message sent with pictures stayed on Sending… until the chat was rebuilt (Terminal and back).
Why: a sent message stays pending until the agent's transcript shows it, and it is matched by its text. The app sends pictures as
@pathmentions in front of the words. Some agents record the pictures their own way: Claude Code as[Image #1] [Image #2] words, Codex and pi as image blocks next to the words. The pending copy then never matched. Rebuilding the chat dropped it, so the message then showed as sent.What changed (
core/…/chat/SentMatch.kt):[Image #N], Codex's[image WxH …]). Pictures alone match a picture-only message. The same holds for the screen fallback.AgentChatintoSentMatch.unseen. It is tested with a Claude Code transcript line that has the marks and image blocks.[Image #N]among the words ("2 images attached" says it). The rest of the text is left exactly as written.Checked for: classic herdr and herdr-core (both send the same text through
AgentPort, and the matching is the same), one picture or several, and pictures alone. The Assistant and task chats confirm by the message'scid, not its text, so they never had this bug.Tests: 14 new tests in
SentMatchTest. Of the first 7, written before the fix, 5 failed on the old matching../gradlew -p core testand./gradlew :app:testDebugUnitTestpass. New preview scenechat-pictures-sent: the fake agent records the two pictures as Claude Code does.Shots (chat-pictures-sent)
Task: HERD-36
🤖 Generated with Claude Code