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 feat/sessions-sidebar into main

enes54752485c951
diff --cc src/renderer/canvas/Canvas.tsx
index 113b6f79c,f91f7c2c5..7fcf97072
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@@ -114,8 -121,8 +123,9 @@@ export function Canvas()
const [dirty, setDirty] = useState(false)
const [zoomPct, setZoomPct] = useState(100)
const [menu, setMenu] = useState<{ x: number; y: number; items: MenuItem[] } | null>(null)
+ const [remotePicker, setRemotePicker] = useState<{ x: number; y: number } | null>(null)
const [paletteOpen, setPaletteOpen] = useState(false)
+ const [fileIndex, setFileIndex] = useState<QuickOpenIndexedFile[]>([])
// Cached visible-buffer text per terminal, for command-palette content search.
const [bufferCache, setBufferCache] = useState<Record<string, string>>({})
const captureTsRef = useRef<Record<string, number>>({})
@@@ -123,9 -130,19 +133,22 @@@
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): hover-to-peek + click-to-pin (persisted).
+ const [sessionsPinned, setSessionsPinned] = useState(() => {
+ try {
+ return localStorage.getItem('nodeterm.sessionsPinned') === '1'
+ } catch {
+ return false
+ }
+ })
+ const [sessionsHover, setSessionsHover] = useState(false)
+ const sessionsOpen = sessionsPinned || 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 [confirm, setConfirm] = useState<{
@@@ -1863,9 -2053,32 +2104,32 @@@
{shortcutsOpen && <ShortcutsPanel onClose={() => setShortcutsOpen(false)} />}
{explorerOpen && (
- <ExplorerPanel onClose={() => setExplorerOpen(false)} onOpenFile={openFile} />
+ <ExplorerPanel onClose={() => setExplorerOpen(false)} onOpenFile={openFile} reveal={reveal} />
)}
+ <SessionsSidebar
+ open={sessionsOpen}
+ pinned={sessionsPinned}
+ liveActiveNodes={liveActiveNodes}
+ onTogglePin={toggleSessionsPin}
+ onClose={() => {
+ setSessionsHover(false)
+ setSessionsPinned(false)
+ try {
+ localStorage.setItem('nodeterm.sessionsPinned', '0')
+ } catch {
+ // ignore
+ }
+ }}
+ onFocusNode={focusNodeById}
+ onCloseSession={closeSession}
+ onRenameSession={renameSession}
+ onRowContextMenu={onRowContextMenu}
+ onAddToProject={addToProject}
+ onMouseEnter={openSessionsPeek}
+ onMouseLeave={closeSessionsPeekSoon}
+ />
+
{confirm && (
<ConfirmDialog
message={confirm.message}
diff --cc src/renderer/styles.css
index 439124f56,72da30d20..5233ba6b0
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@@ -3715,17 -3709,89 +3730,103 @@@ body
opacity: 0.85;
}
+.scm-more {
+ background: transparent;
+ border: 1px solid transparent;
+ border-radius: 7px;
+ color: var(--muted);
+ font-size: 15px;
+ line-height: 1;
+ padding: 3px 8px;
+ cursor: pointer;
+}
+.scm-more:hover {
+ background: var(--panel-2);
+ color: var(--text);
+}
+ /* Sessions sidebar — row + status dot */
+ @keyframes nt-spin { to { transform: rotate(360deg); } }
+
+ .ss-row {
+ display: flex;
+ align-items: flex-start;
+ gap: 7px;
+ padding: 6px 8px;
+ border-radius: 7px;
+ cursor: pointer;
+ border: 1px solid transparent;
+ }
+ .ss-row:hover { background: var(--panel-header); }
+ .ss-row.is-active { background: rgba(255, 255, 255, 0.06); border-color: var(--border); }
+
+ .ss-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
+ .ss-dot--idle { background: rgba(160, 160, 160, 0.4); }
+ .ss-dot--done { background: #30d158; }
+ .ss-dot--attention { background: #ffd60a; }
+ .ss-dot--working {
+ background: transparent;
+ border: 2px solid #ffd60a;
+ border-top-color: transparent;
+ animation: nt-spin 1s steps(12, end) infinite;
+ }
+
+ .ss-row__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
+ .ss-row__titleline { display: flex; align-items: center; gap: 6px; min-width: 0; }
+ .ss-mark { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
+ .ss-title { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .ss-title.is-unread { font-weight: 600; }
+ .ss-title-input { font-size: 12.5px; background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 4px; }
+ .ss-chip { font-size: 10px; color: var(--text); opacity: 0.7; background: var(--panel-header); border-radius: 4px; padding: 0 5px; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 0 auto; }
+ .ss-loop { font-size: 9.5px; color: #ffd60a; border: 1px solid rgba(255, 214, 10, 0.4); border-radius: 4px; padding: 0 4px; flex: 0 0 auto; }
+ .ss-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: rgba(180, 180, 185, 0.85); min-width: 0; }
+ .ss-meta__cwd { font-family: var(--mono, monospace); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .ss-meta__ssh { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
+ .ss-ctx { font-size: 9.5px; padding: 0 5px; border-radius: 4px; color: #000; font-weight: 600; flex: 0 0 auto; }
+ .ss-row__close { margin-left: auto; opacity: 0; border: none; background: transparent; color: var(--text); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; flex: 0 0 auto; }
+ .ss-row:hover .ss-row__close { opacity: 0.6; }
+ .ss-row__close:hover { opacity: 1 !important; color: #ff453a; }
+
+ /* Sessions sidebar — shell */
+ .sessions-sidebar {
+ position: absolute;
+ top: 54px;
+ left: 14px;
+ z-index: 12;
+ width: 300px;
+ max-height: calc(100vh - 96px);
+ display: flex;
+ flex-direction: column;
+ background: rgba(28, 28, 30, 0.96);
+ border: 1px solid var(--border);
+ border-radius: 12px;
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
+ overflow: hidden;
+ }
+ .sessions-sidebar__head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
+ .sessions-sidebar__title { font-size: 12.5px; font-weight: 600; color: var(--text); }
+ .sessions-sidebar__count { font-size: 10.5px; color: rgba(180, 180, 185, 0.85); }
+ .sessions-sidebar__head-actions { margin-left: auto; display: flex; gap: 4px; }
+ .sessions-sidebar__head-actions button { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text); cursor: pointer; border-radius: 6px; }
+ .sessions-sidebar__head-actions button:hover { background: var(--panel-header); }
+ .sessions-sidebar__head-actions button.is-on { color: var(--accent); }
+ .sessions-sidebar__search { margin: 8px 10px 4px; }
+ .sessions-sidebar__search input { width: 100%; box-sizing: border-box; font-size: 12px; padding: 5px 8px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 7px; }
+ .sessions-sidebar__body { overflow-y: auto; padding: 4px 6px 8px; }
+ .sessions-sidebar__empty { padding: 18px 12px; text-align: center; font-size: 12px; color: rgba(180, 180, 185, 0.8); }
+
+ .ss-group__head { display: flex; align-items: center; gap: 6px; padding: 6px 6px; cursor: pointer; border-radius: 6px; }
+ .ss-group__head:hover { background: var(--panel-header); }
+ .ss-group__chev { font-size: 9px; color: rgba(180, 180, 185, 0.85); width: 10px; }
+ .ss-group__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
+ .ss-group__name { font-size: 12px; font-weight: 600; color: var(--text); }
+ .ss-group.is-active .ss-group__name { color: var(--accent); }
+ .ss-group__branch { font-size: 10px; color: rgba(180, 180, 185, 0.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .ss-group__count { font-size: 10px; color: rgba(180, 180, 185, 0.8); }
+ .ss-group__add { margin-left: auto; opacity: 0; border: none; background: transparent; color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
+ .ss-group__head:hover .ss-group__add { opacity: 0.7; }
+ .ss-group__add:hover { opacity: 1 !important; color: var(--accent); }
+ .ss-group__empty { padding: 4px 8px 6px 22px; font-size: 11px; color: rgba(180, 180, 185, 0.6); }
+
+ .sessions-icon-cluster { position: absolute; top: 54px; left: 14px; z-index: 11; }
+ .sessions-icon-cluster button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: rgba(40, 40, 42, 0.92); border: 1px solid var(--border); border-radius: 9px; color: var(--text); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
+ .sessions-icon-cluster button:hover { background: var(--panel-header); }
diff --cc src/shared/ipc.ts
index 2e48f34ba,4fccd1b85..ac27b61b6
--- a/src/shared/ipc.ts
+++ b/src/shared/ipc.ts
@@@ -54,9 -54,11 +54,12 @@@ export const IPC =
fsRead: 'fs:read',
fsReadBinary: 'fs:read-binary',
fsWrite: 'fs:write',
+ filesQuickOpen: 'files:quick-open',
settingsLoad: 'settings:load',
settingsSave: 'settings:save',
+ sshList: 'ssh:list',
+ sshSave: 'ssh:save',
+ sshDelete: 'ssh:delete',
gitStatus: 'git:status',
gitInit: 'git:init',
gitClone: 'git:clone',