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(canvas): move Switch model / account out of Restart ▸
reviewc03df2a2a894
diff --git a/CLAUDE.md b/CLAUDE.mdindex c862d8a2d..bfd479823 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -3602,10 +3602,11 @@ the Settings section and ShortcutsPanel start disagreeing about what a chord meadisabled with a hint while the session is busy or has no id yet), delete. Actions livein `Canvas.tsx`, operate on `targetIds`. **Conversation actions are grouped** so an agent node'smenu fits on screen: **Transfer conversation ▸** holds one row per target (a model-capable target- nests its gateway models one level further), and **Restart ▸** holds every quit-and-resume- variant — restart, restart + fresh shell, restart on subscription, then Reopen as / Switch model /- Switch account. `ContextMenu` renders submenus to any depth (`MenuRows` is recursive); a flyout- that hosts a submenu drops its scroll (`.ctx-submenu--host` — `overflow: auto` would clip the+ nests its gateway models one level further), and **Restart ▸** holds the restart variants —+ restart, restart + fresh shell, restart on subscription, then Reopen as. Switch model ▸ and Switch+ account ▸ stay first-level rows beside it (everyday choices, not recovery restarts).+ `ContextMenu` renders submenus to any depth (`MenuRows` is recursive); a flyout that hosts a+ submenu drops its scroll (`.ctx-submenu--host` — `overflow: auto` would clip thenested flyout) and `useSubmenuFlip` lifts a flyout that would run off the bottom. The non-destructive rows are user-hideable from**Settings → Appearance** ("Node menu items" / "Terminal header buttons"), stored as HIDDENlists in `settings.hiddenNodeMenuItems` / `settings.hiddenHeaderButtons` (empty = everythingdiff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex 42ce9019c..ae032d032 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -8446,6 +8446,10 @@ export function Canvas() {}] as MenuItem[]): []),+ ]+ // Switch model / account stay FIRST-level rows: they are everyday choices, not recovery+ // restarts, and burying them under Restart ▸ cost an extra hover each time.+ const switchRows: MenuItem[] = [...(switchCapable? compatibleModels.length? ([@@ -8586,14 +8590,15 @@ export function Canvas() {: []),]return [- // Every quit-and-resume action — plain restart, fresh shell, subscription, reopen as- // another agent, switch model / account — behind ONE row.+ // The restart variants — plain restart, fresh shell, subscription, reopen as another+ // agent — behind ONE row.{type: 'submenu',label: 'Restart',icon: <IconPower />,children: tidySeparators(restartRows)},+ ...switchRows,// Pause session: quit the CLI (and, for the deeper choice, also end the tmux// session) so it does NOT auto-resume on the next reveal or reopen — only an// explicit Resume brings it back. Same eligibility as Restart above (`why`): a node@@ -12883,7 +12888,7 @@ export function Canvas() {]// For the ACTIVE project, reuse the SAME single-node menu the canvas right-click builds —// full parity (Color, Group, Duplicate, Branch, Collapse, Markdown view, Refresh terminal,- // Transfer ▸ with its nested model submenus, Restart ▸ with every restart variant) so the two+ // Transfer ▸ with its nested model submenus, Restart ▸, Switch model ▸ / account ▸) so the two// surfaces can't drift. `selectionItems` reads the live// node from `nodesRef.current` (active-project only), which is exactly why this is gated.// `at` is undefined: the row has no flow position, so spawned nodes (Duplicate/Branch/