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): collapse project swimlanes
Alex585319e68c5f
diff --git a/src/renderer/components/kanban/GlobalKanbanView.test.tsx b/src/renderer/components/kanban/GlobalKanbanView.test.tsxnew file mode 100644index 000000000..bb16463e4--- /dev/null+++ b/src/renderer/components/kanban/GlobalKanbanView.test.tsx@@ -0,0 +1,15 @@+import fs from 'fs'+import path from 'path'+import { describe, expect, it } from 'vitest'++const GLOBAL_KANBAN_SRC = fs.readFileSync(path.join(__dirname, 'GlobalKanbanView.tsx'), 'utf8')++describe('global kanban swimlane collapse wiring', () => {+ it('toggles the lane body from its header', () => {+ expect(GLOBAL_KANBAN_SRC).toContain('const [collapsed, setCollapsed] = useState(false)')+ expect(GLOBAL_KANBAN_SRC).toContain('onClick={toggleCollapsed}')+ expect(GLOBAL_KANBAN_SRC).toContain('aria-expanded={!collapsed}')+ expect(GLOBAL_KANBAN_SRC).toContain('setCollapsed((value) => !value)')+ expect(GLOBAL_KANBAN_SRC).toContain('{!collapsed && (')+ })+})diff --git a/src/renderer/components/kanban/GlobalKanbanView.tsx b/src/renderer/components/kanban/GlobalKanbanView.tsxindex aafad26ea..56ab6f245 100644--- a/src/renderer/components/kanban/GlobalKanbanView.tsx+++ b/src/renderer/components/kanban/GlobalKanbanView.tsx@@ -48,6 +48,7 @@ const Swimlane = memo(function Swimlane({const [modalNodeId, setModalNodeId] = useState<string | null>(null)const [cardMenu, setCardMenu] = useState<{ x: number; y: number; nodeId: string } | null>(null)const [labelFilter, setLabelFilter] = useState<string[]>([])+ const [collapsed, setCollapsed] = useState(false)const customAgents = useSettings((s) => s.settings.customAgents)const disabledAgents = useSettings((s) => s.settings.disabledAgents)@@ -184,49 +185,65 @@ const Swimlane = memo(function Swimlane({]}- const jumpToSelf = () => {+ const toggleCollapsed = () => {document.getElementById(`swimlane-${projectId}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' })useViewMode.getState().setHighlightedSwimlaneId(projectId)+ setCollapsed((value) => !value)}return (<divid={`swimlane-${projectId}`}- className={`kanban-swimlane${highlight ? ' kanban-swimlane--highlight' : ''}`}+ className={`kanban-swimlane${highlight ? ' kanban-swimlane--highlight' : ''}${collapsed ? ' kanban-swimlane--collapsed' : ''}`}style={{ ['--swimlane-color' as string]: projectColor || 'rgba(128,128,128,0.3)' }}>- <div className="kanban-swimlane__header" onClick={jumpToSelf} title="Zum Anfang dieser Swimlane springen">+ <div+ className="kanban-swimlane__header"+ role="button"+ tabIndex={0}+ aria-expanded={!collapsed}+ onClick={toggleCollapsed}+ onKeyDown={(event) => {+ if (event.key !== 'Enter' && event.key !== ' ') return+ event.preventDefault()+ toggleCollapsed()+ }}+ title={collapsed ? 'Expand swimlane' : 'Collapse swimlane'}+ >+ <span className="kanban-swimlane__toggle" aria-hidden="true">{collapsed ? '▸' : '▾'}</span><span className="kanban-header__dot" style={{ background: projectColor || '#444' }} /><span className="kanban-header__name">{projectName}</span><span className="kanban-swimlane__count">{sessions.length} sessions</span></div>- <div className="kanban-board kanban-swimlane__board">- <div className="kanban-board__columns">- <KanbanColumn- column={null}- lanes={lanesFor(null)}- createOptions={createOptions}- onCreate={(choice, colId) => onCreateNode(projectId, choice, colId)}- onDragEnd={handleDragEnd}- onDropOnColumn={dropOnColumn}- />- {board.columns.map(col => (+ {!collapsed && (+ <div className="kanban-board kanban-swimlane__board">+ <div className="kanban-board__columns"><KanbanColumn- key={col.id}- column={col}- lanes={lanesFor(col.id)}- onRename={(id, t) => commit(renameColumn(board, id, t))}- onRecolor={(id, c) => commit(recolorColumn(board, id, c))}- onDelete={(id) => commit(deleteColumn(board, id))}+ column={null}+ lanes={lanesFor(null)}createOptions={createOptions}onCreate={(choice, colId) => onCreateNode(projectId, choice, colId)}- onColumnDragStart={handleColumnDragStart}onDragEnd={handleDragEnd}onDropOnColumn={dropOnColumn}/>- ))}- <button className="kanban-add-col" onClick={() => commit(addColumn(board, 'New column', nextColumnColor(board)))}>+ Add column</button>+ {board.columns.map(col => (+ <KanbanColumn+ key={col.id}+ column={col}+ lanes={lanesFor(col.id)}+ onRename={(id, t) => commit(renameColumn(board, id, t))}+ onRecolor={(id, c) => commit(recolorColumn(board, id, c))}+ onDelete={(id) => commit(deleteColumn(board, id))}+ createOptions={createOptions}+ onCreate={(choice, colId) => onCreateNode(projectId, choice, colId)}+ onColumnDragStart={handleColumnDragStart}+ onDragEnd={handleDragEnd}+ onDropOnColumn={dropOnColumn}+ />+ ))}+ <button className="kanban-add-col" onClick={() => commit(addColumn(board, 'New column', nextColumnColor(board)))}>+ Add column</button>+ </div></div>- </div>+ )}{cardMenu && byId.has(cardMenu.nodeId) && (<ContextMenu x={cardMenu.x} y={cardMenu.y} zIndex={60} items={cardMenuItems(cardMenu.nodeId)} onClose={() => setCardMenu(null)} />)}diff --git a/src/renderer/nodes/TerminalNode.global-kanban.test.ts b/src/renderer/nodes/TerminalNode.global-kanban.test.tsnew file mode 100644index 000000000..3de32bb65--- /dev/null+++ b/src/renderer/nodes/TerminalNode.global-kanban.test.ts@@ -0,0 +1,18 @@+import fs from 'fs'+import path from 'path'+import { describe, expect, it } from 'vitest'++const TERMINAL_SRC = fs.readFileSync(path.join(__dirname, 'TerminalNode.tsx'), 'utf8')++describe('TerminalNode global kanban sizing', () => {+ it('parks the canvas size vote while the global kanban overlay is open', () => {+ const start = TERMINAL_SRC.indexOf('const boardOpen = useViewMode(')+ const end = TERMINAL_SRC.indexOf('const boardOpenRef', start)+ const boardOpen = TERMINAL_SRC.slice(start, end)++ // The modal is a co-attached viewer. If the hidden canvas node keeps voting, the PTY uses its+ // smaller grid (usually 80 columns) instead of the visible modal's measured width.+ expect(boardOpen).toContain('s.globalKanban')+ expect(boardOpen).toContain('omniKanbanEnabled')+ })+})diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsxindex 5bfcf110c..cec97bc44 100644--- a/src/renderer/nodes/TerminalNode.tsx+++ b/src/renderer/nodes/TerminalNode.tsx@@ -1125,8 +1125,11 @@ export function TerminalNode({// an agent's input box off the bottom. So while the board is up we report "not viewing" (null),// exactly like a park, and the visible modal drives the shared grid. A node only ever lives in the// ACTIVE project's React Flow, so the active project's view is the one that matters.+ const omniKanbanEnabled = useSettings((s) => s.settings.omniKanbanEnabled !== false)const boardOpen = useViewMode(- (s) => viewFor(s, useProjects.getState().activeProjectId ?? '') === 'kanban'+ (s) =>+ (omniKanbanEnabled && s.globalKanban) ||+ viewFor(s, useProjects.getState().activeProjectId ?? '') === 'kanban')const boardOpenRef = useRef(boardOpen)const dwellRef = useRef<ReturnType<typeof setTimeout> | null>(null)diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex f5c946dce..b9d4f373b 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -8798,6 +8798,17 @@ button.group-node__setup:disabled {.kanban-swimlane__header:hover {background: rgba(var(--tint-rgb), 0.06);}+.kanban-swimlane__header:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: -2px;+}+.kanban-swimlane__toggle {+ width: 12px;+ color: rgba(var(--tint-rgb), 0.55);+ font-size: 12px;+ text-align: center;+ flex: 0 0 12px;+}.kanban-swimlane__count {margin-left: auto;font-size: 11px;