fix(web): address #839 review for the iOS keyboard fix (#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 #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 #830 for the device sequences.
This commit is contained in:
Hadrien Kerlero committed 2026-11-20 20:13:31 +01:00
1 parent c4b382b727
commit db5ab5a701
11 files changed
+128 -53

No files matched your search

+13 -3
View File
@@ -51,7 +51,9 @@ describe('xterm private-API dependency guard', () => {
'CompositionHelper fields installEditSync() uses (terminal-keycode229-recovery.js: ' +
'_handleAnyTextareaChanges, _coreService, _isComposing, _isSendingComposition, _dataAlreadySent) ' +
'and the mouse-encoding read _shouldForwardTouchToApp makes (terminal-ui.js: ' +
'_core.coreMouseService.activeEncoding), then update VERIFIED_XTERM_VERSION here. ' +
'_core.coreMouseService.activeEncoding) and the iOS native-input owner (terminal-ios-native-input.js: ' +
'_core._inputEvent, _core._handleTextAreaBlur, _compositionHelper._finalizeComposition, ' +
'_compositionHelper._compositionView), then update VERIFIED_XTERM_VERSION here. ' +
'The accessor is optional-chained, so a renamed field ' +
'degrades to a silent no-op and the freeze it heals comes back unnoticed.'
).toBe(VERIFIED_XTERM_VERSION);
@@ -67,6 +69,9 @@ describe('xterm private-API dependency guard', () => {
// only to an app that asked for SGR mouse reports; if either name changes the read is undefined
// and touch quietly stops forwarding to native SGR tracking apps. Property names survive
// minification, so a string check on the shipped bundle catches a rename on upgrade.
// terminal-ios-native-input.js wraps `_inputEvent`, `_handleTextAreaBlur` and `_finalizeComposition`
// and reads `_compositionView`; if any is missing its create() returns null, and iOS then gets
// neither the native-input owner nor the keyCode-229 recovery, so #830 returns without a signal.
it('still ships the composition-helper and mouse-service fields terminal input depends on', () => {
const bundle = readFileSync(resolve(root, 'node_modules/@xterm/xterm/lib/xterm.js'), 'utf8');
for (const name of [
@@ -78,12 +83,17 @@ describe('xterm private-API dependency guard', () => {
'_dataAlreadySent',
'coreMouseService',
'activeEncoding',
'_inputEvent',
'_handleTextAreaBlur',
'_finalizeComposition',
'_compositionView',
]) {
expect(
bundle,
`xterm no longer mentions ${name}: re-verify terminal-keycode229-recovery.js installEditSync() ` +
'against the new CompositionHelper, and terminal-ui.js _shouldForwardTouchToApp against the ' +
'new CoreMouseService (both in src/web/public), before bumping VERIFIED_XTERM_VERSION'
'against the new CompositionHelper, terminal-ios-native-input.js create() against the new ' +
'CoreBrowserTerminal and CompositionHelper, and terminal-ui.js _shouldForwardTouchToApp against the ' +
'new CoreMouseService (all in src/web/public), before bumping VERIFIED_XTERM_VERSION'
).toContain(name);
}
});