Repository navigation
Discard stale throttled pending content when NewEntry re-sends fresh entries - #109
Merged
Merged
Conversation
…ries The NewEntry handler re-sends every current-turn entry with complete content read from the thread model, but left the streaming throttle's pending snapshot (and its armed trailing flush timer) in place. The stale mid-sentence snapshot was then sent after the fresh content — by the timer or by the next entry's flush-others step — and Helix's last-write-wins per message_id kept the truncated text on screen for the whole duration of the tool call. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Spec-Ref: helix-specs@fa17f6a0d:003677_observe-how-the-text
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Spec-Ref: helix-specs@fa17f6a0d:003677_observe-how-the-text
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Spec-Ref: helix-specs@fa17f6a0d:003677_observe-how-the-text
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Spec-Ref: helix-specs@0016105c3:003677_observe-how-the-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.
Problem
The text block immediately before a long-running tool call renders truncated in Helix (e.g. "The board" instead of the full paragraph) for the entire duration of the tool call, while Zed shows the full sentence. Fourth recurrence of this bug (prior attempts: spec tasks 001655, 001694, 002552, 003117).
Root cause
A regression introduced by
73f9af2162(the previous fix attempt): the NewEntry handler re-reads and sends every current-turn entry with complete content, but no longer clears the streaming throttle'spending_contentfor the preceding text entry. The stale mid-sentence snapshot is then sent after the fresh full content — by the trailing flush timer or by the next entry's flush-others step — and Helix's last-write-wins per message_id keeps the truncated text until the end-of-turn flush.Fix
discard_pending_for_thread()drops pending throttle state (and defuses the armed trailing flush timer) right before the NewEntry handler's fresh re-send.flush_stale_pending_for_threadleft behind by73f9af2162.go mod tidyfor the e2e test-server module (needed against current helix deps).Testing
cargo test -p external_websocket_sync: 81 passed, 0 failed.Release Notes:
🤖 Generated with Claude Code
🔗 Open in Helix
📋 Spec:
🚀 Built with Helix