You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typing in the thread composer gets sluggish after a few characters. Each keystroke writes React state in Composer, which re-renders the whole composer (model picker rows, permission/build chrome, slash/mention refresh) even when the prompt is plain text.
Controlled <textarea value={draft}> also fights Chromium input: caret restore, spellcheck, and field-sizing: content layout run on every letter.
Fix
Keep the draft in a ref. The textarea is uncontrolled (key={threadId} + defaultValue).
Only flip React state when hasPrompt changes (empty ↔ non-empty), or when mention/slash popups actually need to paint.
Do not setState to a new [] on every closeMention while already closed (onChange + onSelect currently double-fire).
spellCheck={false} / autoComplete="off" on the prompt field.
Cap field-sizing: content with a max-height so a long paste cannot reflow the transcript.
Tests
Plain typing after the first letter must not rebuild model-picker chrome.
Composer prompt is now an uncontrolled textarea. Draft lives in a ref; React only paints when hasPrompt flips or a mention/slash popup needs to. Verified: composer + mention + slash + ThreadView tests, tsc clean.
Activity
currentbits commentedon Aug 22, 2026
Composer prompt is now an uncontrolled textarea. Draft lives in a ref; React only paints when hasPrompt flips or a mention/slash popup needs to. Verified: composer + mention + slash + ThreadView tests, tsc clean.