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
fix(canvas): zoom-to-node fits the node instead of forcing >=100% zoom
enes7da39d35b0ae
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex c7d68085a..7bf9c09dd 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -1799,21 +1799,19 @@ export function Canvas() {const goToNode = useCallback((node: Node) => {- const w = node.measured?.width ?? (node.width as number) ?? 0- const h = node.measured?.height ?? (node.height as number) ?? 0- // A grouped node's position is relative to its parent group frame — convert to absolute- // before centering, or focusing a session inside a group jumps to the wrong spot.- const parent = node.parentId- ? nodesRef.current.find((p) => p.id === node.parentId)- : undefined- const x = node.position.x + (parent?.position.x ?? 0)- const y = node.position.y + (parent?.position.y ?? 0)- setCenter(x + w / 2, y + h / 2, {- zoom: Math.max(getZoom(), 1),- duration: 300+ // Fit the node in view instead of centering at a fixed zoom — `zoom: max(current, 1)`+ // overshot large terminals (their body never fit the viewport). fitView sizes the zoom+ // to the node and resolves group-relative positions itself; the clamp keeps a small+ // node from filling the whole screen and a huge one from being fit microscopic.+ void fitView({+ nodes: [{ id: node.id }],+ duration: 300,+ padding: 0.2,+ minZoom: 0.25,+ maxZoom: 1.15})},- [setCenter, getZoom]+ [fitView])const onNodeDoubleClick = useCallback(