---
name: Auto-focus Chat Input on Startup
---

# Story: Auto-focus Chat Input on Startup

## User Story
**As a** User
**I want** the cursor to automatically appear in the chat input box when the app starts
**So that** I can immediately start typing without having to click into the input field first.

## Acceptance Criteria
*   [x] When the app loads and a project is selected, the chat input box should automatically receive focus
*   [x] The cursor should be visible and blinking in the input field
*   [x] User can immediately start typing without any additional clicks
*   [x] Focus should be set after the component mounts
*   [x] Should not interfere with other UI interactions

## Out of Scope
*   Auto-focus when switching between projects (only on initial load)
*   Remembering cursor position across sessions
*   Focus management for other input fields

## Implementation Notes
*   Use React `useEffect` hook to set focus on component mount
*   Use a ref to reference the input element
*   Call `inputRef.current?.focus()` after component renders
*   Ensure it works consistently across different browsers

## Related Functional Specs
*   Functional Spec: UI/UX