Skip to content

feat(web-ui): smooth desktop streaming typewriter reveal#1643

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:feat/desktop-streaming-typewriter-smoothness
Jul 20, 2026
Merged

feat(web-ui): smooth desktop streaming typewriter reveal#1643
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:feat/desktop-streaming-typewriter-smoothness

Conversation

@bobleer

@bobleer bobleer commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the fixed-interval / 800ms catch-up typewriter with an adaptive requestAnimationFrame reveal that drains backlog smoothly without feast/famine jumps.
  • Give text chunks a shorter EventBatcher latency (32ms) while keeping tool/default events at 100ms, and reschedule flush when a more urgent deadline arrives.
  • Gate round footer/chrome on typewriter completion and avoid end-of-turn remount flashes (Markdown component map rebuild, Fallback↔Prism swap, --streaming--complete fadeIn replay).

Test plan

  • pnpm run type-check:web
  • Focused vitest: useTypewriter, TypewriterRevealGate, EventBatcher, modernFlowChatStore, modelRoundItemClassName (41 tests passed)
  • Manual: stream a long mixed CJK/Latin reply in desktop and confirm even pacing without stair-step bursts
  • Manual: confirm copy/export chrome appears only after reveal finishes, without a full chat refresh flash

Replace fixed-interval catch-up typewriter and single-latency event batching
with adaptive rAF reveal and dual-latency text flushes so streamed chat text
paces evenly without stair-step bursts or end-of-turn chrome remount flashes.
@bobleer
bobleer merged commit fbde2ae into GCWing:main Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant