fix: mobile keyboard accessory buttons — split text/Enter, double-tap confirm for clear/compact

- Remove confirm() dialog which dismissed keyboard and broke Enter delivery
- Send command text and Enter as separate requests with 120ms delay so Ink processes them as distinct events
- Add double-tap confirmation for /clear and /compact (amber "Tap again" state, 2s timeout)
- /init sends immediately (non-destructive)
- Refocus terminal after first tap on confirm buttons to keep keyboard open
- Match accessory button font size to toolbar buttons (0.65rem)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-02-16 12:43:18 +01:00
co-authored by Claude Opus 4.6
parent da74ac248b
commit 6b8f863666
5 changed files with 85 additions and 20 deletions
+12 -4
View File
@@ -1807,8 +1807,9 @@ body {
background: var(--bg-card);
border-top: 1px solid var(--border);
flex-shrink: 0;
/* Performance: isolate from terminal — toolbar updates shouldn't trigger terminal reflow */
contain: layout style paint;
/* contain: style only — layout/paint containment clips the case-settings popover
that extends above the toolbar (popover uses position:absolute + bottom:100%) */
contain: style;
}
.toolbar-left,
@@ -8580,10 +8581,17 @@ kbd {
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 6px;
color: #e5e5e5;
font-size: 0.75rem;
font-size: 0.65rem;
font-weight: 500;
cursor: pointer;
transition: background 0.1s;
transition: background 0.15s, border-color 0.15s;
}
/* Confirm state — button turns amber and shows "Tap again" */
.accessory-btn.confirming {
background: #6b4f00;
border-color: #b8860b;
color: #ffd54f;
}
.accessory-btn:active {