Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(ssh): TerminalNode launches ssh + header badge

enesc9e26378cc49
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index 73f33bf4a..0b577854b 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -28,6 +28,7 @@ import { useAgentStatus } from '../state/agentStatus'
import { useAgentNodes } from '../state/agentNodes'
import { COLLAPSED_HEIGHT, NODE_COLORS, type CanvasNode } from '../state/workspace'
import { hasHooks, canRecur, canContextLink, hasUsage, canChat, agentConfig, type AgentId } from '@shared/agents/config'
+import { buildSshArgs, type SshConnection } from '@shared/ssh'
/** Backslash-escape shell-special characters, like a native terminal does on file drop. */
function escapeDroppedPath(p: string): string {
@@ -211,11 +212,13 @@ export function TerminalNode({ id, data, selected }: NodeProps<CanvasNode>) {
)
}
+ const ssh = data.ssh as SshConnection | undefined
transport
.create({
cols: term.cols,
rows: term.rows,
- shell: data.shell,
+ shell: ssh ? 'ssh' : data.shell,
+ shellArgs: ssh ? buildSshArgs(ssh) : undefined,
cwd: data.cwd,
persistKey: id,
agentId: data.agentId
@@ -522,6 +525,14 @@ export function TerminalNode({ id, data, selected }: NodeProps<CanvasNode>) {
{status.session}
</span>
)}
+ {data.ssh ? (
+ <span
+ className="term-ssh-chip"
+ title={`ssh ${(data.ssh as SshConnection).user}@${(data.ssh as SshConnection).host}`}
+ >
+ SSH {(data.ssh as SshConnection).user}@{(data.ssh as SshConnection).host}
+ </span>
+ ) : null}
{showUsage && <ContextMeter sessionId={status?.sessionId ?? null} />}
{status?.state === 'working' && (
<span className="term-node__status term-node__status--busy" title={`${agentLabel} is working`}>
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index 468a6d343..40957e1c4 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -548,6 +548,21 @@ body,
border-radius: 6px;
}
+/* SSH-bound terminal: user@host chip beside the title. Mirrors the session chip. */
+.term-ssh-chip {
+ margin-left: 8px;
+ max-width: 180px;
+ padding: 1px 8px;
+ flex-shrink: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: 11px;
+ color: var(--muted);
+ background: rgba(255, 255, 255, 0.06);
+ border-radius: 6px;
+}
+
/* Claude Code status: RUNNING badge while working, unread dot when finished. */
.term-node__status {
display: inline-flex;