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.

feat(kanban): header chat icon becomes comments — right flyout on the node, default-open panel toggle in the modal

enese18d9989a7dc
diff --git a/src/renderer/components/kanban/BoardLogPanel.tsx b/src/renderer/components/kanban/BoardLogPanel.tsx
index 49e99091d..2e20f7888 100644
--- a/src/renderer/components/kanban/BoardLogPanel.tsx
+++ b/src/renderer/components/kanban/BoardLogPanel.tsx
@@ -7,8 +7,10 @@ import { useBoardLog } from '../../state/boardLog'
import type { KanbanSession } from './KanbanView'
interface BoardLogPanelProps {
- /** The card whose activity this panel shows — feed + composer are scoped to `card.id`. */
- card: KanbanSession
+ /** The card/node whose activity this panel shows — feed + composer are scoped to `card.id`.
+ * Only the id is needed, so the canvas node flyout can use this panel without building a
+ * full KanbanSession. */
+ card: Pick<KanbanSession, 'id'>
}
/** Human one-liner for an activity event. column-* events carry no nodeId and so never reach a
diff --git a/src/renderer/components/kanban/CardModal.tsx b/src/renderer/components/kanban/CardModal.tsx
index c235965e8..a4a76889f 100644
--- a/src/renderer/components/kanban/CardModal.tsx
+++ b/src/renderer/components/kanban/CardModal.tsx
@@ -2,7 +2,6 @@ import { useEffect, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
import { isTopDialog, nextDialogId, popDialog, pushDialog } from '../dialog-stack'
import { IconChat, IconMic, IconSearch } from '../icons'
-import { renderMarkdown } from '../../lib/markdown'
import { useSession } from '../../session/session'
import type { KanbanSession } from './KanbanView'
import { BoardLogPanel } from './BoardLogPanel'
@@ -33,8 +32,8 @@ export function CardModal({ session, columnTitle, onClose, onOpenCanvas, onRenam
const [title, setTitle] = useState(session.title)
const [searchOpen, setSearchOpen] = useState(false)
const [naming, setNaming] = useState(false)
- // Markdown view of the captured output (the node's ⌘M, modal edition): null = terminal.
- const [mdHtml, setMdHtml] = useState<string | null>(null)
+ // Comments & activity panel: OPEN by default in the modal; the header 💬 collapses it.
+ const [panelOpen, setPanelOpen] = useState(true)
const isTerminal = session.kind === 'terminal'
const nameWithAi = async () => {
@@ -43,15 +42,6 @@ export function CardModal({ session, columnTitle, onClose, onOpenCanvas, onRenam
setNaming(false)
if (r.ok) onRename(r.message)
}
-
- const toggleMd = async () => {
- if (mdHtml !== null) {
- setMdHtml(null)
- return
- }
- const captured = await api.pty.capture(session.id, true)
- setMdHtml(renderMarkdown(captured || ''))
- }
// Ref mirror: the capture-phase listener below closes over stale state otherwise.
const editingTitleRef = useRef(false)
useEffect(() => {
@@ -144,16 +134,16 @@ export function CardModal({ session, columnTitle, onClose, onOpenCanvas, onRenam
>
{naming ? '…' : '✦'}
</button>
- <button
- className="kanban-modal__action"
- title="Markdown view of the output"
- aria-pressed={mdHtml !== null}
- onClick={toggleMd}
- >
- <IconChat />
- </button>
</>
)}
+ <button
+ className="kanban-modal__action"
+ title={panelOpen ? 'Hide comments & activity' : 'Show comments & activity'}
+ aria-pressed={panelOpen}
+ onClick={() => setPanelOpen((v) => !v)}
+ >
+ <IconChat />
+ </button>
<button className="kanban-modal__action" title="Open on canvas" onClick={onOpenCanvas}>
↗
</button>
@@ -177,25 +167,20 @@ export function CardModal({ session, columnTitle, onClose, onOpenCanvas, onRenam
// A live SECOND client on the node's session — keyed by node id so switching cards
// remounts a fresh viewer. Chat has no PTY; it opens on the canvas. The markdown
// view OVERLAYS the terminal (kept mounted — its viewer must not detach/re-seed).
- <>
- <ModalTerminal
- key={session.id}
- nodeId={session.id}
- spawn={session.spawn}
- searchOpen={searchOpen}
- onCloseSearch={() => setSearchOpen(false)}
- />
- {mdHtml !== null && (
- <div className="kanban-modal__md" dangerouslySetInnerHTML={{ __html: mdHtml }} />
- )}
- </>
+ <ModalTerminal
+ key={session.id}
+ nodeId={session.id}
+ spawn={session.spawn}
+ searchOpen={searchOpen}
+ onCloseSearch={() => setSearchOpen(false)}
+ />
) : (
<div className="kanban-modal__placeholder">Chat sessions open on the canvas.</div>
)}
</div>
)}
</div>
- <BoardLogPanel card={session} />
+ {panelOpen && <BoardLogPanel card={session} />}
</div>
</div>
</div>,
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index 099e56ce4..d34a26463 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -73,6 +73,7 @@ import { ensureActivePermissionMode } from '../state/permissionMode'
import { buildSshArgs, type SshConnection } from '@shared/ssh'
import { hintLabel } from '@shared/platform-utils'
import { ColumnPill } from '../components/kanban/ColumnPill'
+import { BoardLogPanel } from '../components/kanban/BoardLogPanel'
/** Backslash-escape shell-special characters, like a native terminal does on file drop. */
function escapeDroppedPath(p: string): string {
@@ -402,6 +403,8 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasN
const contextLinkCapable = !!agentId && canContextLink(agentId) // context-link tip wording only; handles render on all terminals
const showUsage = !!agentId && hasUsage(agentId) // per-node context-window meter
const showChat = !!agentId && canChat(agentId) // Cmd+M opens a chat panel instead of markdown
+ // The header 💬 now opens the board-log comments flyout (right side); ⌘M keeps the markdown/chat view.
+ const [commentsOpen, setCommentsOpen] = useState(false)
const canRenameNode = !!agentId && canRename(agentId) // title ⇄ session-name two-way sync
const agentLabel = (agentId ? agentConfig(agentId) : undefined)?.label ?? 'Agent'
@@ -1723,17 +1726,15 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasN
{naming ? '…' : '✦'}
</button>
</Tooltip>
- {showChat && (
- <Tooltip label={hintLabel('Chat / markdown view (⌘M)')}>
- <button
- className="term-node__chat nodrag"
- aria-pressed={!!data.mdMode}
- onClick={() => updateNodeData(id, (n) => ({ mdMode: !n.data.mdMode }))}
- >
- <IconChat />
- </button>
- </Tooltip>
- )}
+ <Tooltip label="Comments & activity">
+ <button
+ className="term-node__chat nodrag"
+ aria-pressed={commentsOpen}
+ onClick={() => setCommentsOpen((v) => !v)}
+ >
+ <IconChat />
+ </button>
+ </Tooltip>
<button
className="term-node__close"
title="Close (ends the session)"
@@ -1816,6 +1817,13 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasN
))}
</div>
</div>
+ {/* Board-log comments flyout — a SIBLING of the root (overflow:hidden would clip it),
+ expanding to the node's right. Same feed/composer as the card modal's panel. */}
+ {commentsOpen && !collapsed && (
+ <div className="term-node__comments nodrag nowheel" onMouseDown={(e) => e.stopPropagation()}>
+ <BoardLogPanel card={{ id }} />
+ </div>
+ )}
</>
)
}
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index d5476bfbd..5e1ea0f55 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -6854,19 +6854,23 @@ body,
background: var(--accent);
color: #fff;
}
-.kanban-modal__md {
+
+/* ---- Node comments flyout: the header 💬 expands the board-log feed to the node's right ---- */
+.term-node__comments {
position: absolute;
- inset: 0;
- overflow-y: auto;
- padding: 14px 18px;
+ left: 100%;
+ top: 0;
+ bottom: 0;
+ margin-left: 10px;
+ width: 300px;
+ display: flex;
background: #161618;
- font-size: 13px;
- line-height: 1.55;
- color: rgba(255, 255, 255, 0.88);
+ border: 1px solid rgba(255, 255, 255, 0.12);
+ border-radius: 10px;
+ box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
+ overflow: hidden;
+ z-index: 5;
}
-.kanban-modal__md pre {
- background: rgba(255, 255, 255, 0.06);
- border-radius: 6px;
- padding: 8px 10px;
- overflow-x: auto;
+.term-node__comments .board-log {
+ border-left: none;
}