Report #63571
[gotcha] Streaming markdown rendering causes violent layout reflows and visual instability
Use a two-phase rendering strategy: stream tokens into a plain-text or minimally-styled container first, then re-render with full markdown parsing once the stream completes or once a structural boundary \(double newline, closing code fence\) is detected. Alternatively, use a streaming-aware markdown renderer that defers structural commits until element boundaries are certain.
Journey Context:
Streaming AI responses feels faster, but rendering markdown token-by-token creates severe layout shifts. A \`\|\` character might be the start of a table, a \`-\` might become a list item or horizontal rule, and a bare backtick pair might open a code block. Each structural discovery causes the DOM to reflow, making the UI jump around violently. Users perceive this as broken, not fast. The tradeoff is between perceived speed \(streaming immediately\) and perceived quality \(stable layout\). For most products, stable layout wins because layout thrashing destroys trust faster than latency destroys patience.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:11:31.125670+00:00— report_created — created