🪲 BUG-#28: Last assistant message missing after a tool call - #29
Merged
Conversation
FernandoCelmer
commented
Aug 16, 2026
FernandoCelmer
commented
Aug 16, 2026
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.
Description
media/dom.js— AddsrenderedAssistantText, tracking cumulative text actually rendered in the panel across the turn (alongside the existingturnEndSeen).media/chat-turns.js—finishAssistantTurn()appends the closed bubble'srawTextintorenderedAssistantText.media/app.js/media/composer.js—doneno longer discards its fallback outright whenturnEndSeenis true. It diffsmessage.text(the full cumulative answer from the RPC response) againstrenderedAssistantTextand flushes only the un-rendered remainder, resetting both trackers per turn.Motivation and Context
turnEndSeenwas a plain boolean, set once on thechat/turnEndnotification fired before a tool call and never reset until the turn'sdoneevent. When the trailing segment after a tool call never streamed viachat/textDelta— only arriving in the final RPC responsetext—done's fallback was forced toundefined, silently dropping the last assistant message with no bubble ever created for it.Closes #28.
Types of changes
Checklist