fix(chat): focus the composer when opening a new or existing chat - #6683
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview The mount-time focus effect in Reviewed by Cursor Bugbot for commit f45c396. Configure here. |
Greptile SummaryThe PR updates the chat composer’s mount-time focus behavior so opening a new or existing chat transfers focus from sidebar links or buttons while preserving focus in active text-entry fields.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified. The changed focus effect preserves focus for active native and contenteditable fields while correctly transferring focus from the sidebar control during the reachable composer remount flow.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx | Broadens composer autofocus from neutral document focus to non-text-entry controls without revealing a concrete regression in current mounting paths. |
Reviews (1): Last reviewed commit: "fix(chat): focus the composer when openi..." | Re-trigger Greptile
Summary
document.activeElementwasbody/documentElement; it now focuses unless the active element is a real text-entry field (input/textarea/select/contenteditable), so it takes focus from a link or button but never steals it from another fieldType of Change
Testing
Tested manually
Checklist