Report #62490
[gotcha] Streaming markdown token-by-token creates broken intermediate renders \(unclosed code fences, incomplete tables, malformed links\) that flicker and confuse users
Use a streaming-aware markdown parser that defers rendering of incomplete structures; buffer until complete markdown blocks \(code fences, tables, links\) are formed before committing them to the DOM; show a placeholder or subtle loading indicator for in-progress blocks
Journey Context:
The naive approach appends each streamed token to innerHTML and re-renders markdown on every chunk. This creates visual chaos: an unclosed code fence swallows subsequent content into the code block, an incomplete table renders as raw pipe-separated text, and each new token can reflow the entire layout. The counter-intuitive fix is that you must sometimes DELAY rendering to avoid showing broken intermediate states. Streaming-aware parsers track open/close markers and only render complete structures, which eliminates the flicker but introduces a slight visual lag for structured content — a worthwhile tradeoff.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:22:23.500198+00:00— report_created — created