Repository navigation
Conversation
plux
force-pushed
the
hn/chat-render-coalescing
branch
3 times, most recently
from
September 16, 2026 18:47
84be39b to
812f086
Compare
Buffer assistant text, subagent text, and toolCallPrepare UI updates behind a shared stream queue. Flush queued content before immediate lifecycle boundaries so chat history preserves receive order. Preserve subagent child output when parent lifecycle updates arrive, and capture expandable parent text before nested child blocks. This keeps collapsed subagent history stable when users reopen parent blocks. Add regression coverage for render ordering, prepare finalization, running progress events, and nested subagent streams. Add a benchmark fixture for chat render coalescing workloads.
plux
force-pushed
the
hn/chat-render-coalescing
branch
from
September 17, 2026 06:42
812f086 to
02a900b
Compare
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.
Context
Description
Chat stream buffering previously focused on top-level assistant text, but chat
history can also receive subagent text and
toolCallPrepareUI updates while aresponse is still streaming. Immediate lifecycle events can arrive between those
buffered updates, which can reorder history or allow stale prepare UI to
overwrite newer tool state.
This PR extends stream coalescing to the other chat render paths. It preserves
receive order across top-level assistant text, nested subagent output, and
prepare UI updates.
Changes
toolCallPrepareUI updates through the stream buffer.eca-chat-stream-flush-interval.Benchmarks
Measured with Emacs 30.1. Baseline was
origin/masterat3f2567b.The PR branch was
12ef152.Lower wall time is better.