Treat streaming as semantic asynchronous state
Queued, generating, tool activity, partial, completed, stopped and failed states are distinguishable and accessible.
Guidance
Reserve layout, preserve focus and user input, expose stop, batch live announcements and label partial output as partial. Completion is a state transition, not the last received token.
Do
- Stabilize geometry before output arrives
- Announce meaningful chunks rather than every token
- Keep stop and retry keyboard reachable
Do not
- Move the active target as content streams
- Present partial output as confirmed
- Use typing theater without status meaning
Verification contract
Keyboard stop, focus retention, screen-reader announcement, reduced-motion and layout-shift tests
Supporting references
ref.copilotkit.ag-ui— AG-UI Protocolref.mcp.apps— MCP Apps — Embedded Interactive Tool UIref.pinterest.gestalt— Pinterest Gestaltref.vercel.ai-elements— Vercel AI Elements