Skip to content

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.

fix(kanban): "go to node" opens the CARD while the board is up

enes401ec034a06b
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index 3517aedcc..195c57b90 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -450,13 +450,18 @@ function StatusAwareMiniMap({ onNodeDoubleClick }: { onNodeDoubleClick: (node: N
[onNodeDoubleClick]
)
// Status language matches the canvas glows/badges: amber = working, red = needs you,
- // accent blue = unread. The classes below add the minimap-scale glow/pulse (styles.css).
+ // clay = unread. The classes below add the minimap-scale glow/pulse (styles.css).
+ //
+ // Unread is CLAY (#d97757) — the agent-hook colour the RUNNING badge and the node's working glow
+ // already use — and not the accent blue it used to be: blue is also the fallback stroke for a
+ // node that carries no colour of its own, so "finished while you were away" was painted the
+ // exact shade as "nothing to report" and vanished into the map.
const nodeStrokeColor = useCallback(
(n: Node): string => {
const st = statusById[n.id]
if (st?.state === 'working') return '#ffd60a'
if (st?.state === 'waiting' || st?.state === 'blocked') return '#ff453a'
- if (st?.unread) return '#0a84ff'
+ if (st?.unread) return '#d97757'
return (n.data as { color?: string })?.color ?? '#0a84ff'
},
[statusById]
@@ -1428,8 +1433,14 @@ export function Canvas() {
pendingFocusRef.current = null
const node = nodesRef.current.find((n) => n.id === pending)
if (node) {
- setNodes((ns) => ns.map((n) => ({ ...n, selected: n.id === pending })))
- goToNode(node)
+ // Same rule as focusNodeById: if the project we just landed on shows the BOARD, the
+ // node lives on a card, not on the canvas hidden under it.
+ if (isKanbanOpen(useProjects.getState().activeProjectId)) {
+ useViewMode.getState().requestCard(pending)
+ } else {
+ setNodes((ns) => ns.map((n) => ({ ...n, selected: n.id === pending })))
+ goToNode(node)
+ }
useAgentStatus.getState().setActive(pending, true)
useAgentStatus.getState().clearUnread(pending)
}
@@ -4813,6 +4824,15 @@ export function Canvas() {
(nodeId: string) => {
const node = nodesRef.current.find((n) => n.id === nodeId)
if (node) {
+ // The board is a full-page overlay: framing the node on the canvas underneath it is
+ // invisible, which is why the notch's Go (and every other "go to node" path) read as
+ // broken there. On the board, "go to" means OPEN THE CARD.
+ if (isKanbanOpen(useProjects.getState().activeProjectId)) {
+ useViewMode.getState().requestCard(nodeId)
+ useAgentStatus.getState().setActive(nodeId, true)
+ useAgentStatus.getState().clearUnread(nodeId)
+ return
+ }
setNodes((ns) => ns.map((n) => ({ ...n, selected: n.id === nodeId })))
goToNode(node)
// Mark this node as the one being watched, so an agent still producing output does not
diff --git a/src/renderer/components/kanban/KanbanView.tsx b/src/renderer/components/kanban/KanbanView.tsx
index 98b4ff202..9fb7a8289 100644
--- a/src/renderer/components/kanban/KanbanView.tsx
+++ b/src/renderer/components/kanban/KanbanView.tsx
@@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from 'react'
import type { ProjectKanban } from '@shared/types'
import { AGENT_CONFIG, BUILTIN_AGENT_IDS, type AgentId } from '@shared/agents/config'
import { useAgentStatus } from '../../state/agentStatus'
+import { useViewMode } from '../../state/viewMode'
import { useProjects } from '../../state/projects'
import { useSettings } from '../../state/settings'
import {
@@ -88,6 +89,14 @@ export function KanbanView({
if (modalNodeId) useAgentStatus.getState().clearUnread(modalNodeId)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [modalNodeId])
+ // Someone asked for a card while the board is up (notch Go, a notification, ⌘K…). Open it here
+ // instead of framing the node on the canvas nobody can see under this overlay.
+ const requestedCardNodeId = useViewMode((s) => s.requestedCardNodeId)
+ useEffect(() => {
+ if (!requestedCardNodeId) return
+ setModalNodeId(requestedCardNodeId)
+ useViewMode.getState().clearCardRequest()
+ }, [requestedCardNodeId])
const statusById = useAgentStatus((s) => s.byId)
// Primitive selectors (not one object) — an object selector would re-render on every store set.
const projectName = useProjects((s) => s.projects.find((p) => p.id === s.activeProjectId)?.name)
diff --git a/src/renderer/state/viewMode.test.ts b/src/renderer/state/viewMode.test.ts
index d00b5cd08..058bf29af 100644
--- a/src/renderer/state/viewMode.test.ts
+++ b/src/renderer/state/viewMode.test.ts
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
-import { parseViewMap, useViewMode } from './viewMode'
+import { parseViewMap, useViewMode, isKanbanOpen } from './viewMode'
describe('parseViewMap', () => {
it('keeps only kanban entries, tolerates garbage', () => {
@@ -18,3 +18,28 @@ describe('toggle', () => {
expect(useViewMode.getState().viewByProject.p1).toBeUndefined()
})
})
+
+describe('card requests (board-aware "go to node")', () => {
+ it('carries a one-shot request the board consumes', () => {
+ useViewMode.setState({ requestedCardNodeId: null })
+ useViewMode.getState().requestCard('term-1')
+ expect(useViewMode.getState().requestedCardNodeId).toBe('term-1')
+ useViewMode.getState().clearCardRequest()
+ expect(useViewMode.getState().requestedCardNodeId).toBeNull()
+ // Re-requesting the SAME node must work — it is a fresh "go to", not a state to dedupe.
+ useViewMode.getState().requestCard('term-1')
+ expect(useViewMode.getState().requestedCardNodeId).toBe('term-1')
+ })
+
+ it('a view toggle drops an unconsumed request', () => {
+ useViewMode.setState({ viewByProject: {}, requestedCardNodeId: null })
+ useViewMode.getState().toggle('p9')
+ expect(isKanbanOpen('p9')).toBe(true)
+ useViewMode.getState().requestCard('term-2')
+ // Leaving the board: the request belonged to the view we just left; firing it later would
+ // pop a card open out of nowhere.
+ useViewMode.getState().toggle('p9')
+ expect(isKanbanOpen('p9')).toBe(false)
+ expect(useViewMode.getState().requestedCardNodeId).toBeNull()
+ })
+})
diff --git a/src/renderer/state/viewMode.ts b/src/renderer/state/viewMode.ts
index 145a2d103..bbb8a9a2c 100644
--- a/src/renderer/state/viewMode.ts
+++ b/src/renderer/state/viewMode.ts
@@ -30,6 +30,18 @@ function save(v: Record<string, 'kanban'>): void {
interface ViewModeState {
viewByProject: Record<string, 'kanban'>
toggle(projectId: string): 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
+ * all funnel through `focusNodeById`, which frames the node on the CANVAS; with the board's
+ * opaque overlay on top, that looked like the button did nothing at all (field report: "kanban
+ * view'de notch'ın Go tuşu işe yaramıyor").
+ *
+ * KanbanView consumes it and clears it (one-shot, so re-requesting the same node works).
+ */
+ requestedCardNodeId: string | null
+ requestCard(nodeId: string): void
+ clearCardRequest(): void
}
export const useViewMode = create<ViewModeState>((set) => ({
@@ -37,13 +49,18 @@ export const useViewMode = create<ViewModeState>((set) => ({
viewByProject: parseViewMap(
typeof localStorage === 'undefined' ? null : localStorage.getItem(PROJECT_VIEW_KEY)
),
+ requestedCardNodeId: null,
+ requestCard: (nodeId) => set({ requestedCardNodeId: nodeId }),
+ clearCardRequest: () => set({ requestedCardNodeId: null }),
toggle: (projectId) =>
set((s) => {
const next = { ...s.viewByProject }
if (next[projectId]) delete next[projectId]
else next[projectId] = 'kanban'
if (typeof localStorage !== 'undefined') save(next)
- return { viewByProject: next }
+ // Leaving the board (or entering it) drops any unconsumed request — it belonged to the view
+ // the user just left, and firing it later would pop a card out of nowhere.
+ return { viewByProject: next, requestedCardNodeId: null }
})
}))
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index fe6278a8e..f6bbfad34 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -4989,9 +4989,23 @@ body,
filter: drop-shadow(0 0 3px rgba(255, 69, 58, 0.9));
animation: mm-pulse 1.8s ease-in-out infinite;
}
+/* Unread = clay, the agent-hook colour (RUNNING badge, working glow). Its own keyframes: at
+ minimap scale a node is a few pixels tall, so opacity alone reads as a faint flicker — the
+ stroke THICKENS on the beat as well, which is what makes it findable on a busy map. */
.minimap .mm-unread {
- filter: drop-shadow(0 0 3px rgba(10, 132, 255, 0.9));
- animation: mm-pulse 2s ease-in-out infinite;
+ filter: drop-shadow(0 0 4px rgba(217, 119, 87, 0.95));
+ animation: mm-pulse-unread 1.6s ease-in-out infinite;
+}
+@keyframes mm-pulse-unread {
+ 0%,
+ 100% {
+ stroke-opacity: 0.3;
+ stroke-width: 3px;
+ }
+ 50% {
+ stroke-opacity: 1;
+ stroke-width: 6px;
+ }
}
@keyframes mm-pulse {
0%,