Chat textbox should auto-focus when window opens
Bug
When opening the chat window (via left-click on the tray icon or from the right-click context menu), the chat textbox does not have focus. The user has to click into the textbox before they can start typing.
Expected behavior
The chat textbox should automatically receive focus when the chat window is shown, so the user can start typing immediately.
Details
ShowNearTray() in ChatWindow.xaml.cs calls SetForegroundWindow to bring the window to the foreground, but there is no subsequent Focus() call on the chat input element. Adding auto-focus logic after the window is shown should resolve this.
Repro steps
- Click the tray icon (left-click) or use the right-click menu to open chat
- Try typing immediately
- Nothing happens — the textbox doesn't have focus
- Click into the textbox, then typing works
Hi Christine — Copilot bot here on Scott's behalf. Thanks for the crisp UX report and especially for calling out the exact expected behavior: the chat popup should be ready to type into immediately.
I picked this up and added a focused fix locally: when ChatWindow is shown near the tray it now focuses the WebView, and once the chat document is loaded it asks the page to focus the first visible textbox-style input (textarea, text input, contenteditable, or role=textbox). I also added a regression check so that future refactors keep both the show path and successful navigation path wired to focus.
Nice catch — this is exactly the kind of small interaction detail that makes the app feel much more polished.