Fix remote SSH terminal compatibility - #756
Merged
sbertix merged 2 commits intoAug 2, 2026
Merged
Conversation
bmargula
marked this pull request as ready for review
August 1, 2026 20:13
… tests Scope the terminfo probe's PATH augmentation to a subshell so a profile-only infocmp still resolves xterm-ghostty without leaking PATH into the session. Trim the new docstrings to the load-bearing rationale. Add an independent assertion that the wrapper embeds the fallback prelude, cover TERM unset/empty and a single-quote payload round-trip, and switch output decoding to the repo's failable String(bytes:encoding:) form.
sbertix
enabled auto-merge (squash)
August 2, 2026 21:47
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.
Closes #754
Summary
Add a remote-side compatibility prelude for Supacode-managed interactive SSH
surfaces. When the local terminal advertises
xterm-ghostty, the prelude checkswhether the remote host has that terminfo entry and falls back to
xterm-256coloronly when it is unavailable.Supacode launches SSH directly instead of passing through Ghostty's normal SSH
wrapper, so fresh remote accounts currently miss that compatibility behavior.
Terminal-aware commands such as
clear,less, andtputcan consequentlyfail with
unknown terminal type: xterm-ghostty.The check runs under POSIX
/bin/shbefore the configured remote login shellloads its profile. Hosts with
xterm-ghosttysupport retain its richercapabilities, other TERM values remain unchanged, and non-interactive
SSHCommand.invocationcalls are unaffected. Both interactive command shapesshare one compatibility seam.
Type of change
ready)How was this tested?
make checkpasses (format + lint)make testpassesCompleted locally:
swift-format lint --strictpasses for both changed files.swiftc -frontend -parseaccepts both changed files.git diff --checkpasses.xterm-ghostty, missing/unknownxterm-ghostty(including an unavailableinfocmp), and an unrelated TERM.xterm-ghosttywhen the remote entry exists andresolves to
xterm-256colorwhen a missing entry is simulated;tput clearexits successfully in both cases.
The repository commands were attempted but cannot complete on this machine:
make checkcompletes formatting, then SwiftLint cannot load SourceKitbecause no full Xcode toolchain is installed.
make teststops in the repository preflight because Xcode 26.3 is absent.make doctorotherwise passes and reports Xcode 26.3 as its only remainingprerequisite.
The three test/build checkboxes above should remain unchecked until those
commands pass with Xcode 26.3 and the app has been exercised from a built copy.
AI tool disclosure (optional)
Checklist
Closes #above.ready.