Keep the research composer visible as one surface
Place the /research draft with a unit-tested placeDraft(): below its anchor block when it fits, flipped above near the bottom edge, pinned when neither fits, and clamped to the visible scroller inside the visual viewport. On open and on viewport resize (on-screen keyboard) the scroller reveals the anchor line and the draft. The composer is now a single field surface with the focus ring on the card, inline status and error text in its footer, and popover enter/exit motion. Focus returns to the question after a failed start, and a draft whose reference the server rejected (document rebuilt right after placement) reopens with an inline error instead of vanishing. The plan scroller no longer writes back every reported scroll offset, which cancelled smooth scrolls; it restores the saved offset only on (re)mount. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parent91d8eb7
12 files changed+492-121
StackedSplit