-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[codex] Fix terminal IME composition handling #3331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dandacompany
wants to merge
8
commits into
wavetermdev:main
Choose a base branch
from
dandacompany:codex/fix-terminal-ime-composition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
447cba7
Fix terminal IME composition handling
dandacompany d1119b4
Default terminal rendering to non-WebGL
dandacompany ada924d
Type IME composition keyboard events
dandacompany 90749e9
Preserve IME composition order around spaces
dandacompany 42d0b9a
Handle IME composition suffix punctuation
dandacompany 0276036
Avoid control regex in IME suffix checks
dandacompany 8f2af92
Fix terminal IME composition release
dandacompany 95516dc
Fix macOS wavesrv deployment target
dandacompany File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // Copyright 2026, Command Line Inc. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| const UpgradeOnboardingModal_v0_14_6_Content = () => { | ||
| return ( | ||
| <div className="flex flex-col items-start gap-6 w-full mb-4 unselectable"> | ||
| <div className="text-secondary leading-relaxed"> | ||
| <p className="mb-0"> | ||
| Wave v0.14.6 is a patch release focused on terminal input reliability and packaging safeguards. | ||
| </p> | ||
| </div> | ||
|
|
||
| <div className="flex w-full items-start gap-4"> | ||
| <div className="flex-shrink-0"> | ||
| <i className="text-[24px] text-accent fa-solid fa-keyboard"></i> | ||
| </div> | ||
| <div className="flex flex-col items-start gap-2 flex-1"> | ||
| <div className="text-foreground text-base font-semibold leading-[18px]">IME Input Fixes</div> | ||
| <div className="text-secondary leading-5"> | ||
| Korean IME composition now preserves the correct ordering when pressing Enter before a final | ||
| consonant is committed. This also avoids intermittent duplicated input when switching between | ||
| English and Korean input modes. | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="flex w-full items-start gap-4"> | ||
| <div className="flex-shrink-0"> | ||
| <i className="text-[24px] text-accent fa-sharp fa-solid fa-box"></i> | ||
| </div> | ||
| <div className="flex flex-col items-start gap-2 flex-1"> | ||
| <div className="text-foreground text-base font-semibold leading-[18px]">Packaging Validation</div> | ||
| <div className="text-secondary leading-5"> | ||
| Release packaging now fails early if required Wave backend binaries are missing from the | ||
| packaged app, preventing broken installers from being published. | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| UpgradeOnboardingModal_v0_14_6_Content.displayName = "UpgradeOnboardingModal_v0_14_6_Content"; | ||
|
|
||
| export { UpgradeOnboardingModal_v0_14_6_Content }; |
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| // Copyright 2026, Command Line Inc. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; | ||
|
|
||
| describe("TermWrap IME data ordering", () => { | ||
| let originalDocument: Document; | ||
|
|
||
| beforeEach(() => { | ||
| vi.useFakeTimers(); | ||
| originalDocument = globalThis.document; | ||
| vi.stubGlobal("document", { | ||
| createElement: () => ({ | ||
| getContext: () => null, | ||
| }), | ||
| }); | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| vi.useRealTimers(); | ||
| vi.unstubAllGlobals(); | ||
| if (originalDocument != null) { | ||
| vi.stubGlobal("document", originalDocument); | ||
| } | ||
| vi.resetModules(); | ||
| }); | ||
|
|
||
| async function makeTermWrapHarness() { | ||
| const { TermWrap } = await import("./termwrap"); | ||
| const sent: string[] = []; | ||
| const termWrap = Object.create(TermWrap.prototype) as InstanceType<typeof TermWrap>; | ||
|
|
||
| termWrap.loaded = true; | ||
| termWrap.disposed = false; | ||
| termWrap.compositionActive = false; | ||
| termWrap.compositionRecentlyEndedUntil = 0; | ||
| termWrap.pendingCompositionSuffix = null; | ||
| termWrap.sendDataHandler = (data: string) => sent.push(data); | ||
| termWrap.multiInputCallback = null; | ||
|
|
||
| return { sent, termWrap }; | ||
| } | ||
|
|
||
| it("sends Enter after committed IME text when Enter arrives during composition", async () => { | ||
| const { sent, termWrap } = await makeTermWrapHarness(); | ||
|
|
||
| termWrap.compositionActive = true; | ||
| termWrap.handleTermData("\r"); | ||
| expect(sent).toEqual([]); | ||
|
|
||
| termWrap.compositionActive = false; | ||
| termWrap.compositionRecentlyEndedUntil = Date.now() + 75; | ||
| termWrap.handleTermData("가"); | ||
|
|
||
| expect(sent).toEqual(["가", "\r"]); | ||
| }); | ||
|
|
||
| it("flushes a deferred Enter if composition ends without committed text", async () => { | ||
| const { sent, termWrap } = await makeTermWrapHarness(); | ||
|
|
||
| termWrap.compositionActive = true; | ||
| termWrap.handleTermData("\r"); | ||
| termWrap.compositionActive = false; | ||
| termWrap.schedulePendingCompositionSuffixFlush(); | ||
|
|
||
| vi.advanceTimersByTime(30); | ||
|
|
||
| expect(sent).toEqual(["\r"]); | ||
| }); | ||
|
|
||
| it("does not defer ordinary ASCII data while composition is active", async () => { | ||
| const { sent, termWrap } = await makeTermWrapHarness(); | ||
|
|
||
| termWrap.compositionActive = true; | ||
| termWrap.handleTermData("hello"); | ||
|
|
||
| expect(sent).toEqual(["hello"]); | ||
| }); | ||
|
|
||
| it("does not treat a full ASCII line as a composition suffix", async () => { | ||
| const { sent, termWrap } = await makeTermWrapHarness(); | ||
|
|
||
| termWrap.compositionRecentlyEndedUntil = Date.now() + 75; | ||
| termWrap.handleTermData("previous sentence"); | ||
|
|
||
| expect(sent).toEqual(["previous sentence"]); | ||
| }); | ||
| }); |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 242
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 107
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 50377
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 23101
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1621
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 207
Fix WebGL default inconsistency for
term:disablewebgl(and document it)frontend/app/view/term/term.tsx(299):termDisableWebGl = termSettings?.["term:disablewebgl"] ?? true=> WebGL is disabled when the setting is unset; (323)useWebGl: !termDisableWebGl=> defaults tofalse.pkg/wconfig/defaultconfig/settings.json(35) also sets"term:disablewebgl": true.docs/docs/config.mdx(63) statesterm:disablewebgldefault is false, which conflicts with the code/config defaults above.term:disablewebgl/ WebGL (or “non-WebGL”) was found inRELEASES.md/ docs release files.Update the docs (and/or add release/migration notes if this default changed for existing users).
🤖 Prompt for AI Agents