Repository navigation
Focus search inputs for immediate typing - #13264
Conversation
- Autofocus inputs in AutomationListSearchField, SettingsSidebar, and WorktreeParentPickerPopover - Only autofocus Settings search when opening directly, not via deep-link - Use modal mode and explicit focus management in popover for proper restoration - Forward CommandInput ref and add autofocus test coverage
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change adds autofocus to the automation search input. Settings enables search autofocus for ordinary openings and disables it for navigation-targeted openings. The worktree parent picker now uses modal focus handling, focuses its search input on open, and restores focus to the anchor container on close. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3343b2b8-c5c0-453a-b92f-3aa9c4ff7a7d
📒 Files selected for processing (7)
src/renderer/src/components/automations/AutomationListSearchField.test.tsxsrc/renderer/src/components/automations/AutomationListSearchField.tsxsrc/renderer/src/components/settings/Settings.tsxsrc/renderer/src/components/settings/SettingsSidebar.tsxsrc/renderer/src/components/sidebar/WorktreeParentPickerPopover.tsxsrc/renderer/src/components/ui/command.tsxtests/e2e/settings-search-shortcuts-pane.spec.ts
- Find the nearest focusable ancestor of the anchor row to restore focus to instead of letting it drop on the detached input element - Simplify focus assertion in AutomationListSearchField test to verify actual focus behavior rather than autofocus attribute presence
* Focus search inputs for immediate typing - Autofocus inputs in AutomationListSearchField, SettingsSidebar, and WorktreeParentPickerPopover - Only autofocus Settings search when opening directly, not via deep-link - Use modal mode and explicit focus management in popover for proper restoration - Forward CommandInput ref and add autofocus test coverage * Restore focus when closing worktree parent picker popover - Find the nearest focusable ancestor of the anchor row to restore focus to instead of letting it drop on the detached input element - Simplify focus assertion in AutomationListSearchField test to verify actual focus behavior rather than autofocus attribute presence
Problem
Search inputs across the app don't automatically receive focus when opened, requiring users to click before they can start typing.
Solution
Add
autoFocusto search input fields so users can type immediately:onOpenAutoFocus/onCloseAutoFocuscallbacks, since the virtual anchor has no DOM trigger for Radix to restore focus toTesting