Skip to content

gterm: dismiss the terminal when the remote closes the session - #39

Merged
madeye merged 3 commits into
mainfrom
fix/close-on-remote-exit
Aug 15, 2026
Merged

madeye merged 3 commits into
mainfrom
fix/close-on-remote-exit

Conversation

@madeye

@madeye madeye commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • When the remote shell exits cleanly (e.g. typing exit), the terminal screen now dismisses instead of leaving a dead surface up. Failures still keep the screen visible so the error stays readable.
  • Works with background sessions: onClose prunes the dead ActiveSession and returns to the Hosts list.
  • Accessory bar has a fixed hide-keyboard button (always reachable regardless of scroll), and the status bar has a keyboard toggle. Collapsing resigns first responder; tapping the terminal or the status-bar button expands it again.

Testing

  • xcodebuild -scheme gtermTests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' test — TEST SUCCEEDED (45 tests)
  • xcodebuild -scheme gterm -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build — BUILD SUCCEEDED

madeye and others added 3 commits August 16, 2026 06:06
Add a hide-keyboard button fixed at the trailing edge of the accessory
bar (always reachable regardless of scroll position) and a keyboard
toggle in the terminal status bar. Collapsing resigns first responder,
dismissing both the software keyboard and the accessory bar; tapping
the terminal or the status-bar button expands it again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When the shell exits cleanly (e.g. typing exit), the PTY channel goes
inactive and SSHSession reports .closed — auto-dismiss the terminal
screen instead of leaving a dead surface up. Failures still keep the
screen visible so the error message stays readable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rebase onto main left the old TerminalScreen locals (`state`,
`terminalView`) in place; the screen now reads them from the
session-owned surface.
@madeye
madeye merged commit 003a8e6 into main Aug 15, 2026
1 check passed
@madeye
madeye deleted the fix/close-on-remote-exit branch August 15, 2026 22:14
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.

1 participant