fix(chat): typing-indicator centered + caret delayed for short streams#180
Merged
Conversation
…rt streams
Two embed-mode polish fixes from live smoke-testing:
1. chat-typing-indicator was rendering at the chat-scroll's left edge
(x=0 + 24px padding) while messages live in a centered column
(max-width: var(--ngaf-chat-max-width); margin: 0 auto). The dots
would flash at the far-left position, then content would suddenly
appear in the centered column — visible horizontal shift.
Adding the same max-width + margin auto to chat-typing-indicator
locks the dots into the same column as messages.
2. Caret animation now has a 300ms fade-in delay before its pulse
loop starts. Quick LLM responses ("hello" → "Hello! How can I
assist you today?" finishes in ~140ms) never reach the delay
threshold, so the caret stays invisible. Longer streams still
get the smooth pulse from copilotkit's 2s cubic-bezier curve.
Bumps @ngaf/chat 0.0.12 → 0.0.13.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Embed-mode polish from live smoke-testing
Issue 1: Typing dots flash at far left
`chat-typing-indicator` rendered at `x=0 + 24px padding` while messages live in a centered column (`max-width: var(--ngaf-chat-max-width); margin: 0 auto`). On "hello" → response, dots appeared far-left, then content rendered in the centered column → visible horizontal shift.
Fix: same max-width + margin auto on the typing-indicator's host so the dots sit in the same column as messages.
Issue 2: Caret flickers for very short responses
For quick replies ("hello" → "Hello! How can I assist you today?" finishes in ~140ms), `data-streaming=true` only stays for that duration → the pulsing caret showed for ~140ms and disappeared. Awkward.
Fix: 300ms delay on the caret fade-in. Quick streams (under ~300ms total) never reveal the caret. Longer streams still get the smooth 2s cubic-bezier pulse copied from copilotkit.
Verified live (with both 0.0.13 chat + 0.0.9 langgraph)
Versions
🤖 Generated with Claude Code