Cognition's Chat Rebuild Is About Height, Not Speed

Cognition rebuilt Devin's chat renderer around a two-stage fetch: skeleton outlines first, island loading second, cutting load time 70% and layout shift 86%.

I've been thinking about this for agent UIs I build. The naive approach fetches the full transcript and renders it. On a 500-message session with tool calls and code blocks, that is a lot of DOM and a lot of layout. The browser blocks, the user sees nothing, then everything jumps.

Cognition's approach is to fetch outline skeletons first, the cheap metadata of each message, render the scroll container with correct heights, then lazy-load the heavy content islands as they enter view. The 86% reduction in layout shift matters more to me than the 70% speedup. Shift is what makes a chat feel broken. You scroll to a line, it moves, you lose your place. Fixing height before content arrives fixes that.

The part I want to borrow is the height reservation. Most agent chat libraries I have used render messages as they stream and let the container grow. That is fine for short sessions. For long-lived ones, reserving height up front and filling in content later is the difference between usable and not.

The open question is where the skeleton data comes from. If the backend has to compute per-message height estimates, that is new API surface. If the client estimates from message metadata, it will be wrong for code blocks. I suspect the real work is in the estimation, not the virtualization.

Source: https://alphasignal.ai/news/cognition-rebuilds-devin-s-chat-to-load-70-faster-for-huge-sessions