From 2286aa5cc370297c68f10c88e454bf8c75364483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:36:05 +0000 Subject: [PATCH] fix: prioritize checkmarked selections over idle/active focus on enter When items are selected with checkmarks, pressing enter now always launches them instead of being intercepted by idle panel or active session focus logic. Co-Authored-By: Claude Opus 4.6 --- src/index.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 63ef5aa..8b2987c 100755 --- a/src/index.ts +++ b/src/index.ts @@ -640,18 +640,22 @@ async function handleKeypress(key: KeyEvent) { break case "return": { - // Focus idle session from idle panel + const hasSelections = selectedProjects.size > 0 || selectedSessions.size > 0 + // If user has checkmarked items, always launch them + if (hasSelections) { + doLaunch() + break + } + // Focus idle session from idle panel (only when nothing selected) if (bottomPanelMode === "idle" && cachedIdleSessions.length > 0 && idleCursor < cachedIdleSessions.length) { const focused = await focusTerminalByPath(cachedIdleSessions[idleCursor].projectPath) if (focused) return } - // If cursor is on a project row with active session and nothing selected, focus it + // If cursor is on a project row with active session, focus it const returnRow = displayRows[cursor] if ( returnRow.type === "project" && - projects[returnRow.projectIndex].activeSessions > 0 && - selectedProjects.size === 0 && - selectedSessions.size === 0 + projects[returnRow.projectIndex].activeSessions > 0 ) { const focused = await focusTerminalByPath(projects[returnRow.projectIndex].path) if (focused) return