Skip to content

Comments

feat(web): Insert newline on Alt+Enter in chat box#912

Merged
brendan-kellam merged 2 commits intomainfrom
bkellam/alt-enter-newline
Feb 19, 2026
Merged

feat(web): Insert newline on Alt+Enter in chat box#912
brendan-kellam merged 2 commits intomainfrom
bkellam/alt-enter-newline

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Feb 19, 2026

Summary

  • Alt+Enter (Option+Enter on Mac) now inserts a newline in the chat input instead of submitting
  • Shift+Enter behavior is unchanged

Test plan

  • Type in the chat box and press Alt+Enter — a newline should be inserted
  • Press Enter alone — message should still submit
  • Press Shift+Enter — newline should still be inserted

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Alt+Enter (Option+Enter on Mac) now inserts a newline in the chat input instead of submitting.

brendan-kellam and others added 2 commits February 19, 2026 15:40
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

These changes add support for Alt+Enter (Option+Enter on Mac) keyboard shortcut to insert a newline in the chat input box instead of submitting the message, along with corresponding changelog documentation.

Changes

Cohort / File(s) Summary
Keyboard Shortcut Implementation
packages/web/src/features/chat/components/chatBox/chatBox.tsx
Added altKey condition in the onKeyDown Enter handler: when Alt+Enter is pressed and suggestionMode is "none", the default action is prevented and editor.insertBreak() is called to insert a newline, creating a distinct path from the standard Enter submission behavior.
Documentation
CHANGELOG.md
Added entry under Unreleased > Changed documenting the new Alt+Enter (Option+Enter on Mac) newline insertion behavior in chat input.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bkellam/alt-enter-newline

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@brendan-kellam brendan-kellam merged commit d476e3f into main Feb 19, 2026
8 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/alt-enter-newline branch February 19, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant