From 1586d32e45290203a7f6b8ad186c0d3e0b4156f3 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 10 Jun 2026 10:53:42 +0200 Subject: [PATCH] feat(mobile): add Esc button to the simple keyboard accessory bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default (simple) accessory bar above the mobile keyboard had no way to send Escape — the esc action only existed in the opt-in extended layout. Add the Esc button next to the paste button; the send/refocus handlers already covered the action. Verified via Playwright (iPhone 13 emulation): renders next to paste, sends \x1b to /api/sessions/:id/input, bar still fits 390px without scrolling, mode round-trips intact. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/web/public/keyboard-accessory.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/web/public/keyboard-accessory.js b/src/web/public/keyboard-accessory.js index 804c4ef3..d638aef5 100644 --- a/src/web/public/keyboard-accessory.js +++ b/src/web/public/keyboard-accessory.js @@ -4,7 +4,7 @@ * Defines two exports: * * - KeyboardAccessoryBar (singleton object) — Quick action buttons shown above the virtual - * keyboard on mobile: arrow up/down, /init, /clear, paste, and dismiss. + * keyboard on mobile: arrow up/down, /init, /clear, paste, Esc, and dismiss. * The paste button opens a dialog that handles both text paste and image attach * (native picker + best-effort image paste, routed through app._uploadAndInsertImages). * Destructive actions (/clear) require double-tap confirmation (2s amber state). @@ -37,7 +37,7 @@ const KeyboardAccessoryBar = { element: null, _mode: 'simple', // 'simple' or 'extended' - /** HTML for simple mode: arrows, commands, paste, dismiss */ + /** HTML for simple mode: arrows, commands, paste, Esc, dismiss */ _simpleButtons: ` +