🤖 feat: add smooth low-lag streaming text reveal#2482
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edb3033968
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55b618d0a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2ed4bcfdf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 990854cb21
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e309144a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Implement smooth, replay-aware text streaming so assistant/reasoning output appears at a consistent cadence without re-animating replayed history, then tune the reveal policy to reduce visible lag during fast model bursts.
Closes #12
Background
Streaming deltas were rendered as soon as they arrived, which produced bursty transcript updates. The initial smoothing pass improved cadence, but in practice could still lag too far behind fast output and then jump forward on interrupt/abort.
Implementation
streamPresentation.source) in displayed message types + aggregator wiring.STREAM_SMOOTHINGconstants (src/constants/streaming.ts)SmoothTextEngine(pure deterministic jitter-buffer engine)useSmoothStreamingText(RAF-driven presentation clock hook)TypewriterMarkdownnow rendersvisibleTextfromuseSmoothStreamingTextAssistantMessage+ReasoningMessagepassstreamKeyand replay/live sourceMAX_VISUAL_LAG_CHARSguard to cap hidden tail during active streamingValidation
make static-checkbun test src/browser/utils/streaming/SmoothTextEngine.test.tsbun test src/browser/hooks/useSmoothStreamingText.test.tsxbun test src/browser/components/Messages/TypewriterMarkdown.test.tsxbun test src/browser/components/Messages/ReasoningMessage.test.tsxbun test src/browser/utils/messages/StreamingMessageAggregator.test.tsbun test src/browser/utils/messages/applyWorkspaceChatEventToAggregator.test.tsRisks
streamPresentation.source; regressions there would affect reconnect/catch-up UX.Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$7.39