fix(tui): preserve IME text before return submit - #39695
Closed
InphinitiZ wants to merge 1 commit into
Closed
Conversation
Preserve printable IME commit text when xterm delivers it in the same input burst as Return, so Dashboard/TUI submits the visible draft instead of dropping the final segment. Also fixes the TUI type-check stdio tuple typing and adds focused regression coverage.
1 task
Contributor
|
Thanks for the focused TUI fix. The current shared Return path still submits Automated hermes-sweeper review. |
Contributor
|
Thanks for this fix! It was salvaged into #86761 (cherry-picked onto current main with your authorship preserved in the commit history) and is now merged. Closing since the work has landed. |
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
execFileNoThrowstdio tuple typing that blockedui-tuitype-check.Why
A browser/xterm IME flow can deliver finalized CJK text immediately followed by Return in one input burst, e.g.
会丢失内容\r. The previous Return branch submittedvRef.currentbefore the printable prefix had gone through the ordinary input path, so the prompt visible in the UI could be longer than the submitted prompt.This is adjacent to #39246, but covers the "IME commit text + Return in the same burst should submit the visible draft" path rather than absorbing Enter as an IME-confirmation guard. Desktop IME syncing is left to #39435.
Scope
This targets the
ui-tuitext input path used by the Dashboard chat's embedded TUI/xterm session. It does not touch the Electron Desktop composer (apps/desktop/...); the separate Desktop IME sync issue is covered by #39435.Test Plan
git diff --cached --checknpm run test --workspace ui-tui -- src/__tests__/textInputReturnBurst.test.tsnpm run type-check --workspace ui-tuinpm run build --workspace ui-tui