Skip to content

fix(prompt-input): prevent extra line break after send#136

Merged
heath-s merged 1 commit into
mainfrom
agent/fix-prompt-enter-reset
Jul 10, 2026
Merged

fix(prompt-input): prevent extra line break after send#136
heath-s merged 1 commit into
mainfrom
agent/fix-prompt-enter-reset

Conversation

@heath-s

@heath-s heath-s commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • consume Enter commands that the prompt composer already handled
  • prevent Lexical from inserting a trailing line break after message submission
  • preserve multiline Enter behavior and add focused regression coverage

Root cause

Lexical's plain-text Enter handler does not honor defaultPrevented, so the composer could submit the prompt while Lexical still inserted a line break. The cleared editor then retained that empty second line and caret position.

Verification

  • bun test tests/prompt-lexical-editor.commands.test.ts tests/prompt-input-queue-mode.test.tsx tests/custom-theme.test.ts (41 passed)
  • bun run typecheck
  • bun run build

@heath-s heath-s marked this pull request as ready for review July 10, 2026 07:16
@heath-s heath-s enabled auto-merge (squash) July 10, 2026 07:16
@heath-s heath-s merged commit f84e7ef into main Jul 10, 2026
3 checks passed
@heath-s heath-s deleted the agent/fix-prompt-enter-reset branch July 10, 2026 07:56
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.

2 participants