# Tolerate half-streamed markdown and pin scroll position Status: accepted ## Context Assistant text is rendered while it streams, so input is often incomplete: an unclosed code fence or an unfinished table. Users also read earlier text while new text arrives below. ## Decision The markdown renderer treats an unclosed fence as code and an unfinished table as plain text instead of failing. Scroll state is either following the bottom (`top: None`) or pinned to a line (`Some(n)`); pinned views do not move when text streams in, and reaching the bottom resumes following. ## Consequences Rendering never needs the complete message; a table pops into a grid once complete. Scroll behaviour is predictable during streaming. Code: crates/hx-tui/src/markdown.rs (module), crates/hx-tui/src/scroll.rs (module)