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(kanban): highlight top project tab on Cmd+1 or click in global overview
Alexa248be34fa8a
diff --git a/src/renderer/components/TabBar.tsx b/src/renderer/components/TabBar.tsxindex 0caa87c37..78c3f7ded 100644--- a/src/renderer/components/TabBar.tsx+++ b/src/renderer/components/TabBar.tsx@@ -1,7 +1,7 @@import { useEffect, useMemo, useRef, useState } from 'react'import { createPortal } from 'react-dom'import { useProjects } from '../state/projects'-import { isGlobalKanbanOpen, useViewMode, viewFor } from '../state/viewMode'+import { useViewMode, viewFor } from '../state/viewMode'import { useAgentStatus } from '../state/agentStatus'import { useSettings } from '../state/settings'import { accountsForProject, sshAccountsHint, systemAccountDisplay } from '../state/workspace'@@ -88,7 +88,10 @@ export function TabBar({const projects = useMemo(() => allProjects.filter((p) => !p.closed), [allProjects])const activeId = useProjects((s) => s.activeProjectId)const omniEnabled = useSettings((s) => s.settings.omniKanbanEnabled !== false)+ const globalKanban = useViewMode((s) => s.globalKanban)+ const isGlobal = omniEnabled && globalKanbanconst kanbanActive = useViewMode((s) => (omniEnabled && s.globalKanban) || (!!activeId && viewFor(s, activeId) === 'kanban'))+ const highlightedId = useViewMode((s) => s.highlightedSwimlaneId)// Unread dots need only the unread id set — subscribing to the whole status map re-rendered// the TabBar on every working/waiting flip of any agent. Primitive signature → rare updates.const unreadIds = useAgentStatus((s) => {@@ -251,7 +254,7 @@ export function TabBar({}}>{projects.map((p) => {- const active = p.id === activeId+ const active = isGlobal ? (highlightedId ? p.id === highlightedId : p.id === activeId) : p.id === activeIdconst unreadCount = p.nodes.filter((n) => unreadSet.has(n.id)).lengthreturn (<div@@ -289,7 +292,7 @@ export function TabBar({if (editingId) return// In global swimlane overview, clicking the top project tab jumps to its// swimlane instead of switching the canvas project (analog zu Cmd+1..9).- if (isGlobalKanbanOpen()) {+ if (isGlobal) {window.dispatchEvent(new CustomEvent('nodeterm:swimlane-jump', { detail: { projectId: p.id } }))return}diff --git a/src/renderer/components/kanban/GlobalKanbanView.tsx b/src/renderer/components/kanban/GlobalKanbanView.tsxindex 8eee4e93c..fb8285ea2 100644--- a/src/renderer/components/kanban/GlobalKanbanView.tsx+++ b/src/renderer/components/kanban/GlobalKanbanView.tsx@@ -250,14 +250,15 @@ export const GlobalKanbanView = memo(function GlobalKanbanView() {const projects = useProjects(s => s.projects.filter(p => !p.closed))const { api } = useSession()const modalRef = useRef<string | null>(null)- const [highlightId, setHighlightId] = useState<string | null>(null)+ const highlightId = useViewMode(s => s.highlightedSwimlaneId)+ const setHighlightId = useViewMode(s => s.setHighlightedSwimlaneId)const containerRef = useRef<HTMLDivElement>(null)const jumpTo = useCallback((projectId: string) => {document.getElementById(`swimlane-${projectId}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' })setHighlightId(projectId)setTimeout(() => setHighlightId(null), 1500)- }, [])+ }, [setHighlightId])// Expose scroll-to-swimlane for Cmd+1..9useEffect(() => {diff --git a/src/renderer/state/viewMode.ts b/src/renderer/state/viewMode.tsindex d5712d1a4..ae87154b9 100644--- a/src/renderer/state/viewMode.ts+++ b/src/renderer/state/viewMode.ts@@ -43,6 +43,9 @@ interface ViewModeState {/** Global swimlane overview — when true, kanban shows all projects as swimlanes instead of per-project tabs. */globalKanban: booleantoggleGlobalKanban(): void+ /** Which swimlane is currently highlighted in the global overview (jump target). */+ highlightedSwimlaneId: string | null+ setHighlightedSwimlaneId(id: string | null): void/*** A node whose CARD should be opened on the board, set by anything that "goes to" a node while* the board is up — the notch HUD's Go, a notification click, ⌘K, the sessions sidebar. Those@@ -76,6 +79,8 @@ export const useViewMode = create<ViewModeState>((set) => ({viewByProject: parseViewMap(readLocal(PROJECT_VIEW_KEY)),defaultView: 'canvas',globalKanban: readGlobalKanban(),+ highlightedSwimlaneId: null,+ setHighlightedSwimlaneId: (id) => set({ highlightedSwimlaneId: id }),setDefaultView: (v) => set((s) => (s.defaultView === v ? s : { defaultView: v })),requestedCardNodeId: null,requestCard: (nodeId) => set({ requestedCardNodeId: nodeId }),@@ -97,7 +102,7 @@ export const useViewMode = create<ViewModeState>((set) => ({set((s) => {const next = !s.globalKanbansaveGlobalKanban(next)- return { globalKanban: next, requestedCardNodeId: null }+ return { globalKanban: next, requestedCardNodeId: null, highlightedSwimlaneId: null }})}))