Repository navigation
[codex] Fix Wework IME Enter submission - #1727
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughComposer onSubmit callbacks now accept an optional submitted text value instead of taking no arguments. Form submit handlers read the textarea's current value and pass it through, alongside new debug telemetry via a new composerDebug helper. ComposerTextarea's Enter-key handling during IME composition is reworked with a suppress-until-keyup flag, replacing prior timer-based logic. Tests are updated accordingly. ChangesComposer submit value and IME handling
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…enter-send # Conflicts: # wework/src/components/chat/ChatInput.tsx # wework/src/components/layout/useWorkbenchPaneSession.ts
Summary
localStorage['wework:debug-composer'] === '1'.Root Cause
The composer used a time-based
compositionJustEndedguard. Depending on IME event ordering, the Enter key used to confirm composition could either be swallowed as a newline or treated as a send shortcut. The fix tracks the physical key boundary instead: composition completion suppresses Enter until keyup, and subsequent independent Enter presses can submit normally.Validation
pnpm --filter wework exec vitest run src/components/chat/ChatInput.test.tsxpnpm --filter wework typecheckDocs were checked; this is a behavior bug fix and does not require user-facing documentation updates.
Summary by CodeRabbit
New Features
Bug Fixes