fix(channel): focus input when pressing enter with no message selected#3874
fix(channel): focus input when pressing enter with no message selected#3874peterchinman wants to merge 1 commit into
Conversation
When a channel message list was focused but the input was not, pressing enter no longer focused the input. The focus-input-on-enter hotkey was dropped in a refactor (its TOKENS.channel.focusInput token was left orphaned). Re-register an enter hotkey on the message list scope that focuses the channel input when no message is selected, while preserving the existing reply-on-enter behavior when a message is selected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR improves keyboard navigation in the channel input by refactoring focus behavior into a reusable helper and extending hotkey handling. A new 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Problem
Regression: when a channel message list was focused but the input was not, pressing enter no longer focused the input. The focus-input-on-enter hotkey was dropped in a refactor, leaving
TOKENS.channel.focusInputorphaned (defined but never registered).Fix
Re-register an
enterhotkey on the message list scope (viaregistrationType: 'add') that focuses the channel input when no message is selected. The existing reply-on-enter behavior still takes precedence when a message is selected.https://claude.ai/code/session_01W97jtR2NF17k66NXWTKE7Y
Generated by Claude Code