Improve mobile terminal input, selection, and resizing (#1607)

* Improve mobile terminal typing and selection

* Address mobile terminal review feedback

* Remove dead native terminal input branch

* Replay bracketed paste in terminal preamble

* Stop per-key terminal resize claims

* Stabilize terminal resize browser test

* Use tracked terminal mode for native paste

* Restore terminal toolbar focus handling

* Adapt native terminal to active visibility state

* Stabilize native mobile terminal interactions

* Add native terminal fallback boundary

* test(app): expect explicit terminal resize reclaim

* fix(app): stabilize terminal buffer coordinates

* fix(app): restrict terminal resize ownership

* fix(terminal): gate restored input modes

* fix(app): recover stalled terminal WebViews

* chore(app): remove obsolete terminal harnesses

* fix(app): make terminal resize claims explicit

* test(app): stabilize native terminal device flows

* test(app): track absolute scrollback coordinates

* fix(app): isolate terminal WebView streams

* fix(terminal): arbitrate size ownership across clients

The daemon now distinguishes explicit ownership claims from passive geometry updates. This keeps the active client authoritative while allowing its split, viewport, and keyboard changes to resize the PTY without idle clients stealing it.

* test(server): make worker resize assertion portable

Query the worker's authoritative terminal snapshot instead of invoking a Unix-only shell command, so the resize regression exercises the same boundary on Windows and Unix.
This commit is contained in:
Mohamed Boudra
2026-08-03 19:01:34 +08:00
committed by GitHub
parent 2948a435ed
commit 04fe30a3e2
119 changed files with 9843 additions and 1032 deletions
+3
View File
@@ -222,6 +222,9 @@ describe("translation resources", () => {
it("includes Settings expansion keys for the Batch 3A migration", () => {
expect(en.settings.diagnostics.title).toBe("Diagnostics");
expect(en.settings.diagnostics.legacyTerminalRenderer.label).toBe(
"Use legacy terminal renderer",
);
expect(en.settings.about.title).toBe("About");
expect(en.settings.about.releaseChannel.label).toBe("Release channel");
expect(en.settings.appearance.theme.title).toBe("Theme");
+6
View File
@@ -481,6 +481,7 @@ export const ar: TranslationResources = {
},
terminal: {
hostDisconnected: "Host غير متصل",
updateHost: "حدّث المضيف لاستخدام عارض الطرفية الأصلي.",
unableToSubscribe: "غير قادر على الاشتراك في المحطة",
},
tabs: {
@@ -1716,6 +1717,11 @@ export const ar: TranslationResources = {
},
diagnostics: {
title: "التشخيص",
legacyTerminalRenderer: {
label: "استخدام عارض الطرفية السابق",
description: "استخدام طرفية WebView السابقة بعد إعادة فتح الطرفية",
accessibilityLabel: "استخدام عارض الطرفية السابق",
},
testAudio: "اختبار الصوت",
playTest: "لعب الاختبار",
playing: "جارٍ اللعب...",
+6
View File
@@ -480,6 +480,7 @@ export const en = {
},
terminal: {
hostDisconnected: "Host is not connected",
updateHost: "Update the host to use the native terminal renderer.",
unableToSubscribe: "Unable to subscribe to terminal",
},
tabs: {
@@ -1726,6 +1727,11 @@ export const en = {
},
diagnostics: {
title: "Diagnostics",
legacyTerminalRenderer: {
label: "Use legacy terminal renderer",
description: "Use the previous WebView terminal after reopening a terminal",
accessibilityLabel: "Use legacy terminal renderer",
},
testAudio: "Test audio",
playTest: "Play test",
playing: "Playing...",
+6
View File
@@ -485,6 +485,7 @@ export const es: TranslationResources = {
},
terminal: {
hostDisconnected: "Hostno está conectado",
updateHost: "Actualiza el host para usar el renderizador de terminal nativo.",
unableToSubscribe: "No se puede suscribir al terminal",
},
tabs: {
@@ -1763,6 +1764,11 @@ export const es: TranslationResources = {
},
diagnostics: {
title: "Diagnóstico",
legacyTerminalRenderer: {
label: "Usar el renderizador de terminal anterior",
description: "Usa el terminal WebView anterior al volver a abrir un terminal",
accessibilityLabel: "Usar el renderizador de terminal anterior",
},
testAudio: "audio de prueba",
playTest: "Prueba de juego",
playing: "Jugando...",
+6
View File
@@ -485,6 +485,7 @@ export const fr: TranslationResources = {
},
terminal: {
hostDisconnected: "Hostn'est pas connecté",
updateHost: "Mettez à jour l’hôte pour utiliser le terminal natif.",
unableToSubscribe: "Impossible de s'abonner au terminal",
},
tabs: {
@@ -1765,6 +1766,11 @@ export const fr: TranslationResources = {
},
diagnostics: {
title: "Diagnostic",
legacyTerminalRenderer: {
label: "Utiliser l’ancien rendu du terminal",
description: "Utilise l’ancien terminal WebView après la réouverture d’un terminal",
accessibilityLabel: "Utiliser l’ancien rendu du terminal",
},
testAudio: "Tester le son",
playTest: "Jouer à l'essai",
playing: "Jouant...",
+6
View File
@@ -485,6 +485,7 @@ export const ja: TranslationResources = {
},
terminal: {
hostDisconnected: "ホストが接続されていません",
updateHost: "ネイティブターミナルを使用するにはホストを更新してください。",
unableToSubscribe: "ターミナルに接続できません",
},
tabs: {
@@ -1731,6 +1732,11 @@ export const ja: TranslationResources = {
},
diagnostics: {
title: "診断",
legacyTerminalRenderer: {
label: "以前のターミナルレンダラーを使用",
description: "ターミナルを開き直した後、以前の WebView ターミナルを使用します",
accessibilityLabel: "以前のターミナルレンダラーを使用",
},
testAudio: "音声をテスト",
playTest: "テスト再生",
playing: "再生中...",
+6
View File
@@ -485,6 +485,7 @@ export const ptBR: TranslationResources = {
},
terminal: {
hostDisconnected: "Host não está conectado",
updateHost: "Atualize o host para usar o renderizador de terminal nativo.",
unableToSubscribe: "Não foi possível assinar o terminal",
},
tabs: {
@@ -1747,6 +1748,11 @@ export const ptBR: TranslationResources = {
},
diagnostics: {
title: "Diagnósticos",
legacyTerminalRenderer: {
label: "Usar renderizador de terminal anterior",
description: "Usa o terminal WebView anterior após reabrir um terminal",
accessibilityLabel: "Usar renderizador de terminal anterior",
},
testAudio: "Testar áudio",
playTest: "Reproduzir teste",
playing: "Reproduzindo...",
+6
View File
@@ -485,6 +485,7 @@ export const ru: TranslationResources = {
},
terminal: {
hostDisconnected: "Host не подключен",
updateHost: "Обновите хост, чтобы использовать нативный терминал.",
unableToSubscribe: "Невозможно подписаться на терминал",
},
tabs: {
@@ -1751,6 +1752,11 @@ export const ru: TranslationResources = {
},
diagnostics: {
title: "Диагностика",
legacyTerminalRenderer: {
label: "Использовать прежний рендерер терминала",
description: "Использовать прежний WebView-терминал после повторного открытия",
accessibilityLabel: "Использовать прежний рендерер терминала",
},
testAudio: "Тестирование звука",
playTest: "Игровой тест",
playing: "Игра...",
+6
View File
@@ -481,6 +481,7 @@ export const zhCN: TranslationResources = {
},
terminal: {
hostDisconnected: "Host 未连接",
updateHost: "请更新主机以使用原生终端渲染器。",
unableToSubscribe: "无法订阅 Terminal",
},
tabs: {
@@ -1695,6 +1696,11 @@ export const zhCN: TranslationResources = {
},
diagnostics: {
title: "诊断",
legacyTerminalRenderer: {
label: "使用旧版终端渲染器",
description: "重新打开终端后使用之前的 WebView 终端",
accessibilityLabel: "使用旧版终端渲染器",
},
testAudio: "测试音频",
playTest: "播放测试",
playing: "正在播放...",