Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Design: Standalone composer input in quill + question tool - #3749

Closed
adamleithp wants to merge 2 commits into
mainfrom
claude/quill-standalone-prompt-input-k653vd
Closed

Design: Standalone composer input in quill + question tool#3749
adamleithp wants to merge 2 commits into
mainfrom
claude/quill-standalone-prompt-input-k653vd

Conversation

@adamleithp

Copy link
Copy Markdown
Contributor

Problem

Today, the prompt input shell is tightly coupled to @posthog/ui's PromptInput component, making it difficult to reuse across surfaces. When a question tool is active, the UI swaps between two visually distinct components (the message composer and the question card), breaking the illusion of a continuous input at the bottom.

This design document proposes moving the presentational shell of the prompt input into @posthog/quill as a reusable Composer component, and using that same shell for the question tool surface so both modes render identically and appear to be a single, continuous input.

Changes

This is a design-review document only — no implementation code yet. The document specifies:

  1. Composer component — a compositional wrapper over InputGroup that owns the focus ring, grow behavior, and layout of the message input shell. Exposes slots for header, body, and toolbar via ComposerHeader, ComposerBody, and ComposerToolbar sub-components.

  2. Motion policy — the grow transition (when a question tool activates) is opt-out via CSS custom properties and a motion prop, never forced. Respects prefers-reduced-motion.

  3. Question surface continuity — the same Composer shell is reused for both message and question modes. When a question is pending, the header swaps to show question options/steps, the body becomes "talk about it" input, and the toolbar shows "Submit answer" instead of "Send". No visual swap, no remount — just content change within the same shell.

  4. Migration plan — phased approach: quill ships Composer* components first, then code refactors PromptInputMessageComposer (zero behavior change), then adds QuestionComposer and switches SessionView to the shared-shell pattern.

  5. Open questions — clarifies decisions for review: layer (component vs. block), scope of question-tool primitives in quill, icon strategy, bash-mode state encoding, focus callback seam, motion defaults, and EditorHandle scope.

All domain logic (tiptap, ACP, drafts, attachments, hotkeys, submit behavior) remains in @posthog/ui and is passed as children/slots. Quill owns only the presentational shell.

How did you test this?

N/A — this is a design document for review. Implementation and testing follow in a later pass.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

https://claude.ai/code/session_015sNchSXj5YTpcCi72yC3LY

claude added 2 commits July 23, 2026 09:05
Design-only pass. Documents extracting code's PromptInput presentational
shell into a host-agnostic @posthog/quill Composer (composed over the
existing InputGroup, whose block-aligned addons already grow the box), and a
question surface that reuses the same shell so the bottom input reads as
continuous and becomes a "talk about it" input when a question tool is active.
No production code changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sNchSXj5YTpcCi72yC3LY
Add a motion policy to the composer design: quill ships a default grow/expand
transition (box expanding upward when a question tool activates) but routes it
through an overridable CSS custom property + `motion` prop, so consumers can go
to `transition: none` or any curve without fighting the library. Reduced-motion
is a floor, explicit consumer values still win.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sNchSXj5YTpcCi72yC3LY
@trunk-io

trunk-io Bot commented Jul 23, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@adamleithp adamleithp closed this Jul 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants