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(terminal): show upload overlay while a dropped file scps to an SSH host
enes9204daa60102
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsxindex d34a26463..3d222846f 100644--- a/src/renderer/nodes/TerminalNode.tsx+++ b/src/renderer/nodes/TerminalNode.tsx@@ -372,6 +372,13 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasNconst [showColors, setShowColors] = useState(false)const [armed, setArmed] = useState(true)const [dropping, setDropping] = useState(false)+ // Overlay while dropped files upload to an SSH host (scp is seconds-long with zero feedback);+ // doubles as a brief "Upload failed" flash when nothing made it.+ const [uploadNote, setUploadNote] = useState<{ text: string; failed?: boolean } | null>(null)+ const uploadNoteTimer = useRef<ReturnType<typeof setTimeout> | null>(null)+ useEffect(() => () => {+ if (uploadNoteTimer.current) clearTimeout(uploadNoteTimer.current)+ }, [])const [naming, setNaming] = useState(false)const [mdHtml, setMdHtml] = useState('')const [editingTitle, setEditingTitle] = useState(false)@@ -1359,14 +1366,31 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasNif (data.sshRemoteTmux) {// Remote terminal: a local path is useless on the remote host. Upload each file over the// project's ControlMaster and paste the REMOTE absolute path instead. Fail-open: skip nulls.+ // scp takes seconds and pastes nothing until it's done, so show an overlay while it runs —+ // without it a drop looks like it silently did nothing.const projectId = useProjects.getState().activeProjectId- const uploaded = await Promise.all(- files.map((f) => {- const lp = window.nodeTerminal.getPathForFile(f)- return lp ? window.nodeTerminal.sshProject.uploadFile(projectId, lp, f.name) : Promise.resolve(null)- })- )+ if (uploadNoteTimer.current) clearTimeout(uploadNoteTimer.current)+ setUploadNote({+ text: `Uploading ${files.length === 1 ? files[0].name : `${files.length} files`}…`,+ })+ let uploaded: (string | null)[] = []+ try {+ uploaded = await Promise.all(+ files.map((f) => {+ const lp = window.nodeTerminal.getPathForFile(f)+ return lp+ ? window.nodeTerminal.sshProject.uploadFile(projectId, lp, f.name).catch(() => null)+ : Promise.resolve(null)+ })+ )+ } finally {+ setUploadNote(null)+ }paths = uploaded.filter((p): p is string => !!p).map(escapeDroppedPath)+ if (!paths.length) {+ setUploadNote({ text: 'Upload failed', failed: true })+ uploadNoteTimer.current = setTimeout(() => setUploadNote(null), 2500)+ }} else {paths = files.map((f) => window.nodeTerminal.getPathForFile(f))@@ -1777,6 +1801,12 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasNclassName={`term-node__xterm nodrag nowheel${co.letterbox ? ' letterboxed' : ''}`}ref={bodyRef}/>+ {uploadNote && (+ <div className={`term-node__upload${uploadNote.failed ? ' failed' : ''}`}>+ {!uploadNote.failed && <span className="term-node__upload-spin" />}+ {uploadNote.text}+ </div>+ )}{co.closed && (<div className="term-node__closed nodrag">Closed by {closedName} — this session was ended.diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 8ce6dfdda..d5121a52f 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -1378,6 +1378,36 @@ body,background: var(--bg);}+/* Upload progress while dropped files scp to an SSH host (and a brief failure flash). */+.term-node__upload {+ position: absolute;+ inset: 0;+ z-index: 30;+ display: flex;+ align-items: center;+ justify-content: center;+ gap: 8px;+ font-size: 12px;+ font-weight: 600;+ color: var(--accent);+ background: color-mix(in srgb, var(--bg) 60%, transparent);+ border-radius: 6px;+ pointer-events: none;+}++.term-node__upload.failed {+ color: #ff453a;+}++.term-node__upload-spin {+ width: 14px;+ height: 14px;+ border-radius: 50%;+ border: 2px solid var(--border);+ border-top-color: var(--accent);+ animation: dictation-spin 0.8s linear infinite;+}+/* Drop-target hint while dragging a file from Finder into the terminal. */.term-node__body.dropping::after {content: 'Drop to insert path';