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): gate SSH remote project connections behind Pro

enes2b6c72a625af
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index 57db9a396..a4e1d0516 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -557,17 +557,20 @@ export function Canvas() {
// terminal nodes can run over it. Idempotent in main (a live master is reused), so a tab
// switch back to a connected project is a no-op. Remote tmux is unaffected by the master.
if (project.ssh) {
- window.nodeTerminal.sshProject
- .connect(project.id, project.ssh.server, project.ssh.remoteCwd)
- .then(async ({ controlPath, hookEndpointPath, tmuxConfPath }) => {
- // Arm remote git routing for the active project BEFORE the sshConn entry appears, so the
- // Source Control panel's re-fetch (which keys off that entry) already hits the master.
- await window.nodeTerminal.git.setActiveRemote(project.id)
- useSshConn.getState().setConn(project.id, { controlPath, hookEndpointPath, tmuxConfPath })
- })
- .catch(() => {
- /* status surfaced via onStatus → the connection banner */
- })
+ const ssh = project.ssh
+ requireProOr('SSH Remote Projects', () => {
+ window.nodeTerminal.sshProject
+ .connect(project.id, ssh.server, ssh.remoteCwd)
+ .then(async ({ controlPath, hookEndpointPath, tmuxConfPath }) => {
+ // Arm remote git routing for the active project BEFORE the sshConn entry appears, so the
+ // Source Control panel's re-fetch (which keys off that entry) already hits the master.
+ await window.nodeTerminal.git.setActiveRemote(project.id)
+ useSshConn.getState().setConn(project.id, { controlPath, hookEndpointPath, tmuxConfPath })
+ })
+ .catch(() => {
+ /* status surfaced via onStatus → the connection banner */
+ })
+ })
} else {
// Local active project: ensure all git ops run local (no stale remote from a prior SSH tab).
void window.nodeTerminal.git.setActiveRemote(null)
diff --git a/src/renderer/components/SshProjectDialog.tsx b/src/renderer/components/SshProjectDialog.tsx
index 0807f0b41..1cf9c5f6c 100644
--- a/src/renderer/components/SshProjectDialog.tsx
+++ b/src/renderer/components/SshProjectDialog.tsx
@@ -1,6 +1,8 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
import { useSshServers } from '../state/sshServers'
+import { useEntitlement } from '../state/entitlement'
+import { useUpgradeGate } from '../state/upgradeGate'
import type { SshServer } from '@shared/ssh'
interface SshProjectDialogProps {
@@ -116,6 +118,10 @@ export function SshProjectDialog({ onCreate, onManage, onClose }: SshProjectDial
const connect = useCallback(
async (srv: SshServer) => {
+ if (!useEntitlement.getState().isPremium) {
+ useUpgradeGate.getState().show('SSH Remote Projects')
+ return
+ }
setServer(srv)
setError('')
setStep('connecting')