perf(chat): batch live thinking rendering and bound timer updates - #1
Closed
RaresKeY wants to merge 2 commits into
Closed
perf(chat): batch live thinking rendering and bound timer updates#1RaresKeY wants to merge 2 commits into
RaresKeY wants to merge 2 commits into
Conversation
RaresKeY
force-pushed
the
agent/perf-stream-batching
branch
from
August 8, 2026 08:26
2173761 to
24a50fb
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.
Summary
Long reasoning streams repeatedly Markdown-parsed the entire cumulative thinking string and replaced its full
innerHTMLon every delta, while arequestAnimationFrameloop rewrote the elapsed header at display refresh rate. This patch coalesces live thinking to one plain-text DOM commit per 100 ms, performs one rich Markdown render when the block closes, synchronously flushes/cancels terminal paths, and bounds the timer to 250 ms normally or 1000 ms under reduced motion.Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release.Linked Issue
Fork staging: Issues are disabled on this fork. Rendered Issue body: A01-ISSUE.md.
Upstream publication packet uses
Fixes #{{ISSUE_NUMBER}}after creating the focused Issue.Part of odysseus-dev#4644.
Related to odysseus-dev#5588.
Publication sequence
This is slice 5/5 in the recommended performance publication order: A04 → A05 → A03 → A02 → A01. This branch is independently based on
dev; it is not a cumulative stack branch.Type of Change
Checklist
dev.static/js/chat.jsand focused scheduler/lifecycle tests; no history virtualization, renderer replacement, document-editor work, or send-button accessibility change is mixed in.How to Test
Prepared results:
agent/perf-all-integrated-a04-r2: scheduler 3/3, focused union 25/25,git diff --checkcleanManual reviewer check:
Visual / UI changes — REQUIRED if you touched anything that renders
This changes behavioral rendering in the existing thinking block but adds no new styling or component.
Screenshots / clips
Attach the final long-stream evidence before moving the upstream PR out of draft.
Risks and rollback
Open PR odysseus-dev#5857 also touches
static/js/chat.jsbut owns an unrelated streaming-TTS error-scope fix. Rebase narrowly if that or other chat work lands first, then rerun the terminal-path regressions. Rollback is the two focused commits; there is no schema or persistence change.