fix(web): Enter inserts newline when composer is expanded - #1729
Open
techotaku39 wants to merge 2 commits into
Open
fix(web): Enter inserts newline when composer is expanded#1729techotaku39 wants to merge 2 commits into
techotaku39 wants to merge 2 commits into
Conversation
Expanded long-form mode should not submit on plain Enter even when Settings prefer Enter=send; Ctrl/Cmd+Enter and the send button still send. Collapsed composer continues to honor composerEnterBehavior. Closes tiann#1403 Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Findings
- None.
Summary
- Review mode: initial
- No Blocker, Major, Minor, or Nit issues found in the latest diff. Residual testing gap:
web/src/components/AssistantChat/HappyComposer.expandEnter.test.tsx:236verifies that plain Enter does not send, but jsdom does not perform the textarea default action, so the fallback textarea newline insertion is not directly asserted. The rich-editor line-break primitive has existing coverage atweb/src/components/AssistantChat/RichComposerInput.test.tsx:241.
Testing
- Not run (automation). GitHub
integrationpassed;testwas pending at review time.
HAPI Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
bun typecheck— passed.bun run --cwd web test src/components/AssistantChat/HappyComposer.expandEnter.test.tsx src/components/AssistantChat/HappyComposer.expandSelection.test.tsx src/components/AssistantChat/HappyComposer.richBridge.test.tsx src/components/AssistantChat/HappyComposer.sendError.test.tsx src/components/AssistantChat/HappyComposer.modelEffort.test.tsx src/components/AssistantChat/HappyComposer.modelEffortButtons.test.tsx src/components/AssistantChat/ComposerButtons.test.tsx src/components/AssistantChat/RichComposerInput.test.tsx src/components/AssistantChat/RichComposerInput.segments.test.ts src/hooks/useComposerEnterBehavior.test.ts src/lib/messageDelivery.test.ts src/lib/assistant-runtime.test.ts src/components/SessionChat.test.ts— 13 files, 196 tests passed.pwsh -NoProfile -File .\scripts\Invoke-HapiTaskPlaywright.ps1 -Name fix-issue-1403-enter-newline -Suite Root -TestArgs terminal-wrap-fidelity.spec.ts— 2 tests passed.pwsh -NoProfile -File .\scripts\Invoke-HapiTaskPlaywright.ps1 -Name fix-issue-1403-enter-newline -Suite Live— 2 tests passed against the built Full environment, covering rich composer and textarea fallback.bun run build— passed.Related Issues
Fixes #1403
AI Disclosure
Implemented with assistance from OpenAI Codex (GPT-5.6).