Repository navigation
fix(terminal): hide the SSH chip when it only repeats the project's host - #978
Merged
Merged
Conversation
Inside an SSH project every terminal carried an `SSH user@host` chip naming the project's own host — the same text on every node, telling the user nothing the tab did not. `sshChipRepeatsProject` hides it exactly for the nodes the project's own master serves (the same host test as `sshConnectionIdForProject`), plus a plain `ssh` node dialing the project's own user@host. The chip stays where it is information: a node on a different host (host attachment), any SSH node in a local project, and a plain `ssh` node logging in as a different user on the project's host. For a remote-tmux node saved under another user the chip was actually wrong — it runs as the project's user — so hiding it there is a correction, not just decluttering. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
Inside an SSH project every terminal node showed an
SSH user@hostchip naming the project's own host — identical on every node, and saying nothing the project tab doesn't already say.sshChipRepeatsProject(src/shared/ssh.ts) hides the chip exactly when it repeats the project:sshConnectionIdForProject), so the chip was wrong, not just redundantsshnode → project's ownuser@hostsshnode → a different user on the project's hostThe host test is the same one
sshConnectionIdForProjectuses, so the chip disappears for precisely the nodes the project's own ControlMaster serves. The project host/user are selected as two primitives so the node doesn't re-render on every canvas edit (the project object is rebuilt on each serialization).Unchanged: the offline plate still says "Not connected to user@host".
Surfaces
Verification
npm run typecheckclean.src/shared/ssh.test.ts(6 new cases, red before the helper existed) +src/renderer/nodes: 306 passed.🤖 Generated with Claude Code