feat(tui): add delete session from start screen

- Press 'd' or 'x' to delete/kill selected session
- Auto-adjust selection index when sessions are removed
- Update footer controls with delete shortcut
- Update help overlay with delete shortcut

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-21 06:27:06 +01:00
co-authored by Claude Opus 4.5
parent 71373f80d4
commit 7bd5260b7d
3 changed files with 24 additions and 0 deletions
+6
View File
@@ -204,6 +204,11 @@ export function App(): React.ReactElement {
return <HelpOverlay onClose={() => setShowHelp(false)} />;
}
// Handle delete session from start screen
const handleDeleteSession = useCallback((session: ScreenSession) => {
killSession(session.sessionId);
}, [killSession]);
// Render start screen
if (viewMode === 'start') {
return (
@@ -211,6 +216,7 @@ export function App(): React.ReactElement {
sessions={sessions}
onSelectSession={handleSelectSession}
onAttachSession={handleAttachSession}
onDeleteSession={handleDeleteSession}
onCreateSession={handleCreateSession}
onRefresh={refreshSessions}
onExit={exit}