Skip to content

fix(#199): Shift+Enter inserts newline instead of sending in newline mode#202

Closed
proyectoauraorg wants to merge 3 commits into
Zoo-Code-Org:mainfrom
proyectoauraorg:fix/199-shift-enter-newline
Closed

fix(#199): Shift+Enter inserts newline instead of sending in newline mode#202
proyectoauraorg wants to merge 3 commits into
Zoo-Code-Org:mainfrom
proyectoauraorg:fix/199-shift-enter-newline

Conversation

@proyectoauraorg
Copy link
Copy Markdown
Contributor

Resumen

Corrige el bug del Issue #199 donde Shift+Enter enviaba un mensaje vacío en lugar de insertar una nueva línea cuando el comportamiento de Enter está configurado como newline.

El problema

En el modo newline, la lógica original trataba Shift+Enter como combinación de envío junto con Ctrl+Enter y Cmd+Enter:

// ANTES (incorrecto)
if (event.shiftKey || event.ctrlKey || event.metaKey) {
  event.preventDefault()
  onSend()
}

Esto causaba que los usuarios que presionaban Shift+Enter (buscando una nueva línea) vieran enviado un mensaje vacío o incompleto.

La solución

Se remueve shiftKey de la condición de envío. Ahora solo Ctrl/Cmd+Enter envían mensajes, mientras que Shift+Enter inserta una nueva línea como se espera:

// DESPUÉS (correcto)
if (event.ctrlKey || event.metaKey) {
  event.preventDefault()
  onSend()
}

Cambios

Archivo Cambio
ChatTextArea.tsx Removido event.shiftKey de la condición de envío en modo newline
ChatTextArea.spec.tsx Actualizado test para verificar que Shift+Enter NO envía

Comportamiento esperado

Tecla Modo submit (default) Modo newline
Enter Enviar mensaje Nueva línea
Shift+Enter Nueva línea Nueva línea
Ctrl/Cmd+Enter Enviar mensaje Enviar mensaje

Fixes #199

…cronización

- Traducir todos los títulos, secciones y descripciones al español
- Agregar sección de Estado de Sincronización con tabla de branches
- Actualizar commit de referencia a 7de61e6
- Actualizar fecha y hora de última sincronización
… in newline mode

In 'newline' enter behavior mode, Shift+Enter was incorrectly treated as
a send shortcut alongside Ctrl+Enter and Cmd+Enter. This caused
unexpected empty message sends when users pressed Shift+Enter expecting
a newline.

- Remove shiftKey from the send condition in newline mode
- Only Ctrl/Cmd+Enter triggers send; Shift+Enter now inserts a newline
- Update test to reflect corrected behavior
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Warning

Rate limit exceeded

@proyectoauraorg has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 41 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7685c0c9-36c8-467f-8755-44abcfa3aa0e

📥 Commits

Reviewing files that changed from the base of the PR and between 7de61e6 and f589787.

📒 Files selected for processing (4)
  • .gitignore
  • CONTRIBUTIONS.md
  • webview-ui/src/components/chat/ChatTextArea.tsx
  • webview-ui/src/components/chat/__tests__/ChatTextArea.spec.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

proyectoauraorg added a commit to proyectoauraorg/Zoo-Code that referenced this pull request May 19, 2026
@navedmerchant
Copy link
Copy Markdown
Contributor

navedmerchant commented May 19, 2026

Thank you for your PR, it looks like its a duplicate of #199 Is your fix any different? The code looks the same to me

@edelauna
Copy link
Copy Markdown
Contributor

Closing in favour of #199

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.

3 participants