File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -411,11 +411,15 @@ struct CardDetailView: View {
411411 }
412412 . onReceive ( NotificationCenter . default. publisher ( for: . kanbanCloseTerminalTab) ) { _ in
413413 guard selectedTab == . terminal else { return }
414- // Only close extra shell tabs, not the Claude session
415- guard let session = selectedTerminalSession else { return }
416- onKillTerminal ( session)
417- let remaining = shellSessions. filter { $0 != session }
418- selectedTerminalSession = remaining. first
414+ // Close the currently selected tab — shell or browser
415+ if let browserId = selectedBrowserTabId,
416+ let tab = browserTabs. first ( where: { $0. id == browserId } ) {
417+ closeBrowserTab ( tab)
418+ } else if let session = selectedTerminalSession {
419+ onKillTerminal ( session)
420+ let remaining = shellSessions. filter { $0 != session }
421+ selectedTerminalSession = remaining. first
422+ }
419423 }
420424 . onChange ( of: focusTerminal) {
421425 if focusTerminal {
You can’t perform that action at this time.
0 commit comments