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.

Merge remote-tracking branch 'origin/main' into fix/b5-mirror-empty

enes44fd4a13d5e8
diff --cc src/renderer/canvas/Canvas.tsx
index a1aebf1b5,110ae064d..3339ed8a4
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@@ -52,12 -54,18 +54,19 @@@ import { ShortcutsPanel } from '../comp
import { UpdateCard } from '../components/UpdateCard'
import { AnnouncementBanner } from '../components/AnnouncementBanner'
import { ConfirmDialog } from '../components/ConfirmDialog'
+ import { UpgradeDialog } from '../components/UpgradeDialog'
+ import { RemotePicker } from '../components/RemotePicker'
+ import { BindWorktreeDialog, type BindWorktreeValue } from '../components/BindWorktreeDialog'
import { NotifyConsentDialog } from '../components/NotifyConsentDialog'
import { ExplorerPanel } from '../components/ExplorerPanel'
+ import { SessionsSidebar } from '../components/SessionsSidebar'
+ import type { SessionNodeInput } from '../lib/sessionList'
import { UsageIndicator } from '../components/UsageIndicator'
import { RemoteSessionView } from './RemoteSessionView'
+import { RemoteAccessDialog } from '../components/RemoteAccessDialog'
import { transport } from '../terminal/local-transport'
+ import { prepareQuickOpenFiles, type QuickOpenIndexedFile } from '../lib/quickOpenSearch'
+ import { opensInEditor } from '../lib/openTarget'
import { useProjects } from '../state/projects'
import { useAgentStatus } from '../state/agentStatus'
import { useAgentNodes } from '../state/agentNodes'
@@@ -121,9 -139,30 +140,31 @@@ export function Canvas()
const [scOpen, setScOpen] = useState(false)
const [shortcutsOpen, setShortcutsOpen] = useState(false)
const [explorerOpen, setExplorerOpen] = useState(false)
+ // Reveal-in-Explorer target (relative to the active project cwd). The nonce makes each reveal
+ // distinct so revealing the same file twice still re-fires the Explorer effect.
+ const [reveal, setReveal] = useState<{ path: string; nonce: number } | null>(null)
+ // Sessions sidebar (left): pinned (docked) by default; unpin is a persisted preference.
+ // hover-to-peek when unpinned. `dismissed` is a transient "hide for now" (the × button)
+ // that does NOT change the pin preference — so a pinned sidebar reopens pinned next launch.
+ const [sessionsPinned, setSessionsPinned] = useState(() => {
+ try {
+ const v = localStorage.getItem('nodeterm.sessionsPinned')
+ return v === null ? true : v === '1'
+ } catch {
+ return true
+ }
+ })
+ const [sessionsHover, setSessionsHover] = useState(false)
+ const [sessionsDismissed, setSessionsDismissed] = useState(false)
+ // When pinned the sidebar is docked and stays open (mouse-leave never closes it); `dismissed`
+ // hides it until the next hover/click. When unpinned it is a pure hover-peek.
+ const sessionsOpen = sessionsPinned ? !sessionsDismissed : sessionsHover
+ // When set, add a terminal to this project once its nodes have loaded into React Flow
+ // (cross-project "add" from the sidebar, which must switch projects first).
+ const pendingAddRef = useRef<string | null>(null)
// 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: string
onConfirm: () => void