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
fix(pairing): report 'dev' relay status — an unpackaged build is not 'off'
enes1285234d1351
diff --git a/src/main/pairing-service.ts b/src/main/pairing-service.tsindex 3722e342c..408bb1c91 100644--- a/src/main/pairing-service.ts+++ b/src/main/pairing-service.ts@@ -143,8 +143,10 @@ export type PairingDone = {ok: boolean/** Only on ok=true: did the pairing come with a relay leg? 'off' = toggle disabled,* 'failed' = enabled but the mint failed (the SILENT LAN-only degrade that cost a- * field debugging session — surface it, never swallow it). */- relay?: 'ok' | 'off' | 'failed'+ * field debugging session — surface it, never swallow it), 'dev' = unpackaged build,+ * where relayAllowed() disables the relay regardless of the toggle — a self-builder+ * running `npm run dev` would otherwise read 'off' while staring at an ON toggle. */+ relay?: 'ok' | 'off' | 'failed' | 'dev'}export interface PairingService {@@ -499,7 +501,13 @@ export function createPairingService(relayDeps?: PairingRelayDeps): PairingServi}finish({ok: true,- relay: !relayCtx ? 'off' : relayFields.relayDeviceToken ? 'ok' : 'failed'+ relay: relayCtx+ ? relayFields.relayDeviceToken+ ? 'ok'+ : 'failed'+ : relayDeps && !relayDeps.relayAllowed()+ ? 'dev'+ : 'off'})} catch (err) {send(res, 500, 'pairing failed')diff --git a/src/renderer/components/PhonePairPopover.tsx b/src/renderer/components/PhonePairPopover.tsxindex 0f9c454f7..0e7b9ae3e 100644--- a/src/renderer/components/PhonePairPopover.tsx+++ b/src/renderer/components/PhonePairPopover.tsx@@ -111,6 +111,10 @@ export function PhonePairPopover({</div>) : relayResult === 'off' ? (<div className="phone-pair__hint">LAN-only pairing — remote access is off.</div>+ ) : relayResult === 'dev' ? (+ <div className="phone-pair__hint">+ LAN-only pairing — dev builds disable the relay (set NODETERM_RELAY_URL to test).+ </div>) : null}</>) : phase === 'timeout' ? (diff --git a/src/renderer/components/settings/sections/PhoneSection.tsx b/src/renderer/components/settings/sections/PhoneSection.tsxindex e454920ce..0339e04e4 100644--- a/src/renderer/components/settings/sections/PhoneSection.tsx+++ b/src/renderer/components/settings/sections/PhoneSection.tsx@@ -210,6 +210,12 @@ export function PhoneSection({ isActive }: { isActive: boolean }): React.JSX.Ele<p className="text-sm text-muted">LAN-only pairing — remote access is switched off above.</p>+ ) : relayResult === 'dev' ? (+ <p className="text-sm text-muted">+ LAN-only pairing — this is an unpackaged (dev) build, where the relay is+ disabled regardless of the toggle. Set NODETERM_RELAY_URL to test remote+ access, or use a packaged build.+ </p>) : null}<Button onClick={reset}>Pair another phone</Button></div>diff --git a/src/renderer/components/settings/usePhonePairing.ts b/src/renderer/components/settings/usePhonePairing.tsindex af383bca5..b7a3afb07 100644--- a/src/renderer/components/settings/usePhonePairing.ts+++ b/src/renderer/components/settings/usePhonePairing.ts@@ -21,7 +21,7 @@ export function usePhonePairing(onPaired?: () => void): {/** On phase 'paired': whether the pairing came with a relay leg ('off' = toggle disabled,* 'failed' = mint failed → LAN-only). Surfaced so the silent degrade is visible at the one* moment the user is looking. */- relayResult: 'ok' | 'off' | 'failed' | null+ relayResult: 'ok' | 'off' | 'failed' | 'dev' | nullerror: stringbusy: booleanstart: () => Promise<void>@@ -34,7 +34,7 @@ export function usePhonePairing(onPaired?: () => void): {// Went from unreachable → reachable while the warning was showing: show a green confirmation// instead of silently dropping the warning (the user just flipped a toggle; acknowledge it).const [sshHealed, setSshHealed] = useState(false)- const [relayResult, setRelayResult] = useState<'ok' | 'off' | 'failed' | null>(null)+ const [relayResult, setRelayResult] = useState<'ok' | 'off' | 'failed' | 'dev' | null>(null)const [error, setError] = useState('')const [busy, setBusy] = useState(false)// Track whether a pairing listener is currently running so unmount can stop it.diff --git a/src/shared/types.ts b/src/shared/types.tsindex 61f474a1b..45de0f1f8 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -1875,7 +1875,7 @@ export interface PairingApi {/** Cancel an in-flight pairing (e.g. when the settings section unmounts). */stop(): Promise<void>/** Fires once when pairing finishes (ok=true paired, ok=false timeout). Returns unsubscribe. */- onDone(cb: (result: { ok: boolean; relay?: 'ok' | 'off' | 'failed' }) => void): () => void+ onDone(cb: (result: { ok: boolean; relay?: 'ok' | 'off' | 'failed' | 'dev' }) => void): () => void/** Live re-probe of 127.0.0.1:22, so the Remote Login warning can clear the moment the user* flips the toggle in System Settings (polled by the UI only while the warning is showing). */probeSsh(): Promise<boolean>