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/agent-restart-resume

enes4daedf92063d
diff --cc src/renderer/canvas/Canvas.tsx
index 4ca18a64a,8fd5c8ebd..8192f9c67
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@@ -3994,13 -3992,10 +4150,15 @@@ export function Canvas()
return node.selected && selected.length > 0 ? selected : [node.id]
}, [])
- const selectionItems = useCallback((ids: string[]): MenuItem[] => {
+ /** `at` is where the menu was opened, in flow coordinates: every entry that SPAWNS a node
+ * (Duplicate / Branch / Transfer) puts it there, instead of somewhere the user never pointed. */
- const selectionItems = useCallback(
- (ids: string[], at?: { x: number; y: number }): MenuItem[] => [
++ const selectionItems = useCallback((ids: string[], at?: { x: number; y: number }): MenuItem[] => {
+ // Rows the user chose to hide (Settings). Read here rather than through a selector because the
+ // menu is rebuilt on every open — a toggle applies to the next right-click with no reload.
+ // Destructive/recovery rows (Delete, Restart agent, Branch/Transfer) are not hideable at all:
+ // `isHidden` only answers for ids in its own inventory.
+ const hidden = useSettings.getState().settings.hiddenNodeMenuItems
+ return tidySeparators([
{ type: 'label', label: ids.length > 1 ? `${ids.length} nodes` : '1 node' },
...((): MenuItem[] => {
// "Group …" only when something is actually groupable (top-level, not itself a group —
@@@ -4029,15 -4024,9 +4187,15 @@@
if (items.length) items.push({ type: 'separator' })
return items
})(),
- { type: 'colors', onPick: (c) => setNodesColor(ids, c) },
+ ...(isHidden('colors', hidden)
+ ? []
+ : ([{ type: 'colors', onPick: (c) => setNodesColor(ids, c) }] as MenuItem[])),
{ type: 'separator' },
- { label: 'Duplicate', icon: <IconDuplicate />, onClick: () => duplicateNodes(ids, at) },
+ ...(isHidden('duplicate', hidden)
+ ? []
+ : ([
- { label: 'Duplicate', icon: <IconDuplicate />, onClick: () => duplicateNodes(ids) }
++ { label: 'Duplicate', icon: <IconDuplicate />, onClick: () => duplicateNodes(ids, at) }
+ ] as MenuItem[])),
...(ids.length === 1 && (() => {
const a = agentIdOf(ids[0])
return !!a && canBranch(a)