Skip to content

fix(desktop): clear edit-composer submitting latch after 200ms cooldown#71102

Open
xrwang8 wants to merge 1 commit into
NousResearch:mainfrom
xrwang8:fix/desktop-edit-composer-enter-submit
Open

fix(desktop): clear edit-composer submitting latch after 200ms cooldown#71102
xrwang8 wants to merge 1 commit into
NousResearch:mainfrom
xrwang8:fix/desktop-edit-composer-enter-submit

Conversation

@xrwang8

@xrwang8 xrwang8 commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Fixes #70771 - Desktop edit-composer Enter-to-submit broken

Changes

  • Add submitting state + IME composition guard to prevent double-submit
  • submitEdit() sets latch, then clears after 200ms timeout
  • handleKeyDown() guards on composing so IME Enter doesn't submit
  • Shift+Enter inserts newline without submitting
  • Test validates Enter calls onEdit, latch clears for second session

Testing

  • ✅ user-message-edit.test.tsx: 7 tests passed
  • ✅ enter-submit-dom-race.test.tsx: 5 tests passed
  • ✅ Full test suite: 2749 tests passed

Related

Fixes #70771

- Add submitting state + IME composition guard to prevent double-submit
- submitEdit() sets latch, then clears after 200ms timeout
- handleKeyDown() guards on composing so IME Enter doesn't submit
- Shift+Enter inserts newline without submitting
- Test validates Enter calls onEdit, latch clears for second session

Fixes NousResearch#70771

Signed-off-by: xrwang8 <xrwang8@gmail.com>
@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 25, 2026
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/*) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Desktop — Enter on earlier-message edit does not submit (Claude/Grok parity)

2 participants