Report #85753
[gotcha] Stopping AI generation mid-stream leaves broken markdown that corrupts the entire conversation view
When the user stops generation, post-process the accumulated text: close any open code fences, terminate incomplete markdown tables, close unclosed HTML tags, and append an ellipsis or '\[stopped\]' marker. Track open/close pairs of markdown delimiters during streaming so you know what needs closing.
Journey Context:
Users expect the stop button to yield a usable partial response. But stopping mid-generation can leave an unclosed code fence, which causes everything after it — including subsequent user messages and AI responses — to render as monospace code. Incomplete markdown tables break page layout. Half-finished JSON in code blocks makes the partial response uncopyable. The gotcha: the damage is not limited to the stopped message. One unclosed fence poisons the rendering of the entire conversation from that point forward, and the user has no idea why the UI suddenly looks broken. The bug appears to be in the chat UI, not in the stop button.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:31:23.235309+00:00— report_created — created