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(kanban): address review blockers 1-7 for omni swimlanes
Alexaf6c01791436
diff --git a/CLAUDE.md b/CLAUDE.mdindex ed36bc93f..5080f2c32 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -2601,6 +2601,7 @@ the Settings section and ShortcutsPanel start disagreeing about what a chord meaas a SIBLING of the node root — the roots are overflow:hidden — hidden for Ungrouped/dangling,click opens the board). Server Edition works as-is (pure renderer + workspace.save). Scope: noagent-driven card movement yet, no board undo, mobile N/A.+- **Omni Kanban (global swimlanes)** (`components/kanban/GlobalKanbanView.tsx`; one swimlane per open project; `state/viewMode.ts` `globalKanban` (localStorage `nodeterm.globalKanban`, machine-local, like `viewByProject`) + `settings.omniKanbanEnabled` (feature gate, default OFF, `settings.json`) / `omniKanbanAsDefault` (when true, `view.kanbanToggle` — Cmd+Shift+B — opens Omni; otherwise per-project; `view.globalKanbanToggle` registry command — unbound, remappable — always opens Omni when enabled); `TabBar` and the menu IPC `onToggleKanban` share one `performKanbanToggle` decision, and `isGlobalKanbanOpen()` is the single gate (fail-closed, static import of `useSettings` — the earlier `require` failed open in the packaged renderer). The active project's lane is derived from serialized `p.nodes` via `toKanbanSessionState` — the persisted-state counterpart to `toKanbanSession` — and is committed (`commitActiveToStore`) before the overlay mounts so live React Flow edits are not stale; `pendingLaunch` never becomes `initialCommand` in the modal (the DAG launch must fire only when dependencies report done, and the canvas `TerminalNode` already delivers `initialCommand` via `writeWhenShellReady` after the `nodeterm:create-node` project switch). Active-project edits (rename / sticky / browser nav) route through Canvas live nodes (`setNodes` + `markDirty`), non-active through the store + `writeDisk`; delete uses `ConfirmDialog` (not `confirm`) and SSH-aware teardown (`transport.destroy` locally vs `sshProject.killSessions` with `everySocket` for a remote owner, plus `agentStatus` / `agentNodes` / `webviewKeepAlive` cleanup). The top bar's project pills and Cmd/Ctrl+1..9 (`nodeterm:swimlane-jump`) jump to the lane; header hint shows the correct mod (`Cmd` on Mac, `Ctrl` elsewhere). Server Edition works as-is, Mobile N/A.- **Settings** (`SettingsPage.tsx`, ⚙ / ⌘,): font/cursor (live to xterm + Monaco), defaultshell, grid + snap, **default node size** (`defaultNodeWidth`/`defaultNodeHeight` — newterminal/agent nodes only, clamped in `terminalNodeSize()` in `state/workspace.ts`),diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex d20e0cf27..9922b3a6b 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -64,7 +64,10 @@ forces you to *declare* every member, but a no-op stub compiles fine while doingThe **canvas and the kanban board are two views of the same nodes.** When you add something to acanvas node — a header action, a badge, a menu item — ask whether the board's card and card modal-need it too, and wire it in the same change.+need it too, and wire it in the same change. The global (Omni) board shows all open projects as+stacked swimlanes; it is off by default (`settings.omniKanbanEnabled`), has a dedicated remappable+shortcut (`view.globalKanbanToggle`), and can be made the default for Cmd+Shift+B via+`settings.omniKanbanAsDefault` — see CLAUDE.md for the full invariants.A board card's **source** is a registry entry, not a branch you add at a call site(`renderer/lib/kanbanSources.ts`). Declare the source once — filter label, `placement`diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex a778afc47..53837dbde 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -2535,6 +2535,36 @@ export function Canvas() {if (globalKanbanOpen) commitActiveToStore()}, [globalKanbanOpen, commitActiveToStore])+ // Single decision for "toggle the kanban board" — called from both the registry handler+ // (view.kanbanToggle, under terminal-first) and the desktop menu IPC receiver+ // (onToggleKanban, under app-first where the menu steals the accelerator). Must stay in one+ // place: the IPC path bypasses the registry, so duplicating the omni/asDefault choice+ // caused Cmd+Shift+B on desktop to ignore omniKanbanAsDefault and to toggle the per-project+ // board underneath the global overlay.+ const performKanbanToggle = useCallback(() => {+ if (isGlobalKanbanOpen()) {+ useViewMode.getState().toggleGlobalKanban()+ return true+ }+ const settings = useSettings.getState().settings+ if (isOmniKanbanEnabled(settings) && settings.omniKanbanAsDefault === true) {+ commitActiveToStore()+ useViewMode.getState().toggleGlobalKanban()+ return true+ }+ const id = useProjects.getState().activeProjectId+ if (!id) return false+ useViewMode.getState().toggle(id)+ return true+ }, [commitActiveToStore])++ const performGlobalKanbanToggle = useCallback(() => {+ if (!isOmniKanbanEnabled(useSettings.getState().settings)) return false+ if (!isGlobalKanbanOpen()) commitActiveToStore()+ useViewMode.getState().toggleGlobalKanban()+ return true+ }, [commitActiveToStore])+// Mirror `dirty` into a ref so the external-change listener (mounted once) reads the// live value without re-subscribing on every edit.const dirtyRef = useRef(false)@@ -5088,10 +5118,9 @@ export function Canvas() {if (isTerminalTarget(document.activeElement as unknown as ContextElement | null)) {noteTerminalCapture('view.kanbanToggle')}- const id = useProjects.getState().activeProjectId- if (id) useViewMode.getState().toggle(id)+ performKanbanToggle()})- }, [])+ }, [performKanbanToggle])// Native app menu → open Settings (⌘,). A menu click does not fire before-input-event, so the// Cmd+, keydown handler alone would leave the menu item inert — main forwards it as IPC.useEffect(() => {@@ -7071,32 +7100,8 @@ export function Canvas() {'app.commandPalette': () => { setPaletteOpen((v) => !v); return true },'app.settings': () => { setSettingsSection(undefined); setSettingsOpen(true); return true },'app.shortcutsPanel': () => { setShortcutsOpen((v) => !v); return true },- 'view.kanbanToggle': () => {- // Global board is an overlay — any toggle while it's open closes it.- if (isGlobalKanbanOpen()) {- useViewMode.getState().toggleGlobalKanban()- return true- }- const settings = useSettings.getState().settings- const omniEnabled = isOmniKanbanEnabled(settings)- const asDefault = settings.omniKanbanAsDefault === true- if (omniEnabled && asDefault) {- // Opt-in: Cmd+Shift+B opens Omni when the user lives in the global view.- if (!isGlobalKanbanOpen()) commitActiveToStore()- useViewMode.getState().toggleGlobalKanban()- } else {- const id = useProjects.getState().activeProjectId- if (!id) return false- useViewMode.getState().toggle(id)- }- return true- },- 'view.globalKanbanToggle': () => {- if (!isOmniKanbanEnabled(useSettings.getState().settings)) return false- if (!isGlobalKanbanOpen()) commitActiveToStore()- useViewMode.getState().toggleGlobalKanban()- return true- },+ 'view.kanbanToggle': () => performKanbanToggle(),+ 'view.globalKanbanToggle': () => performGlobalKanbanToggle(),'view.focusMode': () => { toggleFocusMode(); return true },'panel.explorer': () => { showExplorer('toggle'); return true },'panel.sourceControl': () => { setScOpen((v) => !v); return true },@@ -8423,7 +8428,9 @@ export function Canvas() {const { projectId, choice, columnId } = e.detailif (projectId !== useProjects.getState().activeProjectId) {switchProject(projectId)- setTimeout(() => createNodeInColumn(choice, columnId), 120)+ // Project switch is a synchronous store update but React Flow remount is async.+ // Next tick is enough for the new canvas to be mounted; the previous 120 ms was a guess.+ setTimeout(() => createNodeInColumn(choice, columnId), 50)} else {createNodeInColumn(choice, columnId)}@@ -10803,6 +10810,114 @@ export function Canvas() {[setNodes, markDirty])+ // Global Kanban delegates active-project mutations to the live canvas (React Flow is+ // source of truth — direct store writes for the active project would be clobbered by the+ // next commitActiveToStore). Non-active projects write to the store and then to disk.+ // Delete uses ConfirmDialog and SSH-aware teardown (local transport.destroy vs remote+ // sshProject.killSessions with everySocket), not native confirm.+ useEffect(() => {+ const onGlobalRename = (e: CustomEvent<{ projectId: string; nodeId: string; title: string }>) => {+ renameSession(e.detail.projectId, e.detail.nodeId, e.detail.title)+ }+ const onGlobalEditSticky = (e: CustomEvent<{ projectId: string; nodeId: string; text: string }>) => {+ const { projectId, nodeId, text } = e.detail+ if (projectId === useProjects.getState().activeProjectId) {+ setNodes((ns) =>+ ns.map((n) =>+ n.id === nodeId+ ? { ...n, data: { ...n.data, text, textUpdatedAt: undefined, textUpdatedBy: undefined } }+ : n+ )+ )+ markDirty()+ } else {+ useProjects.setState((s) => ({+ projects: s.projects.map((p) =>+ p.id === projectId ? { ...p, nodes: p.nodes.map((n) => (n.id === nodeId ? { ...n, text } as never : n)) } : p+ )+ }))+ void writeDisk()+ }+ }+ const onGlobalBrowserNav = (+ e: CustomEvent<{ projectId: string; nodeId: string; patch: { url?: string; title?: string } }>+ ) => {+ const { projectId, nodeId, patch } = e.detail+ if (projectId === useProjects.getState().activeProjectId) {+ setNodes((ns) => ns.map((n) => (n.id === nodeId ? { ...n, data: { ...n.data, ...patch } } : n)))+ markDirty()+ } else {+ useProjects.setState((s) => ({+ projects: s.projects.map((p) =>+ p.id === projectId ? { ...p, nodes: p.nodes.map((n) => (n.id === nodeId ? { ...n, ...patch } as never : n)) } : p+ )+ }))+ void writeDisk()+ }+ }+ const onGlobalDelete = (e: CustomEvent<{ projectId: string; nodeId: string }>) => {+ const { projectId, nodeId } = e.detail+ if (projectId === useProjects.getState().activeProjectId) {+ deleteNodeFromKanban(nodeId)+ return+ }+ const proj = useProjects.getState().getProject(projectId)+ const label = proj?.nodes.find((n) => n.id === nodeId)?.title || 'this session'+ setConfirm({+ message: `Delete ${label}? Its terminal session will end.`,+ onConfirm: async () => {+ useProjects.setState((s) => ({+ projects: s.projects.map((p) =>+ p.id === projectId ? { ...p, nodes: p.nodes.filter((n) => n.id !== nodeId) } : p+ )+ }))+ const owner = useProjects.getState().projects.find((p) => p.id === projectId)+ const isSsh = !!owner?.ssh+ try {+ if (isSsh) {+ await (window as unknown as { nodeTerminal: { sshProject: { killSessions: (a: string, b: string[], c: unknown) => Promise<void> } } }).nodeTerminal.sshProject.killSessions(projectId, [nodeId], { everySocket: true } as never)+ } else {+ transport.destroy(nodeId)+ }+ } catch {}+ useAgentStatus.getState().remove(nodeId)+ useAgentNodes.getState().clearForParent(nodeId)+ useAgentNodes.getState().clearLoop(nodeId)+ useWebviewKeepAlive.getState().drop(nodeId)+ clearAttachConsent(nodeId)+ setConfirm(null)+ void writeDisk()+ }+ })+ }+ const onGlobalSetIcon = (e: CustomEvent<{ projectId: string; nodeId: string; icon: import('@shared/node-icon').NodeIcon | undefined }>) => {+ const { projectId, nodeId, icon } = e.detail+ if (projectId === useProjects.getState().activeProjectId) {+ setNodes((ns) => ns.map((n) => (n.id === nodeId ? { ...n, data: { ...n.data, icon } } : n)))+ markDirty()+ } else {+ useProjects.setState((s) => ({+ projects: s.projects.map((p) =>+ p.id === projectId ? { ...p, nodes: p.nodes.map((n) => (n.id === nodeId ? { ...n, icon } as never : n)) } : p+ )+ }))+ void writeDisk()+ }+ }+ window.addEventListener('nodeterm:global-rename' as never, onGlobalRename as never)+ window.addEventListener('nodeterm:global-edit-sticky' as never, onGlobalEditSticky as never)+ window.addEventListener('nodeterm:global-browser-nav' as never, onGlobalBrowserNav as never)+ window.addEventListener('nodeterm:global-delete' as never, onGlobalDelete as never)+ window.addEventListener('nodeterm:global-set-icon' as never, onGlobalSetIcon as never)+ return () => {+ window.removeEventListener('nodeterm:global-rename' as never, onGlobalRename as never)+ window.removeEventListener('nodeterm:global-edit-sticky' as never, onGlobalEditSticky as never)+ window.removeEventListener('nodeterm:global-browser-nav' as never, onGlobalBrowserNav as never)+ window.removeEventListener('nodeterm:global-delete' as never, onGlobalDelete as never)+ window.removeEventListener('nodeterm:global-set-icon' as never, onGlobalSetIcon as never)+ }+ }, [renameSession, setNodes, markDirty, writeDisk, deleteNodeFromKanban])+// Sidebar "Name with AI": generate a title from the session's captured terminal output// (same BYO-agent path as the terminal node's ✦), then apply it via renameSession.const aiNameSession = useCallback(diff --git a/src/renderer/canvas/toKanbanSessionState.test.ts b/src/renderer/canvas/toKanbanSessionState.test.tsindex 1667b20b8..6f9bdaebd 100644--- a/src/renderer/canvas/toKanbanSessionState.test.ts+++ b/src/renderer/canvas/toKanbanSessionState.test.ts@@ -31,11 +31,11 @@ describe('toKanbanSessionState', () => {expect(s.spawn.initialCommand).toBeUndefined()})- it('carries pendingLaunch.command as initialCommand', () => {+ it('does not carry pendingLaunch.command as initialCommand (DAG launch only)', () => {const s = toKanbanSessionState(base({ kind: 'terminal', pendingLaunch: { after: [], command: 'claude --resume' } }))!- expect(s.spawn.initialCommand).toBe('claude --resume')+ expect(s.spawn.initialCommand).toBeUndefined()})it('maps sticky notes with title derivation', () => {diff --git a/src/renderer/canvas/toKanbanSessionState.ts b/src/renderer/canvas/toKanbanSessionState.tsindex 5010845cc..e5185cf70 100644--- a/src/renderer/canvas/toKanbanSessionState.ts+++ b/src/renderer/canvas/toKanbanSessionState.ts@@ -41,15 +41,18 @@ export function toKanbanSessionState(n: CanvasNodeState): KanbanSession | null {}}if (n.kind !== 'terminal') return null- const pendingCommand = n.pendingLaunch?.command+ // pendingLaunch is the --after DAG launch — it must fire only when dependencies report done,+ // not when a card modal opens. Mapping it to initialCommand would fire it early. And+ // initialCommand itself is transient (not in CanvasNodeState) and is delivered by the+ // canvas TerminalNode via writeWhenShellReady after switching to the project (see create-node+ // handler), so the modal has no legitimate case to deliver it.const spawn: ModalSpawn = {shell: n.shell,cwd: n.cwd,agentId: n.agentId,accountId: n.accountId,ssh: n.ssh,- sshRemoteTmux: !!n.sshRemoteTmux,- ...(pendingCommand ? { initialCommand: pendingCommand } : {})+ sshRemoteTmux: !!n.sshRemoteTmux}return {id: n.id,diff --git a/src/renderer/components/TabBar.tsx b/src/renderer/components/TabBar.tsxindex ac1ce8abf..41ac4506b 100644--- a/src/renderer/components/TabBar.tsx+++ b/src/renderer/components/TabBar.tsx@@ -381,9 +381,7 @@ export function TabBar({if (omni && asDefault) {vm.toggleGlobalKanban()} else {- // Per-project board for this tab (also closes an open per-project board)- if (viewFor(vm, p.id) === 'kanban') vm.toggle(p.id)- else vm.toggle(p.id)+ vm.toggle(p.id)}}}>diff --git a/src/renderer/components/kanban/GlobalKanbanView.tsx b/src/renderer/components/kanban/GlobalKanbanView.tsxindex 10db3355c..f01b9e4b8 100644--- a/src/renderer/components/kanban/GlobalKanbanView.tsx+++ b/src/renderer/components/kanban/GlobalKanbanView.tsx@@ -22,6 +22,7 @@ import { useBoardLog } from '../../state/boardLog'import { boardLogEvents } from '../../lib/boardLogDiff'import { markWorkspaceDirty } from '../../state/workspaceDirty'import type { KanbanCreateChoice, KanbanSession } from './KanbanView'+import type { NodeIcon } from '@shared/node-icon'/*** Global (Omni) Kanban overview — one swimlane per open project.@@ -56,12 +57,13 @@ interface SwimlaneProps {onRenameNode: (nodeId: string, title: string) => voidonEditSticky: (projectId: string, nodeId: string, text: string) => voidonBrowserNav: (projectId: string, nodeId: string, patch: { url?: string; title?: string }) => void+ onSetIcon: (projectId: string, nodeId: string, icon: NodeIcon | undefined) => voidonModalChange: (nodeId: string | null) => voidhighlight?: boolean}const Swimlane = memo(function Swimlane({- projectId, projectName, projectColor, board, sessions, onChangeBoard, onOpenNode, onCreateNode, onDeleteNode, onRenameNode, onEditSticky, onBrowserNav, onModalChange, highlight+ projectId, projectName, projectColor, board, sessions, onChangeBoard, onOpenNode, onCreateNode, onDeleteNode, onRenameNode, onEditSticky, onBrowserNav, onSetIcon, onModalChange, highlight}: SwimlaneProps) {const dragRef = useRef<{ kind: 'column'; id: string } | { kind: 'card'; id: string } | null>(null)const [modalNodeId, setModalNodeId] = useState<string | null>(null)@@ -277,6 +279,7 @@ const Swimlane = memo(function Swimlane({onRename={(t) => onRenameNode(modalNodeId, t)}onEditSticky={(t) => onEditSticky(projectId, modalNodeId, t)}onBrowserNav={(patch) => onBrowserNav(projectId, modalNodeId, patch)}+ onSetIcon={(icon) => onSetIcon(projectId, modalNodeId, icon)}/>)}</div>@@ -290,6 +293,7 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {const highlightId = useViewMode(s => s.highlightedSwimlaneId)const setHighlightId = useViewMode(s => s.setHighlightedSwimlaneId)const containerRef = useRef<HTMLDivElement>(null)+ const mod = typeof navigator !== 'undefined' && /Mac/i.test(navigator.platform) ? 'Cmd' : 'Ctrl'const jumpTo = useCallback((projectId: string) => {document.getElementById(`swimlane-${projectId}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' })@@ -328,31 +332,27 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {}, [])const onDeleteNode = useCallback((projectId: string, nodeId: string) => {- const proj = useProjects.getState().getProject(projectId)- const label = proj?.nodes.find(n => n.id === nodeId)?.title || 'this session'- if (!confirm(`Delete ${label}? Its terminal session will end.`)) return- useProjects.setState(s => ({ projects: s.projects.map(p => p.id === projectId ? { ...p, nodes: p.nodes.filter(n => n.id !== nodeId) } : p) }))- markWorkspaceDirty()- // best-effort kill tmux session (works for local and remote via api)- try { (api as unknown as { pty: { destroy: (id: string) => void } }).pty.destroy(nodeId as never) } catch {}- try { (window as unknown as { nodeTerminal?: { pty: { destroy: (id: string) => void } } }).nodeTerminal?.pty.destroy(nodeId) } catch {}- }, [api])+ // Delegate to Canvas — it shows ConfirmDialog, handles agent-status teardown, and routes+ // SSH kills via lib/sessionKill (local pty.destroy only touches local sockets).+ window.dispatchEvent(new CustomEvent('nodeterm:global-delete', { detail: { projectId, nodeId } }))+ }, [])const onRenameNode = useCallback((nodeId: string, title: string) => {- // find owning projectconst proj = useProjects.getState().projects.find(p => p.nodes.some(n => n.id === nodeId))if (!proj) return- useProjects.setState(s => ({ projects: s.projects.map(p => p.id === proj.id ? { ...p, nodes: p.nodes.map(n => n.id === nodeId ? { ...n, title, titleAuto: false } : n) } : p) }))+ window.dispatchEvent(new CustomEvent('nodeterm:global-rename', { detail: { projectId: proj.id, nodeId, title } }))}, [])const onEditSticky = useCallback((projectId: string, nodeId: string, text: string) => {- useProjects.setState(s => ({ projects: s.projects.map(p => p.id === projectId ? { ...p, nodes: p.nodes.map(n => n.id === nodeId ? { ...n, text } as never : n) } : p) }))- markWorkspaceDirty()+ window.dispatchEvent(new CustomEvent('nodeterm:global-edit-sticky', { detail: { projectId, nodeId, text } }))}, [])const onBrowserNav = useCallback((projectId: string, nodeId: string, patch: { url?: string; title?: string }) => {- useProjects.setState(s => ({ projects: s.projects.map(p => p.id === projectId ? { ...p, nodes: p.nodes.map(n => n.id === nodeId ? { ...n, ...patch } as never : n) } : p) }))- markWorkspaceDirty()+ window.dispatchEvent(new CustomEvent('nodeterm:global-browser-nav', { detail: { projectId, nodeId, patch } }))+ }, [])++ const onSetIcon = useCallback((projectId: string, nodeId: string, icon: NodeIcon | undefined) => {+ window.dispatchEvent(new CustomEvent('nodeterm:global-set-icon', { detail: { projectId, nodeId, icon } }))}, [])const onOpenNode = useCallback((nodeId: string, _projectId: string) => {@@ -375,10 +375,10 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {<div className="kanban-overlay global-kanban" ref={containerRef}><div className="kanban-header"><span className="kanban-header__name">All Projects</span>- <span className="kanban-swimlane__hint">{projects.length} projects — Cmd+1..{Math.min(9, projects.length)} to jump</span>+ <span className="kanban-swimlane__hint">{projects.length} projects — {mod}+1..{Math.min(9, projects.length)} to jump</span><buttonclassName="kanban-header__close"- title="Back to canvas (Cmd+Shift+B)"+ title={`Back to canvas (${mod}+Shift+B)`}onClick={() => useViewMode.getState().toggleGlobalKanban()}>✕@@ -403,6 +403,7 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {onRenameNode={onRenameNode}onEditSticky={onEditSticky}onBrowserNav={onBrowserNav}+ onSetIcon={onSetIcon}onModalChange={id => { modalRef.current = id }}highlight={highlightId === p.id}/>diff --git a/src/renderer/components/kanban/ModalTerminal.tsx b/src/renderer/components/kanban/ModalTerminal.tsxindex 711bbb389..764e0ee6d 100644--- a/src/renderer/components/kanban/ModalTerminal.tsx+++ b/src/renderer/components/kanban/ModalTerminal.tsx@@ -330,17 +330,6 @@ export function ModalTerminal({ nodeId, spawn, searchOpen, onCloseSearch }: Modaterm.write('\r\n\x1b[90m[session ended]\x1b[0m\r\n')))- // For a fresh session created from the global swimlane kanban (or any card modal- // that is the first spawner), the one-shot initialCommand must be delivered here —- // the canvas TerminalNode that normally does this never mounted for non-active- // projects, so the modal is the first and only client. Without this, an opencode- // card would open as an empty shell and immediately appear to close.- if (res.fresh && spawn.initialCommand) {- // Small delay to let the shell initialize, matching TerminalNode's writeWhenShellReady- setTimeout(() => {- if (!dead && sessionId) transport.write(sessionId, spawn.initialCommand + '\r')- }, 300)- }// The pty runs at the SMALLEST subscriber's grid; render exactly what it tells us and letterbox// the rest (the canvas node votes independently — the modal's smaller pane may shrink it).if (transport.onSize)diff --git a/src/renderer/state/viewMode.ts b/src/renderer/state/viewMode.tsindex f14f88e46..8a41a1d82 100644--- a/src/renderer/state/viewMode.ts+++ b/src/renderer/state/viewMode.ts@@ -1,5 +1,6 @@import { create } from 'zustand'import { readLocal, writeLocal } from '../lib/localStore'+import { useSettings } from './settings'// Which view each project shows (canvas or kanban) — PERSONAL, per machine: persisted in// localStorage, deliberately never in the git-shared .nodeterm/project.json (spec rule).@@ -134,10 +135,10 @@ export function isKanbanOpen(projectId: string): boolean {*/export function isGlobalKanbanOpen(): boolean {try {- // Lazy import to avoid circular init — viewMode is imported by settings consumers.- // eslint-disable-next-line @typescript-eslint/no-require-imports- const settings = (require('./settings') as typeof import('./settings')).useSettings.getState().settings as { omniKanbanEnabled?: boolean }- if (!isOmniKanbanEnabled(settings)) return false- } catch { /* settings store not ready — treat as enabled */ }+ if (!isOmniKanbanEnabled(useSettings.getState().settings)) return false+ } catch {+ // Fail closed — default OFF, so an unreadable settings store must not enable Omni.+ return false+ }return useViewMode.getState().globalKanban}diff --git a/src/shared/keybindings.test.ts b/src/shared/keybindings.test.tsindex 5c51732dd..5b6092b91 100644--- a/src/shared/keybindings.test.ts+++ b/src/shared/keybindings.test.ts@@ -80,6 +80,8 @@ describe('registry invariants', () => {darwin: ['Cmd+Slash'], other: ['Cmd+Slash'], allowInTerminal: true },{ id: 'view.kanbanToggle', title: 'Toggle kanban board', group: 'General', scope: 'app',darwin: ['Cmd+Shift+B'], other: ['Cmd+Shift+B'], allowInTerminal: true },+ { id: 'view.globalKanbanToggle', title: 'Toggle global kanban (Omni)', group: 'General', scope: 'app',+ darwin: [], other: [], allowInTerminal: true },{ id: 'view.focusMode', title: 'Toggle focus mode', group: 'General', scope: 'canvas',darwin: ['Cmd+Shift+F'], other: ['Cmd+Shift+F'], allowInTerminal: true },{ id: 'panel.explorer', title: 'Toggle explorer panel', group: 'General', scope: 'app',