Skip to content

Close session and return to connections after Ctrl+D#11

Merged
ocnc merged 1 commit intomainfrom
fix/issue-7-close-session-on-ctrl-d
Mar 6, 2026
Merged

Close session and return to connections after Ctrl+D#11
ocnc merged 1 commit intomainfrom
fix/issue-7-close-session-on-ctrl-d

Conversation

@ocnc
Copy link
Copy Markdown
Owner

@ocnc ocnc commented Mar 6, 2026

Summary

  • fix SSH shell-exit handling so child-channel close (Ctrl+D logout) is surfaced explicitly as a transport session end
  • remove the architecture leak by keeping TerminalSession transport-agnostic (no SSHTransportError inspection)
  • wire session-end lifecycle in SessionManager so ended sessions are removed, returning to the connections list when no sessions remain

Architecture

  • added TransportState.sessionEnded to model terminal-end semantics at the transport boundary
  • SSHTransport now emits .sessionEnded when the SSH session channel closes

Validation

  • swift test --package-path Packages/SpecttyTransport
  • xcodebuild -project Spectty.xcodeproj -scheme Spectty -configuration Debug -destination 'generic/platform=iOS Simulator' build

Closes #7

@ocnc ocnc merged commit 979ec16 into main Mar 6, 2026
1 check passed
@ocnc ocnc deleted the fix/issue-7-close-session-on-ctrl-d branch March 6, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Close session after CTRL + D

1 participant