The message input supports multi-line text
Why it matters
A single-line input type="text" makes it impossible to paste a multi-line code snippet, error trace, log excerpt, or long-form question — which is precisely the content users want to discuss with an AI. They will either truncate their question, paste it as one giant line that destroys formatting, or abandon the interaction. This is the most common prompt-quality issue in AI chat products and maps directly to lower response quality and lower user satisfaction.
Severity rationale
High because the input element itself caps the maximum useful prompt quality the product can ever receive.
Remediation
In src/components/chat/ChatInput.tsx, replace the input type="text" with a textarea, auto-resize it based on scrollHeight, and bind Enter to submit while reserving Shift+Enter for newline insertion.
<textarea
ref={textareaRef}
rows={1}
value={input}
onChange={(e) => { setInput(e.target.value); e.target.style.height = 'auto'; e.target.style.height = e.target.scrollHeight + 'px'; }}
/>
Detection
-
ID:
multiline-input -
Severity:
high -
What to look for: Find the message input component. Quote the actual HTML element type used (e.g., quote the
<textarea>or<input type="text">tag). Count all input elements in the chat form. Check whether it uses atextarea(supports multi-line) orinput type="text"(single line only). If it uses a textarea, verify the keyboard behavior — Shift+Enter should add a newline if Enter is used for submit. Check foronKeyDownhandlers that intercept Enter key behavior. Also check for auto-resize behavior — a textarea with a fixed small height of fewer than 3 rows that never grows is functionally equivalent to a single-line input. -
Pass criteria: The input field is a textarea or contentEditable element. Users can enter multi-line messages by pressing the designated newline key. The input grows as content is entered or has a minimum height of at least 2 visible lines of text.
-
Fail criteria: The input is
input type="text"(single line only), or the textarea has a fixed height of 1-2 lines with no growth and Enter always submits, making multi-line input practically impossible. -
Skip (N/A) when: The interface is explicitly a single-turn, single-line input by design (e.g., a search-style AI interface). Signal: the UI is labeled as a search or quick-query interface, not a conversation interface.
-
Detail on fail:
"Message input is input[type=text] — single-line only; users cannot enter multi-line messages or paste multi-line code snippets" -
Remediation: In
src/components/chat/ChatInput.tsx, replaceinput type="text"with atextareaand add auto-resize:<textarea ref={textareaRef} rows={1} value={input} onChange={(e) => { setInput(e.target.value); e.target.style.height = 'auto'; e.target.style.height = e.target.scrollHeight + 'px'; }} />Use Enter to submit and Shift+Enter to insert a newline.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-chat-visibility·automated