feat(web): implement SSE chat streaming with real-time token rendering #516

Merged
jason.woltje merged 1 commits from feat/ms19-chat-streaming-v2 into main 2026-02-26 02:39:44 +00:00
Owner

Summary

  • Implement SSE chat streaming via fetch ReadableStream in streamChatMessage()
  • Update useChat hook with streaming state, abort support, and automatic fallback to non-streaming
  • Add streaming indicator (blinking cursor) in MessageList during token rendering
  • Update ChatInput with Stop/Send button toggle and input disable during streaming
  • Add CSS animations for streaming cursor indicator
  • Fix message ID uniqueness to prevent collision in rapid sends

Test plan

  • 1200 web tests pass (including new streaming tests)
  • TypeScript typecheck clean
  • Lint clean
  • Streaming success path tested (makeStreamSucceed helper)
  • Streaming failure with fallback tested (makeStreamFail helper)
  • Abort/cancel tested
  • Rapid sequential sends tested

Relates to #510

## Summary - Implement SSE chat streaming via fetch ReadableStream in streamChatMessage() - Update useChat hook with streaming state, abort support, and automatic fallback to non-streaming - Add streaming indicator (blinking cursor) in MessageList during token rendering - Update ChatInput with Stop/Send button toggle and input disable during streaming - Add CSS animations for streaming cursor indicator - Fix message ID uniqueness to prevent collision in rapid sends ## Test plan - [x] 1200 web tests pass (including new streaming tests) - [x] TypeScript typecheck clean - [x] Lint clean - [x] Streaming success path tested (makeStreamSucceed helper) - [x] Streaming failure with fallback tested (makeStreamFail helper) - [x] Abort/cancel tested - [x] Rapid sequential sends tested Relates to #510
jason.woltje added the web label 2026-02-26 02:39:36 +00:00
jason.woltje added 1 commit 2026-02-26 02:39:37 +00:00
feat(web): implement SSE chat streaming with real-time token rendering
Some checks failed
ci/woodpecker/push/web Pipeline failed
f4b4ba4c54
- Implement streamChatMessage() using fetch ReadableStream for SSE parsing
- Update useChat hook with streaming state, abort support, and fallback to non-streaming
- Add streaming indicator (blinking cursor) in MessageList during token streaming
- Update ChatInput with Stop button during streaming, disable input while streaming
- Add CSS animations for streaming cursor
- Fix message ID uniqueness to prevent collisions in rapid sends
- Update tests for streaming path with makeStreamSucceed/makeStreamFail helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 7de0e734b0 into main 2026-02-26 02:39:44 +00:00
jason.woltje deleted branch feat/ms19-chat-streaming-v2 2026-02-26 02:39:44 +00:00
Sign in to join this conversation.