feat(widget): bouncing-dots loading that survives thread switches - #60
Open
AmitAvital1 wants to merge 1 commit into
Open
feat(widget): bouncing-dots loading that survives thread switches#60AmitAvital1 wants to merge 1 commit into
AmitAvital1 wants to merge 1 commit into
Conversation
Show a bouncing-dots indicator while the assistant has no answer text yet, and keep it visible when the user leaves a streaming thread and returns. Messages now live in a per-conversation map keyed by the id captured at submit time, so switching threads only swaps the view — the in-flight stream keeps writing to its own bucket. `typing` means "stream in flight" (set at submit, cleared at completion); reduceStreamEvent is reduced to content accumulation only, fixing dots that could otherwise linger on an empty final answer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
|
The new per-conversation message state is a good improvement. However, methods like This can cause a problem if the user switches conversations while a request is still running. The request may start in conversation A, but later use conversation B from local storage. I suggest passing the conversation ID directly to every method: stream(conversationId, text)
send(conversationId, text)
loadHistory(conversationId)
loadUsage(conversationId)Local storage should only remember the last selected conversation. It should not decide which conversation an active request belongs to. I would fix this before merging. |
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.
Stack 4/4 · base:
feat/widget-thread-list(#59)Shows a bouncing-dots indicator while the assistant has no answer text yet, and keeps it visible when the user leaves a streaming thread and returns. Messages now live in a per-conversation map keyed by the id captured at submit time, so switching threads only swaps the view — the in-flight stream keeps writing to its own bucket.
typingmeans "stream in flight" (set at submit, cleared at completion);reduceStreamEventis reduced to content accumulation only, fixing dots that could otherwise linger on an empty final answer.Verified: widget typecheck,
test:widget, and Playwright e2e (incl. a new switch-away-and-back test) all green.🤖 Generated with Claude Code