You tap the expand button in a chat composer. The input flashes, grows to a few lines, and then the keyboard disappears. The screen is now a large, mostly empty editor, and the thing you were typing with is gone. On top of that, opening the keyboard in the first place feels heavier than it should — not broken, just a beat behind your thumb.
Both symptoms live in the same widget, but they have different causes. One is a widget-tree identity mistake. The other is a rebuild subscription that quietly turned the keyboard animation into a full-screen rebuild. This post walks through both, the fixes, and the two invariants that make a composer feel solid.
Symptom one: the keyboard drops on expand
The composer had two layouts:
Collapsed: a floating card with a frosted background, side margins and rounded corners.
Expanded: a full-height editor that should reach from the header to the keyboard.
That sounds like a simple conditional.…