githubnext/chopinPublic

Let's compose rich plans together

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>
C5MAMaggie Appleton and Claude Opus 5.5 authored
5119f5aPatch
Parent91d8eb7
12 files changed+492-121
StackedSplit
e2e/research-child-recovery.e2e.ts+1 −1
e2e/research-workspace.e2e.ts+63 −3
packages/editor/src/plan-editor.tsx+8 −3
packages/editor/src/research-draft.test.ts+33 −0
packages/editor/src/research-draft.ts+37 −0
packages/editor/src/styles.css+73 −19
packages/editor/src/toolbar/placement.test.ts+59 −1
packages/editor/src/toolbar/placement.ts+55 −0
packages/editor/src/toolbar/research.test.tsx+3 −9
packages/editor/src/toolbar/research.tsx+92 −37
packages/editor/src/widgets/research-composer.test.tsx+17 −1
packages/editor/src/widgets/research.tsx+51 −47