Repository navigation
fix(web): synchronize iOS keyboard edits (#830) - #839
HadrienKerlero wants to merge 10 commits into
Conversation
|
Thank you for this, and for the device testing with the reporter. The PR gives each terminal pane on iOS a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit. It also adds a per-session FIFO that keeps delayed Enter and paste writes with the session they were typed for. The gate passes here (757 files, 17,284 tests), as do the new iOS browser suite and the overlay package. A few things need to change before merge:
Push the fixes to this branch and the PR goes back into review. |
Keep the unsent draft out of slash-command keys; settle the iOS owner without flushing local echo. Restore the overlay last-prompt fallback and the Ark0N#520 Shift/Ctrl+Enter gate guard. Pin the xterm privates the iOS owner needs; retarget browser/mobile harnesses to the session FIFO edge. Document the session FIFO invariants and link Ark0N#830 for the device sequences.
|
Thanks for the thorough review. All six points are addressed in 89d6a9e on this branch.
Verification on this branch:
|
|
Thanks for the quick turnaround on the first review. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit, and it moves browser input onto a per-session FIFO. All six points from the first round are resolved. I re-ran everything here. The gate passes (758 files, 17,286 tests) and the static checks are green. The overlay package passes (301 tests), and so do the iOS, Shift+Enter, keyCode-229, split, voice and IME preview browser suites (64 tests). One regression needs a fix before merge:
Two smaller things:
Push the fixes to this branch and the PR goes back into review. |
|
Thanks for catching the scroll regression and for measuring it in the served app. All three points are addressed in cb09e25 on this branch.
Verification on this branch:
|
|
Thanks for the third round, Hadrien, and for turning the scroll fix around so quickly. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit. It also moves every browser input producer onto a per-session FIFO. All three points from the last round are in. Typing scrolls back to the prompt, and the new browser case covers it with echo on and off. The overlay switch now comes from I re-ran everything on cb09e25. The typecheck, lint, format, frontend syntax, dead-code, browser-excludes, public-assets and lockfile checks are green. Two things need to change before merge.
Two small ones while you're in there:
Push the rebase and the fixes to this branch and the PR goes back into review. |
Keep one native-input owner per iOS terminal and reconcile keyboard edits without duplicate producers. Preserve session-bound input ordering, local-echo Unicode deletion, and visual caret geometry. Cover device event sequences and lifecycle handoffs; remove obsolete helpers and source-text-only regression tests. Fixes Ark0N#830
Keep the unsent draft out of slash-command keys; settle the iOS owner without flushing local echo. Restore the overlay last-prompt fallback and the Ark0N#520 Shift/Ctrl+Enter gate guard. Pin the xterm privates the iOS owner needs; retarget browser/mobile harnesses to the session FIFO edge. Document the session FIFO invariants and link Ark0N#830 for the device sequences.
The native owner bypasses xterm triggerDataEvent, so scrollOnUserInput never ran; scroll before sending. Derive the local-echo overlay switch from the echo policy instead of a second mode check. Link docs/ios-native-input.md and describe Pane B input ownership on iOS.
…draft (Ark0N#830) Held-mode Ctrl, Backspace and restored drafts send to the session their text was typed for; a Ctrl-only field releases it. Voice compose Send settles the iOS owner without flushing the unsent local-echo draft. Cover Send on Enter across focus moves, the toolbar Enter in the CJK field and the same-session reload. Describe Pane B iOS input ownership; drop a stub for a removed helper.
cb09e25 to
ddb5a64
Compare
|
Thanks for the careful third round, especially the two silent merges with #820. The branch is now rebased onto current 1. Rebase onto #820
2. Voice compose Send keeps the draft
3. DocsThe split-pane section of 4. Stale stub
Verification on this branch:
|
|
Thanks for the rebase and the fourth round, Hadrien, and for catching the restored-draft target yourself. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit, and it moves every browser input producer onto a per-session FIFO. Everything from the last round is in. The CJK sends carry the captured target, I re-ran everything on ddb5a64. The typecheck, lint, format, frontend syntax, dead-code, browser-excludes, public-assets and lockfile checks are green. Two things need to change before merge.
A few small ones while you're in there:
Push the fixes to this branch and the PR goes back into review. |
…Ark0N#830) submitFromToolbar() puts the CR on the FIFO, bypassing xterm scrollOnUserInput; scroll the focused pane before sending. Remove app.sendInput(), which has no production caller; update @dependency headers and test stubs. Retarget the codex predictive-echo recorders to _enqueueReliableInput. Correct the docs and the _sendInputAsync JSDoc for the session FIFO; drop stale _pendingInput stubs.
|
Thanks for the fourth round, and for measuring the toolbar Enter in the served app. All five points are addressed in 05fc2f9 on this branch.
Verification on this branch:
|
|
Thanks for this round, Hadrien, and for turning the toolbar Enter scroll around so quickly. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit. It also moves every browser input producer onto a per-session FIFO. Everything from the last round is in. Toolbar Enter scrolls back to the prompt, and the new browser case covers it with echo on and off. The codex predictive-echo recorders wrap I re-ran everything on 05fc2f9. The typecheck, lint, format, frontend syntax, dead-code, browser-excludes, public-assets and lockfile checks are green. One thing needs to change before merge:
Two small ones while you're in there:
Push the fixes to this branch and the PR goes back into review. |
…llback (Ark0N#830) Count native edits and overlay deletions in grapheme clusters (Intl.Segmenter, code-point fallback), so one Backspace on a multi-code-point emoji sends one DEL. Toolbar Enter with echo off tells the codex predictor about the CR, clearing its predictions as typed Enter does. Fall back to the keyCode-229 recovery when the iOS owner refuses to start, in the main pane and tiles.
|
Thanks for the fifth round, and for measuring the grapheme deletions per emoji on the wire. All three points are addressed in 71c7d01 on this branch.
Verification on this branch:
|
|
Thanks for the sixth round, Hadrien, and for turning the grapheme fix around so quickly. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit, and it moves every browser input producer onto a per-session FIFO. All three points from the last round are in: one Backspace on a multi-code-point emoji is one DEL on iOS, toolbar Enter clears the codex predictions again, and when I re-ran everything on 71c7d01. The typecheck, lint, format, frontend syntax, dead-code, browser-excludes, public-assets and lockfile checks are green. One thing needs to change before merge:
One small one while you're in there:
Push the fixes to this branch and the PR goes back into review. |
…overlay change (Ark0N#830) The keyCode-229 recovery diff counts grapheme clusters, matching the overlay and the iOS owner, so one Backspace on a multi-code-point emoji is one DEL. List xterm-zerolag-input in the changeset; document getInputEndAnchor(), onLayout() and the grapheme unit of removeChar().
|
Thanks for the sixth round, and for catching the Android path with the per-emoji measurements. Both points are addressed in COMMIT on this branch.
Verification on this branch: |
|
Thanks for the seventh round, Hadrien, and for turning the Android grapheme fix around so quickly. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit. It also moves every browser input producer onto a per-session FIFO. Both points from the last round are in. The keyCode-229 recovery counts grapheme clusters, and its heart, skin tone, flag and family cases go through the real overlay. The changeset and the package README now cover I re-ran everything on e4ac772. Typecheck, lint, format, frontend syntax, dead code, browser excludes, public assets and lockfile are green. The grapheme switch left one small problem, and there is one nit:
Neither item needs another round from you: both can be applied on top at merge time. If you would rather make the changes yourself, push them to this branch. |
Both editBetween() functions return a pure append as-is before the grapheme split, so a mark typed onto the last letter is not a DEL plus the retyped cluster (zsh would double the base letter). Drop a redundant setFlushed() in the Tab-completion fallback; detectBufferText() already stores it.
|
Thanks for the seventh round, and for checking the Thai and Hindi sequences against
Verification on this branch: |
|
Thanks for the eighth round, Hadrien, and for applying the combining-mark append and the Tab-completion nit yourself. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit. It also moves every browser input producer onto a per-session FIFO. Both items from the last round are in. A mark typed onto a letter is a plain append again in both I re-ran everything on 414dd51. Typecheck, lint, format, frontend syntax, dead code, browser excludes, public assets and lockfile are green. There is one small regression, plus a few nits:
None of these needs another round from you. They can all be applied on top at merge time. If you would rather make the changes yourself, push them to this branch. |
) Toolbar Enter spends one-shot Ctrl; Backspace finds the last grapheme with Segments.containing(); accessory Shift+Tab keeps the draft like a typed one. Pass the captured session to Compose uploads, voice compose and held CJK drafts; clear Ctrl on deletion-only native edits; path picker clears predictions. Clear xterm dead-key state on native commits; restore a borrowed clipboard field before classifying a key; overlay removeChar spans the pending/flushed boundary. Place the trackpad caret from the overlay layout (getInputAnchor, committedText) or validated xterm cells, hiding when unproven; no end-minus-width arithmetic. Grapheme-aware replay Backspace; docs, README rows, changeset and comment updates.
|
Thanks for the eighth round. I applied all six items myself, and then ran a full review of the whole PR against current Round-eight items
Found by a full review of the PR
Every behavioral fix above has a test that fails with the fix reverted. The caret design went through a design review first; it is the narrower version (instrument the existing layout, no new layout engine). Verification on this branch:
|
|
Thanks for the ninth round, Hadrien, and for reviewing the whole PR yourself before pushing. This PR gives each iOS terminal pane a native-input owner, so suggestions, phrase replacement, dictation and held delete reach the PTY as one ordered edit. It also moves every browser input producer onto a per-session FIFO. All six round-eight items are in. Toolbar Enter spends an armed one-shot Ctrl, I re-ran everything on cda5d96. Typecheck, lint, format, frontend syntax, dead code, browser excludes, public assets and lockfile are green. One nit, small enough to fix at merge time: This is ready to merge. Thanks for staying with it through nine rounds, and for the careful device testing with the reporter. |
caret() also returns generation; the parsed-buffer marker waits for a parsed write only when it changes. Say the wait is a heuristic, not a delivery acknowledgement.
|
Thanks for the ninth round, and for staying with this through nine reviews. I fixed the doc nit on the branch so it doesn't have to wait for merge time:
Docs only ( |
|
Thanks for this fix, Hadrien, and for sticking with it through nine rounds of review. The PR gives every iOS terminal pane a native-input owner, so keyboard suggestions, phrase replacement, held delete and dictation reach the PTY as one ordered edit. It also moves every browser input producer onto a per-session FIFO, so delayed Enters and pastes stay with the session they were typed for. The last commit updates Nothing needs to change at merge time, and it can go in as it stands. Thanks also to the reporter for the device testing. |
Fixes #830
Keep xterm's helper textarea in sync with native iOS editing instead of supplementing xterm's first-character keypress output.
Changes
white-space: pre. Keep dictated line breaks editable in the native field but project them to spaces, as requested by the reporter; only explicit Enter submits.Clean-code review
.github/CONTRIBUTING.md: focused issue change, tests and patch changeset, no version bump orCHANGELOG.mdedit.Device acceptance
The reporter tested the standalone probe and then the integrated isolated beta on their iPhone and confirmed the remaining keyboard features work. Copy/paste feature work was explicitly excluded; existing Codeman clipboard features are preserved.
The browser replays preserve the logged iOS event order, multi-character
keyvalues, first-lettercharCode, andcomposed: true. They are regression coverage, not a claim that Chromium emulates the iOS keyboard.Delivery boundary
The FIFO guarantees session destination and enqueue ordering through Codeman's existing reliable transport. It does not introduce new ACK/completion guarantees or redesign reconnect, wake-buffering, or named-key transport behavior.
Verification on current upstream
masternpm test: 757 test files passed, 17,284 tests passed; 1 file / 13 tests skipped by the repository's existing conditions.npm run build,typecheck,lint,format:check,check:frontend-syntax,check:frontend-dead,check:browser-excludes,check:public-assets, andcheck:lockfile: passed.master(e99b42c3), not the reporter's modified installation.