You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: typed SSE client primitive (port from Teller, .ts) #22
Streaming-LLM apps need an SSE client. Hand-written SSE parsing is a known footgun (RFC 6455-style event:/data:/blank-line state machine). Shipping a tested, typed primitive saves users that footgun.
Proposed solution
Port frontend/src/lib/api/client.js from Teller into frontend/src/lib/api/client.ts. Type the event shapes with discriminated unions. Keep the parser pure (no DOM dependency). Add a vitest unit test for the parser using a fake ReadableStream.
Acceptance criteria
client.ts exports a typed consumeSSE function returning an AsyncIterable of typed events.
Vitest unit test covers: event:/data: parsing, multi-line data:, blank-line dispatch, partial-chunk reassembly.
Strict TS passes; eslint zero warnings.
Priority rationale
High: this is one of the most copy-pasted-incorrectly primitives in LLM-frontend code. Shipping it correctly is a portfolio differentiator.
Activity
feat: SSE client primitive + hello page + CSS palette + component test (
constk commentedon Apr 27, 2026
Merged in PR #59.