Repository navigation
gterm: add per-connection Herdr auto-attach with tests - #42
Merged
Merged
Conversation
Add an "Attach with Herdr" toggle to saved connections. When enabled the PTY channel execs herdr through the remote login shell instead of requesting a plain shell, taps on the surface are delivered as mouse clicks so Herdr's tabs, panes and menus respond, pinch maps to pane zoom, the accessory bar gains Herdr prefix shortcuts, and foreground resume bumps the window size so Herdr repaints. PTYChannelHandler now sequences PTY -> exec requests, reports request rejections and nonzero exits as errors exactly once, and treats a clean detach as a normal close. Tests: HerdrSupportTests (option mapping, persistence codec, gesture and shortcut wiring) run in gtermTests; HerdrAutoAttachTests drive the channel with NIOEmbedded and, in the new macOS gtermSSHTests target, exec the startup command against fixture shell profiles. Claude-Session: https://claude.ai/code/session_01DZZu4krm76hCsDfspY6rBE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
herdrvia the remote login shell (exec "$SHELL" -ilc 'exec herdr') instead of requesting a plain shell, so~/.local/bin/~/.cargo/binare on PATH.PTYChannelHandlersequences PTY → exec requests, reports request rejections / write failures / nonzero exits as errors exactly once, and treats a clean detach as a normal close.SavedConnection.attachHerdrwith legacy payloads defaulting to off.Tests
HerdrSupportTests(option mapping, codec round-trip, gesture/shortcut wiring) in the iOSgtermTestsscheme.HerdrAutoAttachTestsdrive the channel handler withNIOEmbedded; the new macOSgtermSSHTeststarget additionally execs the startup command against fixture shell profiles and a fixtureherdrbinary (PATH from login profile / interactive rc, command-not-found exit, clean detach, I/O passthrough).Verification
xcodebuild -scheme gtermSSHTests -destination 'platform=macOS' test— 10/10 passedxcodebuild -scheme gtermTests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' test— all suites passedxcodebuild -scheme gterm -sdk iphonesimulator CODE_SIGNING_ALLOWED=NO build— succeededhttps://claude.ai/code/session_01DZZu4krm76hCsDfspY6rBE