Repository navigation
fix(terminal): send the whole string an iPhone dictation keyboard commits, not its first letter (#1488) - #2386
Conversation
…key (#1488) A dictation keyboard (FluidVoice) or any keyboard extension calling insertText commits a whole string as one key in WebKit: keydown with the string as its key, a keypress with its first character's charCode, then insertText of the string. xterm sent the keypress's character and dropped the insertion, so only the first letter reached the pane. The xterm patch holds such a keypress and sends the insertion's string once; with no matching insertion the character goes as before.
…nd test the fallback (#1488) WebKit's charCode is the first code point, so a string starting with an emoji or a CJK extension character was missed. Also flush a held key on the next keypress, hold nothing while a composition is pending, and cover the fallback (no insertion, a different insertion) in the replay.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
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 |
|
CodeRabbit did not review this head (review limit reached). The reviews that stand in for it, with how each finding was resolved: omo-native-code-reviewer: APPROVE on 7ae9a50 (3 rounds)
Codex Sol 6.1 Fast xhigh: APPROVE on 7ae9a50 (3 rounds, 44/44 isolated handler tests)
df6365d only adds a replay case (a whole-string key after a pending Hangul syllable, |
|
Merging df6365d (closes #1488, thanks @blaker3115-Agri for the report). On an iPhone/iPad keyboard, dictation (and other whole-string commits) fires a keypress whose key is the whole string; xterm sent only its first character ('h' for "hello world"). The xterm 6 patch now holds such a keypress and sends the insertText string once (falling back to the keypress's own text if no insertText follows, and flushing on blur), and the matching beforeinput is not treated as a preedit. Evidence from the lane: the replay case fails on main and passes on four platforms (emoji/CJK first, fallback, Hangul); iOS 27 Simulator dictation sends 'hello world this is a test' in Safari and in the iOS app; Korean 안녕 input is unchanged. Patch-only change in patches/@XTerm%[email protected] with docs/terminal-input.md and the iPad IME browser script; read by the merge pass. |
## Release 0.4.21 The release PR, prepared by step 1 of [docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing), now re-folded on main `1ef6ea329108a0985b823e8235b03daddcd0a5f4` after the owner held 0.4.21 for more work. The merge pass reported the 0.4.21 queue empty. **Do not merge yet:** the owner judges the final build before release. No tag and no Release run from this PR's author. - **Version:** `version` is 0.4.21 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.21 2026-10-30` folded 63 fragments into the 2026-10-30 section of `CHANGELOG.md` (71 entries), linked their PRs and deleted the fragments; `changelog.d` holds only `README.md`. - `by @login` on every outside contributor's PR link: #2361 @eddieparc, #2333 @IdrisGit, #2355 @imurfutur3, #2341 @sulthonzh, #2359 @YuuuXie, #2377 @IdrisGit, #2269 @CharleoYang, #2405 @jpcarranza94, #2414 @homebodify, #2417 @cheol-95, #2418 @eddieparc, #2435 @cheol-95. - Two outside PRs had no fragment and got an entry by hand: #2341 (OpenCode background commands, Added) and #2359 (installer test timing, Maintenance). - Issue reporters are credited in their entries: @blaker3115-Agri (#1488), @Hyd3-14 (#2026), @osamahbeig (#2343), @Shunamxiao (#2329), @matiemer (#2362), @kilhyeonjun (#2344), @eddieparc (#2360), @Ploppy3 (#2236), @sulthonzh (#2340), @WOULDU-pres (#2056), @odfalik (#2038), @aNNdii (#511), @Noobear (#2281, fixed by #2424); #2435 fixes @cheol-95's own #2434. - Two fragments ran past the changelog's width (#2418, #2269); their entries are re-wrapped, words unchanged. #2382's entry reads "OpenCode's installer puts its folder first" (reviewed earlier on this PR). - Maintainer PRs without a fragment and without a user-facing change have no entry: #2353 (check tool), #2371 (guide docs), #2396 and #2397 (tests), #2403 and #2433 (server and client transport seams, no behaviour change), #2437 (test-only fix for #2435's check). #2438's own entry (the sidebar selection marked by its fill again) is dropped: the stroke #2352 added never shipped, so users see no change; #2352's entry keeps only the Windows high-contrast Highlight bar. - **Release summaries:** en, ko, ja and zh each have 5 new, 5 improved and 5 fixed lines. Since the first review: New lists the in-browser Claude Code / Codex sign-in (#2428) in place of the tab/workspace shortcut line; Improved lists Settings → Agents (#2427) in place of the sidebar fold line; Fixed lists the Codex wrong-session fix (#2426, #2430) in place of the phone screenshot paste line. The Artifacts and Claude status-line lines keep their reviewed wording (turned on in Settings). Not in 0.4.21: #2420 (Codex chat behind Kiro), #2065 (Portal sign-in) and #2436 (relay foundations) stay open for a later release. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 39 to 40 because the bundle inputs (`server/`, `shared/`, `patches/`) changed since remote-v39. After merge: push `remote-v40` on the merged commit and wait for the Remote PC bundles workflow before running Release. - **iOS:** `CURRENT_PROJECT_VERSION` stays 3 (#2370 changed `Info.plist`; build 3 is not known to be uploaded yet). ## Validation - `bun scripts/release-guards.ts --base v0.4.20`: "Release 0.4.21: remote bundle, telemetry Worker and release metadata are in order." - `dori heavy … bun run check fast` on this branch: workflow syntax, generated types and themes, typecheck, build, unit tests all ok. Unit: 9166 pass, 0 fail, 36 skip in 591 files. - Every PR in `v0.4.20..main` was pre-run for the owner's hands-on guide on isolated copies (own herdr session, fresh state, never the owner's live session). Items that need a real device (iPhone tap dictation #2370, dictation keyboards #2386, the installed desktop app's title-bar overlay #2381) are left for the owner's final check. This is a release-metadata PR: it changes no code path. Per the release steps, merge it after CI and the owner's go, then push `remote-v40`, wait for its bundles, and run Release with `0.4.21`.
Closes #1488
Thanks to @blaker3115-Agri for the report. Your reading of the cause (a keypress sending the first letter, then
_inputEventdropping the whole insert) was right.Problem
With a dictation keyboard such as FluidVoice, a sentence dictated straight into the terminal grid on an iPhone reached the pane as its first letter only. The chat composer and the input line got the whole sentence.
Cause
Such a keyboard commits the transcript with one
insertTextcall. WebKit reports that as one key (recorded in the iOS 27.0 Simulator with a minimal keyboard extension, see the issue):xterm's
_keyPresssentString.fromCharCode(charCode)(h), and_inputEventthen ignored the insertion as a key already handled.Fix
In the xterm patch (
CoreBrowserTerminal):keyis longer than one character and starts with the character itscharCodenames is held. A key name never matches: Enter'scharCodeis 13, notE.insertTextcarrying that same string sends it whole, once. Itsbeforeinputskips the Hangul replacement path, so a whole Hangul string is text and is not composed as a syllable.reset()drops it.Nothing else changes: normal typing has a one-character
key, Android sends keyCode 229 without a keypress, and the Linux digit-candidate path keeps a one-characterkey.Evidence
scripts/terminal-ipad-ime-regression.tsfailed on main's patch with'h\x07' !== 'hello world this is a test\x07'.hello world this is a test,Yesand안녕하세요whole and once. Typing after it still works:hello world, thenx, then 하 composed in the editor, then Space giveshello worldx하. Every earlier case in that script passes (Hangul composition, dictation replacement, SwiftKey, key bar, blur, pane switch).😀 hello,𠮷野家): WebKit'scharCodeis the first code point;hstill goes, at keyup;하hello.h;terminal-safari-ime-regression.ts,terminal-composition-regression.tsandterminal-linux-ime-regression.tspass.insertText("hello world this is a test").b'hello world this is a test'(main:b'h').Safari), DICTATE:b'hello world this is a test'.안녕(ec 95 88 eb 85 95 20), no lone jamo.a:a, once.bun run check fast: green on df6365d (workflow syntax, generated files, typecheck, build, unit tests 8666 pass, 0 fail).Reviews
Both reviewers ran on the brief "assume it breaks; reproduce failures", read-only, unit-level only.
hright after keyup, and the "another insertion" case.bun patch --commitrecorded it. 7ae9a50 restores the flush. The mutation check was re-run properly, from a patch file.String.fromCodePoint).😀 hello,charCode128512) was not held, becauseString.fromCharCodetruncates it.Limits
Known limits (LOW, unchanged by this PR):
insertTextcall.