How do you stream AI text without the page stuttering?

Tokens arrive in bursts. Painting each burst the moment it lands reads as a stall, then a lurch. I'd rather the reveal keep a steady rhythm.

Who notices?

Anyone reading an answer while it streams. Network chunks are uneven: three characters, then sixty, then a pause. Paint them as they arrive and the eye has no steady rhythm to follow, so the answer feels slower than it is. That's perceived performance working against you.

Why not a typewriter at fixed speed?

A fixed typing speed breaks continuity the other way. On a long burst it falls behind and keeps typing after the model has finished. Speed it up and short answers flash in with no sense of arrival.

What does Pen do instead?

Pen holds back what has arrived and releases it on a short, even tick, a word at a time. When the backlog grows, each tick releases more, so a burst drains quickly and the tail eases back to one word per tick, the way a good ease-out settles instead of stopping dead. Nothing re-renders; the hidden tail is only a decoration over text that's already there.

What does it cost?

The last words appear a beat after they arrive over the wire. And under reduced motion the pacing switches off entirely and text paints as it lands, because smoothness is never worth more than someone's stated preference.

Draft. The reasoning above is scaffolding; rewrite it in your own words before publishing.

andreaskruszakin@gmail.com