From ef1b18a345e2f17a09b6c73c9726a5ba16272e21 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Sun, 12 Apr 2026 17:20:58 +0200 Subject: [PATCH] fix: /exit closes only the current tab when multiple tabs are open When multiple tabs are open, /exit now closes only the active tab instead of quitting the entire application. Single-tab behavior is unchanged. Fixes #2373 Assisted-By: docker-agent --- pkg/tui/tui.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/tui/tui.go b/pkg/tui/tui.go index 3c95ed23a..18a132e66 100644 --- a/pkg/tui/tui.go +++ b/pkg/tui/tui.go @@ -812,6 +812,11 @@ func (m *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // --- Exit --- case messages.ExitSessionMsg: + // If multiple tabs are open, close only the current tab instead of + // quitting the entire application (see #2373). + if m.supervisor != nil && m.supervisor.Count() > 1 { + return m.handleCloseTab(m.supervisor.ActiveID()) + } m.cleanupAll() return m, tea.Quit