From 49fcad8cf8caaa7ceacb92381f701fbc810fb35c Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 29 Apr 2026 19:17:58 -0500 Subject: [PATCH] fix(tui): require double-tap `d` to confirm session delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Single-key confirm matches how the picker already accepts 1-9 to resume — no separate y/n keymap to learn — and "press d again" is self-documenting next to the cursor. --- ui-tui/src/components/sessionPicker.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-tui/src/components/sessionPicker.tsx b/ui-tui/src/components/sessionPicker.tsx index 8399d39cd5..e836e59852 100644 --- a/ui-tui/src/components/sessionPicker.tsx +++ b/ui-tui/src/components/sessionPicker.tsx @@ -32,7 +32,7 @@ export function SessionPicker({ gw, onCancel, onSelect, t }: SessionPickerProps) const [sel, setSel] = useState(0) const [loading, setLoading] = useState(true) // When non-null, the user pressed `d` on this index and we're waiting for - // `y`/`Y` to confirm deletion. Any other key cancels the prompt. + // a second `d`/`D` to confirm deletion. Any other key cancels the prompt. const [confirmDelete, setConfirmDelete] = useState(null) const [deleting, setDeleting] = useState(false) @@ -103,7 +103,7 @@ export function SessionPicker({ gw, onCancel, onSelect, t }: SessionPickerProps) } if (confirmDelete !== null) { - if (ch === 'y' || ch === 'Y') { + if (ch?.toLowerCase() === 'd') { const idx = confirmDelete setConfirmDelete(null) performDelete(idx) @@ -128,7 +128,7 @@ export function SessionPicker({ gw, onCancel, onSelect, t }: SessionPickerProps) return } - if ((ch === 'd' || ch === 'D') && items[sel]) { + if (ch?.toLowerCase() === 'd' && items[sel]) { setConfirmDelete(sel) return @@ -202,7 +202,7 @@ export function SessionPicker({ gw, onCancel, onSelect, t }: SessionPickerProps) inverse={selected} wrap="truncate-end" > - {pendingDelete ? 'delete? y/n' : s.title || s.preview || '(untitled)'} + {pendingDelete ? 'press d again to delete' : s.title || s.preview || '(untitled)'} )