· Research AI
Staged SSE Without Spoilers: Research AI Wait UX
Cache miss means queue + worker. Users wait. A spinner alone feels broken; streaming half a verdict would lie.
What we stream
Four stage labels over SSE:
thinking → scoring → sourcing → synthesizing → done
done carries the full cached JSON — same shape as a cache hit. Stages are cosmetic progress, not partial decisions.
Where it runs
/result— single topic/compare— two parallel EventSources- Next.js
/api/research/streamproxies Fly when configured
On stream failure, client falls back to POST /api/research.
Rule
If the UI shows a verdict before done, we broke ADR-002. Progress UI is allowed; decision UI waits for the worker row.
Further reading: ADR-008 in xingai-research-ai/docs/adr/