brauliogusmao steadies streamed AI answers before polishing them

The fork stops a live assistant reply from breaking mid-stream, then applies richer formatting once the answer is complete.

chat-uiinfrastructure

When an assistant answer arrives word by word, rich formatting can sometimes destabilise the message on screen. brauliogusmao's fork takes a deliberately conservative route: it shows the incoming response plainly while it is still arriving, then refreshes it with the full formatting once complete.

That means tables, mathematical notation and other Markdown niceties appear after the stream finishes, rather than competing with a changing live response. The tradeoff is a brief delay before the polished version appears, but the practical gain is a more dependable chat experience without disappearing or broken messages.

So what Legal teams using AI chat for lengthy or structured answers should care because a reliable answer on screen matters more than formatting a few seconds early.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from brauliogusmao/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
4872c90b fix: corrige removeChild durante streaming do ReactMarkdown Braulio Gabriel Gusmao 2026-05-12 ↗ GitHub
commit body
Adiciona key="streaming"/"done" no ReactMarkdown para forçar remount
ao fim do streaming. Evita que rehypeKatex/remarkGfm produzam árvores
DOM inconsistentes durante reconciliação com markdown parcial.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
78e2b036 fix: desativa plugins do ReactMarkdown durante streaming para evitar conflito de DOM Braulio Gabriel Gusmao 2026-05-12 ↗ GitHub
commit body
Durante streaming usa ReactMarkdown sem plugins (árvore DOM estável).
Ao fim do streaming, key muda para "done" forçando remount único com
rehypeKatex e remarkGfm ativos para renderização final completa.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-2020.md from inside the repo you want the changes in.

⬇ Download capture-thread-2020.md