Skip to content

fix(terminal): hide the SSH chip when it only repeats the project's host - #978

Merged
eneskirca merged 1 commit into
mainfrom
fix/ssh-chip-same-host
Sep 27, 2026
Merged

eneskirca merged 1 commit into
mainfrom
fix/ssh-chip-same-host

Conversation

@eneskirca

Copy link
Copy Markdown
Owner

What

Inside an SSH project every terminal node showed an SSH user@host chip 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:

Node Chip
SSH-project terminal on the project's host hidden (was: shown)
Remote-tmux node saved under another user on the same host hidden — it runs as the project's user (sshConnectionIdForProject), so the chip was wrong, not just redundant
Plain ssh node → project's own user@host hidden
Plain ssh node → a different user on the project's host shown (it really logs in as that user)
Node on another host (host attachment) shown
Any SSH node in a local project shown

The host test is the same one sshConnectionIdForProject uses, 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

  • Desktop / Server Edition: same renderer code path.
  • Kanban: cards and the card modal never rendered this chip — nothing to mirror.
  • Mobile: N/A (no such chip).

Verification

  • npm run typecheck clean.
  • src/shared/ssh.test.ts (6 new cases, red before the helper existed) + src/renderer/nodes: 306 passed.
  • Mac visual check owed: open an SSH project → the chip is gone from its terminal headers; an SSH node in a local project still shows it.

🤖 Generated with Claude Code

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]>
@eneskirca
eneskirca merged commit c1a16c6 into main Sep 27, 2026
5 checks passed
@eneskirca
eneskirca deleted the fix/ssh-chip-same-host branch September 27, 2026 21:52
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