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 feat/terminal-copy-feedback

enes24c0a2f9f5ae
diff --cc src/renderer/components/kanban/ModalTerminal.tsx
index fc115f39e,c3e0e35ae..c4a73bd2e
--- a/src/renderer/components/kanban/ModalTerminal.tsx
+++ b/src/renderer/components/kanban/ModalTerminal.tsx
@@@ -2,8 -2,7 +2,9 @@@ import { useCallback, useEffect, useRef
import { Terminal } from '@xterm/xterm'
import { FitAddon } from '@xterm/addon-fit'
import { SearchAddon } from '@xterm/addon-search'
- import { hasUsage, reportsOwnCopy } from '@shared/agents/config'
++import { reportsOwnCopy } from '@shared/agents/config'
+import type { AgentId } from '@shared/agents/config'
+ import { readsClaudeTranscript } from '../../lib/transcriptGates'
import { FindBar } from '../FindBar'
import { useAgentStatus } from '../../state/agentStatus'
import { useProjects } from '../../state/projects'
diff --cc src/renderer/nodes/TerminalNode.tsx
index e749558fd,3273aa231..fcf0a3b76
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@@ -106,7 -106,8 +107,8 @@@ import { useWorktrees } from '../state/
import { isRemoteSessionNode } from '@shared/worktree'
import { useSession, useActiveSessionPresence } from '../session/session'
import { accountChipLabel, COLLAPSED_HEIGHT, NODE_COLORS, type CanvasNode } from '../state/workspace'
- import { hasHooks, canRecur, canContextLink, hasUsage, canChat, canResume, canRename, createdAgentId, reportsOwnCopy, resumeCommand, withPermissionMode, agentConfig } from '@shared/agents/config'
-import { hasHooks, canRecur, canContextLink, hasUsage, canChat, canResume, canRename, canReadTitle, createdAgentId, resumeCommand, agentConfig } from '@shared/agents/config'
++import { hasHooks, canRecur, canContextLink, hasUsage, canChat, canResume, canRename, canReadTitle, createdAgentId, reportsOwnCopy, resumeCommand, agentConfig } from '@shared/agents/config'
+ import { withPermissionMode } from '@shared/agents/approval-mode'
import { ensureActivePermissionMode } from '../state/permissionMode'
import { buildSshArgs, type SshConnection } from '@shared/ssh'
import { hintLabel } from '@shared/platform-utils'
diff --cc src/shared/agents/config.capabilities.test.ts
index 887fdfdf9,0843fe8a4..f94b22263
--- a/src/shared/agents/config.capabilities.test.ts
+++ b/src/shared/agents/config.capabilities.test.ts
@@@ -14,7 -15,9 +15,10 @@@ import
createdAgentId,
hasHooks,
hasPermissionMode,
- hasUsage, reportsOwnCopy } from './config'
+ hasUsage,
++ reportsOwnCopy,
+ RENAME_CAPABLE
+ } from './config'
describe('CONTEXT_LINK_CAPABLE', () => {
it('all three builtin agents can context-link', () => {
@@@ -131,21 -134,38 +135,57 @@@ describe('grok capabilities', () =>
})
})
+describe('copy feedback', () => {
+ it('stays quiet for claude, whose CLI announces its own copies', () => {
+ // Claude Code captures the mouse and prints "copied N chars to tmux buffer · paste with
+ // prefix + ]" itself, so nodeterm's pill would be a second message for one gesture.
+ expect(reportsOwnCopy('claude')).toBe(true)
+ })
+
+ it('speaks for every agent that says nothing itself', () => {
+ // codex leaves the mouse to tmux: the drag copies via OSC 52 and the highlight vanishes on
+ // release with no word from anyone. That silence is what the pill exists for.
+ for (const id of ['codex', 'gemini', 'opencode', 'grok']) expect(reportsOwnCopy(id)).toBe(false)
+ })
+
+ it('speaks for a plain terminal and a custom agent (no agent id at all)', () => {
+ expect(reportsOwnCopy(undefined)).toBe(false)
+ expect(reportsOwnCopy('my-custom-agent')).toBe(false)
+ })
+})
++
+ /**
+ * Reading a session name and PUSHING one back are different capabilities, and gemini has only the
+ * first: its transcript carries a model-generated name (the `update_topic` tool's `args.title`,
+ * measured in `core/__fixtures__/gemini/session.jsonl`), but its command set
+ * (`/chat list|save|resume|delete|share`, measured on 0.54.4) has no rename — `save <tag>` is a
+ * tagged checkpoint. One list for both would light the rename UI on a node where it does nothing.
+ */
+ describe('title read vs rename write', () => {
+ it('gemini can be read but never written', () => {
+ expect(canReadTitle('gemini')).toBe(true)
+ expect(canRename('gemini')).toBe(false)
+ })
+
+ it('claude and grok do both', () => {
+ for (const id of ['claude', 'grok'] as const) {
+ expect(canReadTitle(id), id).toBe(true)
+ expect(canRename(id), id).toBe(true)
+ }
+ })
+
+ it('every rename-capable agent is also title-readable — the write leg needs the read leg to settle', () => {
+ for (const id of RENAME_CAPABLE) expect(canReadTitle(id), id).toBe(true)
+ })
+
+ it('codex claims neither, for want of evidence', () => {
+ // Its slash-command set was not enumerable from the CLI, so neither leg has a measured basis.
+ expect(canReadTitle('codex')).toBe(false)
+ expect(canRename('codex')).toBe(false)
+ })
+
+ it('a custom agent claims neither', () => {
+ expect(canReadTitle('custom:abc')).toBe(false)
+ expect(canRename('custom:abc')).toBe(false)
+ })
+ })
diff --cc src/shared/agents/config.ts
index 3f58b7137,c54c3e1e6..40ed80577
--- a/src/shared/agents/config.ts
+++ b/src/shared/agents/config.ts
@@@ -125,17 -161,9 +161,18 @@@ export const CANVAS_CONTROL_CAPABLE = [
//
// NOTE: the `auto` VERSION GATE is claude's alone — see activePermissionMode in
// renderer/state/permissionMode.ts. grok has accepted every mode we emit since 1.0.0, its first
- // release, so it must never inherit a gate fed by a `claude --version` probe.
- export const PERMISSION_MODE_CAPABLE = ['claude', 'grok'] as const
+ // release, and gemini/codex accept theirs on the versions we measured, so none of them may inherit
+ // a gate fed by a `claude --version` probe.
+ export const PERMISSION_MODE_CAPABLE = ['claude', 'grok', 'gemini', 'codex'] as const
+// Agents whose own CLI already tells the user when it copies, so nodeterm must not say it again.
+// Claude Code captures the mouse itself and prints its own line — "copied N chars to tmux buffer ·
+// paste with prefix + ]" — which makes our copy pill a second message for one gesture. Membership
+// switches the WHOLE copy-feedback layer off for that agent's terminals: the receipt and the
+// one-time "Hold ⌥ to select text" hint alike, since a drag there is not swallowed at all.
+//
+// This is a list rather than a `=== 'claude'` for the usual reason: the next CLI to grow its own
+// copy notice joins by being added here, and nothing else changes.
+export const SELF_REPORTS_COPY = ['claude'] as const
const includes = (list: readonly string[], id: AgentId): boolean => list.includes(id)
@@@ -149,12 -177,9 +186,13 @@@ export const hasUsage = (id: AgentId):
export const canChat = (id: AgentId): boolean => includes(CHAT_CAPABLE, id)
export const canTransferFrom = (id: AgentId): boolean => includes(TRANSFER_SOURCE_CAPABLE, id)
export const canRename = (id: AgentId): boolean => includes(RENAME_CAPABLE, id)
+ export const canReadTitle = (id: AgentId): boolean => includes(TITLE_READ_CAPABLE, id)
export const canControlCanvas = (id: AgentId): boolean => includes(CANVAS_CONTROL_CAPABLE, id)
export const hasPermissionMode = (id: AgentId): boolean => includes(PERMISSION_MODE_CAPABLE, id)
+/** Does this agent's CLI report its own copies? Undefined (a plain terminal, a custom agent) is
+ * `false` — nobody speaks for those, so nodeterm's own feedback is the only feedback there is. */
+export const reportsOwnCopy = (id: AgentId | undefined): boolean =>
+ !!id && includes(SELF_REPORTS_COPY, id)
// Returns the builtin config for an id, or undefined for custom/unknown agents.
export const agentConfig = (id: AgentId): AgentConfig | undefined =>