Fix: show the splash image on Ghostty over SSH#9
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes terminal image-capability detection so heimdall-dashboard can render the inline splash logo when run over SSH from Ghostty (where TERM_PROGRAM is not forwarded), instead of falling back to ASCII.
Changes:
- Add a
kittyCapable()helper that treatsTERM=xterm-ghosttyas Kitty-graphics-capable, falling back torasterm.IsKittyCapable()otherwise. - Switch the splash renderer’s Kitty branch to use
kittyCapable()instead of callingrasterm.IsKittyCapable()directly. - Add unit tests covering Ghostty-over-SSH detection and ensuring the existing
TERM_PROGRAM=ghosttypath still works. - Document the fix in the changelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
CHANGELOG.md |
Notes the Ghostty-over-SSH splash image fix and explains the detection change. |
app/internal/tui/splash/splash.go |
Introduces kittyCapable() and uses it to select Kitty image rendering when TERM=xterm-ghostty. |
app/internal/tui/splash/splash_test.go |
Adds tests for the SSH TERM-based Ghostty detection and the existing TERM_PROGRAM path. |
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.
Symptom
heimdall-dashboardshows the ASCII splash instead of the inline logo when run overSSH from Ghostty (e.g. Mac Ghostty → Linux workstation). Locally on macOS Ghostty the
image renders fine — same terminal, different result.
Root cause
Image detection delegates to
rasterm.IsKittyCapable()(v1.1.2), which recognisesGhostty only via
TERM_PROGRAM == "ghostty". SSH and tmux do not forwardTERM_PROGRAM(rasterm's own comment notes this), whileTERM=xterm-ghostty— set byGhostty's terminfo — is forwarded. So over SSH the check fails and we fall back to
ASCII, even though the controlling terminal can render Kitty graphics.
Fix
splash.gonow treatsTERM=xterm-ghosttyas Kitty-graphics-capable in addition torasterm's checks. One helper, used where
IsKittyCapable()was called directly. Theexisting
TERM_PROGRAM=ghostty(local macOS) path is unchanged.Tests
TestKittyCapableDetectsGhosttyByTERM— TERM=xterm-ghostty with noTERM_PROGRAM/KITTY_WINDOW_ID(the SSH case) is capable; case/whitespace tolerant; a plainxterm-256coloris not.TestKittyCapableKeepsTermProgramPath— the local macOS path still works.