feat(06): Streaming chat and agent UI - #48
Open
tpaulshippy wants to merge 6 commits into
Open
Conversation
…s[] (docs/roadmap/06-streaming-chat-and-agent-ui.md) - ChatAgentService: client_events accumulation + respond_events() generator (token / tool_start / tool_end / done) buffering tool-call chunks - Chat.stream_response(): persists assistant message on done AND partial text on disconnect (doc 06 §2 'prefer save partial'); over_limit -> single error - POST /api/chats/<id>/stream (plain Django StreamingHttpResponse, no channels): meta/status/token/done/error frames per doc 06 §1 - Legacy POST gains optional events[] (flashcard_deck_created) per doc 06 §3 - FakeStreamingClient + seed_e2e_streaming_chat: deterministic demo/e2e path with no AWS credentials
- api/chats.ts: createSseParser + normalizeStreamEvent (chunk-safe, unit tested) and streamChatMessage() using fetch+ReadableStream per doc 06 §1, with XHR progress fallback for RN FormData image parts; AbortSignal cancel - botChat.tsx: sending/streaming/error state machine, growing assistant bubble, Stop button (testID stop-button), Retry on failed send, light haptic on deck creation, VoiceOver 'Bot is typing' announcement - ChatMessage.tsx: agent-activity chips (searching/deck/sources) + retry - deck toast 'N cards in <name>' with Study now CTA -> /flashcards/deck - e2e/06-streaming-chat.e2e.js: seeded fake-stream walk (progressive tokens, tool chip, toast, study deep link) + cancel-mid-stream keeps bubble
tpaulshippy
pushed a commit
that referenced
this pull request
Aug 26, 2026
Screenshot shows the chat screen with message input and camera/send buttons.
Screenshot shows the chat screen with message input and camera/send buttons.
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.
Roadmap 06: Streaming Chat & Agent UI
Implements #58.
What changed
POST /api/chats/{id}/stream),respond_eventsgenerator, partial text save on disconnect, fake AI client for e2e (e2e-fake-streammodel)createSseParser(chunk-boundary-safe), growing assistant bubble, Stop button, agent-activity chips (deck/search/sources), deck-created toast → Study nowStreamingHttpResponse(no new infra needed)Evidence
https://github.com/tpaulshippy/bots/raw/feature/roadmap-06-streaming-chat/evidence/pr48-streaming.mp4