Skip to content

fix(app): ignore repeated Enter submits in prompt input#18148

Merged
nexxeln merged 3 commits intoanomalyco:devfrom
anduimagui:fix/repeated-enter-abort
Mar 19, 2026
Merged

fix(app): ignore repeated Enter submits in prompt input#18148
nexxeln merged 3 commits intoanomalyco:devfrom
anduimagui:fix/repeated-enter-abort

Conversation

@anduimagui
Copy link
Contributor

Issue for this PR

Closes #18147

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When the prompt is submitted with Enter, a fast second Enter press or key repeat can fire after the prompt has been cleared but while the session is still running. In that state, the empty-submit path treats the action as an abort, so the in-flight response gets interrupted.

This change ignores repeated Enter keydown events in the shared prompt input before they reach handleSubmit(). It also keeps the first Enter on the handled path by calling preventDefault() before submit.

How did you verify your code works?

  • Ran bun typecheck in packages/app
  • Attempted to push normally, but the repo pre-push hook failed on unrelated existing packages/opencode typecheck errors

Screenshots / recordings

N/A - keyboard handling fix

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@nexxeln nexxeln enabled auto-merge (squash) March 19, 2026 11:46
@nexxeln nexxeln merged commit f4a9fe2 into anomalyco:dev Mar 19, 2026
8 checks passed
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.

Bug: repeated Enter interrupts active desktop/app prompt

2 participants