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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(b5): Remote access from the project caret menu + upgrade popup for non-Pro
enesedb6765d2bc9
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex f191abdd6..a1aebf1b5 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -56,6 +56,7 @@ import { NotifyConsentDialog } from '../components/NotifyConsentDialog'import { ExplorerPanel } from '../components/ExplorerPanel'import { UsageIndicator } from '../components/UsageIndicator'import { RemoteSessionView } from './RemoteSessionView'+import { RemoteAccessDialog } from '../components/RemoteAccessDialog'import { transport } from '../terminal/local-transport'import { useProjects } from '../state/projects'import { useAgentStatus } from '../state/agentStatus'@@ -122,6 +123,7 @@ export function Canvas() {const [explorerOpen, setExplorerOpen] = useState(false)// When set, a full-surface remote mirror of a connected host is shown over the local canvas.const [remoteConnId, setRemoteConnId] = useState<string | null>(null)+ const [remoteDialogOpen, setRemoteDialogOpen] = useState(false)const [confirm, setConfirm] = useState<{message: stringonConfirm: () => void@@ -1674,6 +1676,7 @@ export function Canvas() {onRename={renameProject}onSetFolder={setProjectFolder}onDelete={deleteProject}+ onRemoteAccess={() => setRemoteDialogOpen(true)}/><div className="top-banners">@@ -1783,6 +1786,8 @@ export function Canvas() {)}</div>+ {remoteDialogOpen && <RemoteAccessDialog onClose={() => setRemoteDialogOpen(false)} />}+{menu && (<ContextMenu x={menu.x} y={menu.y} items={menu.items} onClose={() => setMenu(null)} />)}diff --git a/src/renderer/components/RemoteAccessDialog.tsx b/src/renderer/components/RemoteAccessDialog.tsxnew file mode 100644index 000000000..e9c3ef883--- /dev/null+++ b/src/renderer/components/RemoteAccessDialog.tsx@@ -0,0 +1,135 @@+import { useEffect, useState } from 'react'+import { createPortal } from 'react-dom'+import { useEntitlement } from '../state/entitlement'+import { Button } from '@renderer/ui/Button'+import { Input } from '@renderer/ui/Input'++/**+ * Remote access dialog — a self-contained popup reachable from the project (tab) caret menu, so+ * remote access isn't buried in Settings. Mirrors the Settings RemoteSection flow:+ * - Host "Allow remote access" (Pro): start → show the single-use pairing offer + copy/stop.+ * - Non-Pro: hosting is gated — show the upgrade popup (Upgrade → Stripe checkout).+ * - Client "Connect to a host" (free): paste an offer → open the live mirror.+ * It deliberately does NOT import RemoteSection (which the Settings redesign owns); the small+ * remote IPC flow is duplicated here. A future refactor can hoist it into a shared hook.+ */+export function RemoteAccessDialog({ onClose }: { onClose: () => void }): React.JSX.Element {+ const isPremium = useEntitlement((s) => s.isPremium)+ const upgrade = useEntitlement((s) => s.upgrade)+ const [hostOffer, setHostOffer] = useState('')+ const [hostBusy, setHostBusy] = useState(false)+ const [error, setError] = useState('')+ const [clientCode, setClientCode] = useState('')+ const [connecting, setConnecting] = useState(false)++ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.key === 'Escape') {+ e.preventDefault()+ onClose()+ }+ }+ window.addEventListener('keydown', onKey)+ return () => window.removeEventListener('keydown', onKey)+ }, [onClose])++ const startHosting = async () => {+ setError('')+ setHostBusy(true)+ try {+ const { offer } = await window.nodeTerminal.remoteHost.start()+ setHostOffer(offer)+ } catch (err) {+ setError((err as Error).message)+ setHostBusy(false)+ }+ }+ const stopHosting = async () => {+ await window.nodeTerminal.remoteHost.stop()+ setHostOffer('')+ setHostBusy(false)+ }+ const connect = async () => {+ const code = clientCode.trim()+ if (!code) return+ setError('')+ setConnecting(true)+ try {+ const connectionId = await window.nodeTerminal.remoteClient.connect(code)+ window.dispatchEvent(+ new CustomEvent('nodeterm:open-remote-terminal', { detail: { connectionId } })+ )+ onClose()+ } catch (err) {+ setError((err as Error).message)+ } finally {+ setConnecting(false)+ }+ }++ return createPortal(+ <div className="confirm-overlay" onClick={onClose}>+ <div className="remote-dialog" onClick={(e) => e.stopPropagation()}>+ <div className="remote-dialog__head">+ <h3>Remote access</h3>+ <button className="remote-dialog__x" onClick={onClose} title="Close">+ ×+ </button>+ </div>+ <p className="remote-dialog__desc">+ Open terminals that run on another machine you own — end-to-end encrypted over the relay.+ Hosting (sharing this machine) is Pro; connecting to a host is free.+ </p>++ <h4 className="remote-dialog__head4">Allow remote access</h4>+ {isPremium ? (+ hostOffer ? (+ <div className="remote-dialog__block">+ <p className="remote-dialog__hint">Share this pairing code (single use):</p>+ <Input+ className="w-full"+ readOnly+ value={hostOffer}+ onFocus={(e) => e.target.select()}+ />+ <div className="remote-dialog__row">+ <Button onClick={() => window.nodeTerminal.clipboard.writeText(hostOffer)}>+ Copy code+ </Button>+ <Button onClick={() => void stopHosting()}>Stop sharing</Button>+ </div>+ </div>+ ) : (+ <Button disabled={hostBusy} onClick={() => void startHosting()}>+ {hostBusy ? 'Starting…' : 'Allow remote access'}+ </Button>+ )+ ) : (+ <div className="remote-dialog__block">+ <p className="remote-dialog__hint">+ Sharing this machine requires nodeterm Pro. Connecting to a host you were given a code+ for is free.+ </p>+ <Button onClick={() => void upgrade()}>Upgrade to Pro — $29/mo</Button>+ </div>+ )}++ <h4 className="remote-dialog__head4">Connect to a host</h4>+ <div className="remote-dialog__block">+ <Input+ className="w-full"+ placeholder="paste the host's code"+ value={clientCode}+ onChange={(e) => setClientCode(e.target.value)}+ />+ <Button disabled={connecting || !clientCode.trim()} onClick={() => void connect()}>+ {connecting ? 'Connecting…' : 'Connect'}+ </Button>+ </div>++ {error ? <p className="remote-dialog__err">{error}</p> : null}+ </div>+ </div>,+ document.body+ )+}diff --git a/src/renderer/components/TabBar.tsx b/src/renderer/components/TabBar.tsxindex d7b59eb10..704c8ec77 100644--- a/src/renderer/components/TabBar.tsx+++ b/src/renderer/components/TabBar.tsx@@ -10,6 +10,8 @@ interface TabBarProps {onRename: (id: string, name: string) => voidonSetFolder: (id: string) => voidonDelete: (id: string) => void+ /** Open the Remote access dialog (host/share + connect). Shown for every project. */+ onRemoteAccess: () => void}/**@@ -24,7 +26,8 @@ export function TabBar({onAddFromFolder,onRename,onSetFolder,- onDelete+ onDelete,+ onRemoteAccess}: TabBarProps) {const projects = useProjects((s) => s.projects)const activeId = useProjects((s) => s.activeProjectId)@@ -217,6 +220,14 @@ export function TabBar({>Set folder…</button>+ <button+ onClick={() => {+ onRemoteAccess()+ closeMenu()+ }}+ >+ Remote access…+ </button><buttonclassName="danger"onClick={() => {diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 468a6d343..bcccd0530 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -1240,6 +1240,68 @@ body,position: relative;}+/* ---- Remote access dialog (from the project caret menu) ---- */+.remote-dialog {+ width: 440px;+ max-width: calc(100vw - 32px);+ background: var(--bg, #16181c);+ border: 1px solid var(--separator, rgba(255, 255, 255, 0.12));+ border-radius: 12px;+ padding: 18px 20px 20px;+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);+ color: var(--label, #fff);+}+.remote-dialog__head {+ display: flex;+ align-items: center;+ justify-content: space-between;+}+.remote-dialog__head h3 {+ margin: 0;+ font-size: 15px;+ font-weight: 600;+}+.remote-dialog__x {+ background: transparent;+ border: none;+ color: var(--label-secondary, rgba(255, 255, 255, 0.55));+ font-size: 18px;+ line-height: 1;+ cursor: pointer;+}+.remote-dialog__x:hover {+ color: var(--label, #fff);+}+.remote-dialog__desc {+ margin: 6px 0 14px;+ font-size: 12px;+ color: var(--label-secondary, rgba(255, 255, 255, 0.55));+}+.remote-dialog__head4 {+ margin: 14px 0 8px;+ font-size: 13px;+ font-weight: 600;+}+.remote-dialog__block {+ display: flex;+ flex-direction: column;+ gap: 8px;+}+.remote-dialog__row {+ display: flex;+ gap: 8px;+}+.remote-dialog__hint {+ margin: 0;+ font-size: 12px;+ color: var(--label-secondary, rgba(255, 255, 255, 0.55));+}+.remote-dialog__err {+ margin: 12px 0 0;+ font-size: 12px;+ color: #ff9f0a;+}+/* ---- Welcome / empty state ---- */.welcome {position: absolute;