Skip to content

feat(desktop): support multiline chat input - #65837

Closed
henrynguyeninfo1 wants to merge 1 commit into
NousResearch:mainfrom
henrynguyeninfo1:henrynguyeninfo1/issue-52952-desktop-newline
Closed

feat(desktop): support multiline chat input#65837
henrynguyeninfo1 wants to merge 1 commit into
NousResearch:mainfrom
henrynguyeninfo1:henrynguyeninfo1/issue-52952-desktop-newline

Conversation

@henrynguyeninfo1

Copy link
Copy Markdown

Summary

  • make Shift+Enter insert an explicit newline in the Desktop chat composer while keeping Enter-to-send as the default
  • flush the contenteditable draft immediately so multiline content is preserved when sent
  • add composer regression coverage for Shift+Enter newline insertion and multiline submit payloads

Fixes #52952.

Test plan

  • npm --workspace apps/desktop run test:ui -- src/app/chat/composer/rich-editor.test.ts src/app/chat/composer/enter-submit-dom-race.test.tsx
  • npm --workspace apps/desktop exec eslint src/app/chat/composer/index.tsx src/app/chat/composer/enter-submit-dom-race.test.tsx
  • npm --workspace apps/desktop run typecheck

RISK: GUI behavior was not manually verified in a packaged Electron window; validation is automated component/unit coverage plus typecheck/lint.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Jul 16, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Multiline chat input feature for desktop. Clean, simple addition. No security concerns.


Reviewed by Hermes Agent

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Desktop regression coverage. This is an automated hermes-sweeper review; current main already provides the requested behavior, so this PR is redundant.

  • apps/desktop/src/app/chat/composer/index.tsx:577 submits only when !event.shiftKey, leaving Shift+Enter to insert the contenteditable newline.
  • apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts:118-134 synchronously reads the live editor DOM before submitting, preserving multiline content despite deferred input flushing.
  • apps/desktop/src/lib/keybinds/actions.ts:196-200 and apps/desktop/src/i18n/en.ts:1745 already advertise Shift+Enter as the composer newline shortcut.
  • apps/desktop/src/app/chat/composer/rich-editor.ts:322-363 explicitly preserves real Shift+Enter line breaks during editor normalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Desktop Enter key sends message — no newline support in chat input

4 participants