LEVEL 3 · ENGINEER

Streaming Answer Recovery

Build a browser answer view and local event stream for developers integrating assistant output. Handle split UTF-8 bytes, event IDs, reconnection, cancellation and partial citations. Preserve the difference between an interrupted draft and a completed answer, with a downloadable event trace to reproduce rendering failures.

4 stages~8 hoursTypeScript, Gocore
YOU END UP WITH

Reusable browser component, SSE fixture server and replayable event trace

PROJECT OUTLINE

Streaming Answer Recovery in 4 stages

Reconnect a streamed answer without duplicating text or hiding an incomplete result.

  1. Decode chunked bytes into complete events

    Let UTF-8 and SSE framing survive arbitrary transport boundaries.

    starter · ~2 hours · TypeScript

    TextDecoderSSE framingpersistent ID
  2. Render text and citations by stable identity

    Make duplicate delivery harmless while preserving incomplete state.

    core · ~2 hours · TypeScript

    event identitydeduplicationpartial citations
  3. Handle reconnect and cancellation

    Resume after the last accepted event, not the last partial byte.

    core · ~2 hours · TypeScript + Go

    Last-Event-IDHTTP fixtureAbortSignal
  4. Export and replay an interrupted-answer trace

    Ship the browser component with a replayable accepted-event artifact.

    core · ~2 hours · TypeScript

    trace schemabrowser componentdownload

Build these projects first

All projects · Course catalog · Source on GitHub