In an ordinary chat app the client knows every row type at compile time. Here it
does not. An agent working in a thread streams its output back into the conversation
and can decide, mid-task, that it needs something from the person watching: pick one
of these, confirm this, fill this in. That arrives as an interactive card which has
to render inline, take an answer, submit it, and then settle into a static record of
what was answered.
Three things make that hard on a phone rather than merely fiddly.
Rows change height while you look at them
Streamed text grows, cards expand, blocks collapse. The list has to stay anchored to the newest message without shoving content out from under a thumb that is already dragging.
The card is state, not a view
A prompt can be answered, abandoned, superseded by the agent finishing, or delivered twice on a reconnect. Every one of those was a bug before it was a behaviour.
The keyboard is a third participant
A compose field, an interactive card and a scroll view all negotiating the same bottom inset is where most of the visible bugs lived.
The message list ended up as a y-inverted UICollectionView behind a UIViewRepresentable, because SwiftUI's scrolling stack does not hand you
scroll geometry. That rewrite has its own write-up.