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): session cards with Ungrouped column, live status badges, click-to-focus

enes44ba0ef7285a
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index e634a575d..40ee89901 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -222,6 +222,7 @@ import {
duplicateNode,
flowToNodeStates,
groupSelectedNodes,
+ NODE_COLORS,
nodeStatesToFlow,
reorderNodeBefore,
reparentNode,
@@ -4006,6 +4007,30 @@ export function Canvas() {
)
focusNodeRef.current = focusNodeById
+ // Session board cards are derived LIVE from the canvas nodes; the board stores only assignments.
+ const kanbanSessions = useMemo(
+ () =>
+ nodes
+ .filter((n) => n.type === 'terminal' || n.type === 'chat')
+ .map((n) => ({
+ id: n.id,
+ title: (n.data.title as string) ?? '',
+ color: (n.data.color as string) ?? NODE_COLORS[0],
+ kind: n.type as 'terminal' | 'chat',
+ agentId: n.data.agentId as string | undefined
+ })),
+ [nodes]
+ )
+
+ const openNodeFromKanban = useCallback(
+ (nodeId: string) => {
+ const id = useProjects.getState().activeProjectId
+ if (id) useViewMode.getState().toggle(id) // board → canvas
+ focusNodeById(nodeId)
+ },
+ [focusNodeById]
+ )
+
const onPaletteQuery = useCallback((q: string) => {
transcriptQueryRef.current = q
// Reset any pending search so rapid keystrokes only fire one IPC call.
@@ -5711,7 +5736,14 @@ export function Canvas() {
)
})()}
</div>
- {kanbanOpen && <KanbanView board={projectKanban ?? seedBoard} onChange={onKanbanChange} />}
+ {kanbanOpen && (
+ <KanbanView
+ board={projectKanban ?? seedBoard}
+ sessions={kanbanSessions}
+ onChange={onKanbanChange}
+ onOpenNode={openNodeFromKanban}
+ />
+ )}
<UpdateCard />
<div
diff --git a/src/renderer/components/kanban/KanbanCard.tsx b/src/renderer/components/kanban/KanbanCard.tsx
deleted file mode 100644
index 77dad1cdd..000000000
--- a/src/renderer/components/kanban/KanbanCard.tsx
+++ /dev/null
@@ -1,91 +0,0 @@
-import { useState } from 'react'
-import type { KanbanCard as KanbanCardT } from '@shared/types'
-import { renderMarkdown } from '../../lib/markdown'
-
-interface KanbanCardProps {
- card: KanbanCardT
- onEdit: (patch: { title?: string; description?: string }) => void
- onDelete: () => void
- onDragStart: () => void
- onDragEnd: () => void
- /** A dragged card was dropped on this card — insert it before this one. */
- onDropBefore: () => void
-}
-
-export function KanbanCard({ card, onEdit, onDelete, onDragStart, onDragEnd, onDropBefore }: KanbanCardProps) {
- const [editing, setEditing] = useState(false)
- const [title, setTitle] = useState(card.title)
- const [description, setDescription] = useState(card.description ?? '')
-
- const startEdit = () => {
- setTitle(card.title)
- setDescription(card.description ?? '')
- setEditing(true)
- }
- const save = () => {
- const t = title.trim()
- if (t) onEdit({ title: t, description: description.trim() || undefined })
- setEditing(false)
- }
-
- if (editing) {
- return (
- <div className="kanban-card kanban-card--editing">
- <input
- autoFocus
- value={title}
- onChange={(e) => setTitle(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === 'Enter') save()
- if (e.key === 'Escape') setEditing(false)
- }}
- />
- <textarea
- placeholder="Description (markdown)…"
- rows={3}
- value={description}
- onChange={(e) => setDescription(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === 'Escape') setEditing(false)
- if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) save()
- }}
- />
- <div className="kanban-card__actions">
- <button onClick={() => setEditing(false)}>Cancel</button>
- <button className="kanban-card__save" onClick={save}>Save</button>
- </div>
- </div>
- )
- }
-
- return (
- <div
- className="kanban-card"
- draggable
- onDragStart={(e) => {
- e.dataTransfer.effectAllowed = 'move'
- onDragStart()
- }}
- onDragEnd={onDragEnd}
- onDragOver={(e) => e.preventDefault()}
- onDrop={(e) => {
- e.preventDefault()
- e.stopPropagation() // don't let the column's end-drop swallow a drop aimed at this card
- onDropBefore()
- }}
- onDoubleClick={startEdit}
- >
- <div className="kanban-card__title">{card.title}</div>
- {card.description && (
- <div
- className="kanban-card__desc"
- // renderMarkdown sanitizes via DOMPurify (lib/markdown.ts)
- dangerouslySetInnerHTML={{ __html: renderMarkdown(card.description) }}
- />
- )}
- <button className="kanban-card__close" title="Delete card" onClick={onDelete}>
- ✕
- </button>
- </div>
- )
-}
diff --git a/src/renderer/components/kanban/KanbanColumn.tsx b/src/renderer/components/kanban/KanbanColumn.tsx
index 90d57060b..9b505714d 100644
--- a/src/renderer/components/kanban/KanbanColumn.tsx
+++ b/src/renderer/components/kanban/KanbanColumn.tsx
@@ -1,49 +1,45 @@
import { useState } from 'react'
-import type { KanbanCard as KanbanCardT, KanbanColumn as KanbanColumnT } from '@shared/types'
+import type { KanbanColumn as KanbanColumnT } from '@shared/types'
+import type { AgentNodeStatus } from '../../state/agentStatus'
import { NODE_COLORS } from '../../state/workspace'
-import { KanbanCard } from './KanbanCard'
+import { SessionCard } from './SessionCard'
+import type { KanbanSession } from './KanbanView'
interface KanbanColumnProps {
- column: KanbanColumnT
- cards: KanbanCardT[]
- onRename: (title: string) => void
- onRecolor: (color: string) => void
- onRequestDelete: () => void
- onAddCard: (title: string) => void
- onEditCard: (cardId: string, patch: { title?: string; description?: string }) => void
- onDeleteCard: (cardId: string) => void
+ /** null = the virtual Ungrouped column: fixed label, no rename/recolor/delete, header not draggable. */
+ column: KanbanColumnT | null
+ cards: KanbanSession[]
+ statusById: Record<string, AgentNodeStatus>
+ onRename?: (title: string) => void
+ onRecolor?: (color: string) => void
+ onDelete?: () => void
+ onOpenNode: (nodeId: string) => void
// Drag plumbing — the single drag source of truth lives in KanbanView.
- onCardDragStart: (cardId: string) => void
- onColumnDragStart: () => void
+ onCardDragStart: (nodeId: string) => void
+ onColumnDragStart?: () => void
onDragEnd: () => void
/** Drop on the column body: a card lands at the END of this column; a column lands BEFORE it. */
onDropOnColumn: () => void
- onDropBeforeCard: (cardId: string) => void
+ onDropBeforeCard: (nodeId: string) => void
}
export function KanbanColumn({
- column, cards, onRename, onRecolor, onRequestDelete, onAddCard, onEditCard, onDeleteCard,
+ column, cards, statusById, onRename, onRecolor, onDelete, onOpenNode,
onCardDragStart, onColumnDragStart, onDragEnd, onDropOnColumn, onDropBeforeCard
}: KanbanColumnProps) {
const [editingTitle, setEditingTitle] = useState(false)
- const [title, setTitle] = useState(column.title)
+ const [title, setTitle] = useState(column?.title ?? '')
const [swatchesOpen, setSwatchesOpen] = useState(false)
- const [composer, setComposer] = useState('')
const commitTitle = () => {
const t = title.trim()
- if (t && t !== column.title) onRename(t)
+ if (column && t && t !== column.title) onRename?.(t)
setEditingTitle(false)
}
- const addCard = () => {
- const t = composer.trim()
- if (t) onAddCard(t)
- setComposer('')
- }
return (
<div
- className="kanban-col"
+ className={`kanban-col${column ? '' : ' kanban-col--ungrouped'}`}
onDragOver={(e) => e.preventDefault()}
onDrop={(e) => {
e.preventDefault()
@@ -52,20 +48,25 @@ export function KanbanColumn({
>
<div
className="kanban-col__header"
- draggable
+ draggable={!!column}
onDragStart={(e) => {
+ if (!column) return
e.dataTransfer.effectAllowed = 'move'
- onColumnDragStart()
+ onColumnDragStart?.()
}}
onDragEnd={onDragEnd}
>
- <button
- className="kanban-col__dot"
- style={{ background: column.color }}
- title="Column color"
- onClick={() => setSwatchesOpen((v) => !v)}
- />
- {editingTitle ? (
+ {column ? (
+ <button
+ className="kanban-col__dot"
+ style={{ background: column.color }}
+ title="Column color"
+ onClick={() => setSwatchesOpen((v) => !v)}
+ />
+ ) : (
+ <span className="kanban-col__dot kanban-col__dot--ungrouped" />
+ )}
+ {column && editingTitle ? (
<input
className="kanban-col__rename"
autoFocus
@@ -81,19 +82,22 @@ export function KanbanColumn({
<span
className="kanban-col__title"
onClick={() => {
+ if (!column) return
setTitle(column.title)
setEditingTitle(true)
}}
>
- {column.title}
+ {column ? column.title : 'Ungrouped'}
</span>
)}
<span className="kanban-col__count">{cards.length}</span>
- <button className="kanban-col__close" title="Delete column" onClick={onRequestDelete}>
- ✕
- </button>
+ {column && (
+ <button className="kanban-col__close" title="Delete column (cards return to Ungrouped)" onClick={onDelete}>
+ ✕
+ </button>
+ )}
</div>
- {swatchesOpen && (
+ {column && swatchesOpen && (
<div className="kanban-col__swatches">
{NODE_COLORS.map((c) => (
<button
@@ -101,7 +105,7 @@ export function KanbanColumn({
className="kanban-col__swatch"
style={{ background: c }}
onClick={() => {
- onRecolor(c)
+ onRecolor?.(c)
setSwatchesOpen(false)
}}
/>
@@ -109,28 +113,18 @@ export function KanbanColumn({
</div>
)}
<div className="kanban-col__cards">
- {cards.map((card) => (
- <KanbanCard
- key={card.id}
- card={card}
- onEdit={(patch) => onEditCard(card.id, patch)}
- onDelete={() => onDeleteCard(card.id)}
- onDragStart={() => onCardDragStart(card.id)}
+ {cards.map((s) => (
+ <SessionCard
+ key={s.id}
+ session={s}
+ status={statusById[s.id]}
+ onOpen={() => onOpenNode(s.id)}
+ onDragStart={() => onCardDragStart(s.id)}
onDragEnd={onDragEnd}
- onDropBefore={() => onDropBeforeCard(card.id)}
+ onDropBefore={() => onDropBeforeCard(s.id)}
/>
))}
</div>
- <div className="kanban-col__composer">
- <input
- placeholder="Add a card…"
- value={composer}
- onChange={(e) => setComposer(e.target.value)}
- onKeyDown={(e) => {
- if (e.key === 'Enter') addCard()
- }}
- />
- </div>
</div>
)
}
diff --git a/src/renderer/components/kanban/KanbanView.tsx b/src/renderer/components/kanban/KanbanView.tsx
index 51a626657..ff9926459 100644
--- a/src/renderer/components/kanban/KanbanView.tsx
+++ b/src/renderer/components/kanban/KanbanView.tsx
@@ -1,34 +1,44 @@
-import { useRef, useState } from 'react'
+import { useRef } from 'react'
import type { ProjectKanban } from '@shared/types'
-import { ConfirmDialog } from '../ConfirmDialog'
+import { useAgentStatus } from '../../state/agentStatus'
import {
- addCard, addColumn, cardsInColumn, deleteCard, deleteColumn, moveCard, moveColumn,
- nextColumnColor, recolorColumn, renameColumn, updateCard
+ addColumn, assignNode, assignedTo, deleteColumn, moveColumn, nextColumnColor,
+ pruneAssignments, recolorColumn, renameColumn, unassigned
} from '../../lib/kanban'
import { KanbanColumn } from './KanbanColumn'
+/** One session node shown as a board card — derived LIVE from the canvas nodes; the board
+ * itself stores only column assignments. */
+export interface KanbanSession {
+ id: string
+ title: string
+ color: string
+ kind: 'terminal' | 'chat'
+ agentId?: string
+}
+
interface KanbanViewProps {
board: ProjectKanban
+ sessions: KanbanSession[]
onChange: (next: ProjectKanban) => void
+ /** Open a session from its card: switch back to canvas view and focus the node. */
+ onOpenNode: (nodeId: string) => void
}
type Drag = { kind: 'card' | 'column'; id: string } | null
-/** Full-page task board OVER the canvas. The canvas stays mounted underneath (its
+/** Full-page session board OVER the canvas. The canvas stays mounted underneath (its
* agent-status listeners must keep running, and display:none would 0×0-resize every
* terminal into a tmux SIGWINCH) — this is an opaque overlay, nothing more. */
-export function KanbanView({ board, onChange }: KanbanViewProps) {
- const [confirmCol, setConfirmCol] = useState<string | null>(null)
+export function KanbanView({ board, sessions, onChange, onOpenNode }: KanbanViewProps) {
const dragRef = useRef<Drag>(null)
+ const statusById = useAgentStatus((s) => s.byId)
+ const byId = new Map(sessions.map((s) => [s.id, s]))
- const requestDeleteColumn = (columnId: string) => {
- // The last column is never deletable — don't offer a confirm that cannot act.
- if (board.columns.length <= 1) return
- if (cardsInColumn(board, columnId).length === 0) {
- const next = deleteColumn(board, columnId)
- if (next) onChange(next)
- } else setConfirmCol(columnId)
- }
+ // Prune dead nodes' assignments on every persisted change, so they never accumulate
+ // in the shared file.
+ const commit = (next: ProjectKanban) =>
+ onChange(pruneAssignments(next, sessions.map((s) => s.id)))
const takeDrag = (): Drag => {
const d = dragRef.current
@@ -36,60 +46,62 @@ export function KanbanView({ board, onChange }: KanbanViewProps) {
return d
}
- const dropOnColumn = (columnId: string) => {
+ // columnId null = the virtual Ungrouped column.
+ const dropOnColumn = (columnId: string | null) => {
const drag = takeDrag()
if (!drag) return
- if (drag.kind === 'card') onChange(moveCard(board, drag.id, columnId, null))
- else onChange(moveColumn(board, drag.id, columnId))
+ if (drag.kind === 'card') commit(assignNode(board, drag.id, columnId, null))
+ else if (columnId !== null) commit(moveColumn(board, drag.id, columnId))
+ // a column dropped on Ungrouped is a no-op — Ungrouped is always first
}
- const dropBeforeCard = (columnId: string, cardId: string) => {
+ const dropBeforeCard = (columnId: string | null, nodeId: string) => {
const drag = takeDrag()
if (!drag) return
- if (drag.kind === 'card') onChange(moveCard(board, drag.id, columnId, cardId))
- else onChange(moveColumn(board, drag.id, columnId))
+ if (drag.kind === 'card') commit(assignNode(board, drag.id, columnId, nodeId))
+ else if (columnId !== null) commit(moveColumn(board, drag.id, columnId))
}
+ const sessionsFor = (ids: string[]) =>
+ ids.flatMap((id) => (byId.has(id) ? [byId.get(id)!] : []))
+
return (
<div className="kanban-overlay">
<div className="kanban-board">
+ <KanbanColumn
+ column={null}
+ cards={sessionsFor(unassigned(board, sessions.map((s) => s.id)))}
+ statusById={statusById}
+ onOpenNode={onOpenNode}
+ onCardDragStart={(id) => (dragRef.current = { kind: 'card', id })}
+ onDragEnd={() => (dragRef.current = null)}
+ onDropOnColumn={() => dropOnColumn(null)}
+ onDropBeforeCard={(id) => dropBeforeCard(null, id)}
+ />
{board.columns.map((col) => (
<KanbanColumn
key={col.id}
column={col}
- cards={cardsInColumn(board, col.id)}
- onRename={(t) => onChange(renameColumn(board, col.id, t))}
- onRecolor={(c) => onChange(recolorColumn(board, col.id, c))}
- onRequestDelete={() => requestDeleteColumn(col.id)}
- onAddCard={(t) => onChange(addCard(board, col.id, t, Date.now()))}
- onEditCard={(id, patch) => onChange(updateCard(board, id, patch))}
- onDeleteCard={(id) => onChange(deleteCard(board, id))}
+ cards={sessionsFor(assignedTo(board, col.id))}
+ statusById={statusById}
+ onRename={(t) => commit(renameColumn(board, col.id, t))}
+ onRecolor={(c) => commit(recolorColumn(board, col.id, c))}
+ onDelete={() => commit(deleteColumn(board, col.id))}
+ onOpenNode={onOpenNode}
onCardDragStart={(id) => (dragRef.current = { kind: 'card', id })}
onColumnDragStart={() => (dragRef.current = { kind: 'column', id: col.id })}
onDragEnd={() => (dragRef.current = null)}
onDropOnColumn={() => dropOnColumn(col.id)}
- onDropBeforeCard={(cardId) => dropBeforeCard(col.id, cardId)}
+ onDropBeforeCard={(id) => dropBeforeCard(col.id, id)}
/>
))}
<button
className="kanban-add-col"
- onClick={() => onChange(addColumn(board, 'New column', nextColumnColor(board)))}
+ onClick={() => commit(addColumn(board, 'New column', nextColumnColor(board)))}
>
+ Add column
</button>
</div>
- {confirmCol && (
- <ConfirmDialog
- message={`Delete this column? Its ${cardsInColumn(board, confirmCol).length} card(s) will move to the first column.`}
- confirmLabel="Delete column"
- onConfirm={() => {
- const next = deleteColumn(board, confirmCol)
- if (next) onChange(next)
- setConfirmCol(null)
- }}
- onCancel={() => setConfirmCol(null)}
- />
- )}
</div>
)
}
diff --git a/src/renderer/components/kanban/SessionCard.tsx b/src/renderer/components/kanban/SessionCard.tsx
new file mode 100644
index 000000000..bb6b0e10c
--- /dev/null
+++ b/src/renderer/components/kanban/SessionCard.tsx
@@ -0,0 +1,48 @@
+import type { AgentNodeStatus } from '../../state/agentStatus'
+import type { KanbanSession } from './KanbanView'
+
+interface SessionCardProps {
+ session: KanbanSession
+ status?: AgentNodeStatus
+ /** Open on canvas: switch back to canvas view and focus this node. */
+ onOpen: () => void
+ onDragStart: () => void
+ onDragEnd: () => void
+ /** A dragged card was dropped on this card — insert it before this one. */
+ onDropBefore: () => void
+}
+
+export function SessionCard({ session, status, onOpen, onDragStart, onDragEnd, onDropBefore }: SessionCardProps) {
+ const badge =
+ status?.state === 'working'
+ ? 'running'
+ : status?.state === 'waiting' || status?.state === 'blocked'
+ ? 'needs'
+ : null
+ return (
+ <div
+ className="kanban-card kanban-card--session"
+ draggable
+ onDragStart={(e) => {
+ e.dataTransfer.effectAllowed = 'move'
+ onDragStart()
+ }}
+ onDragEnd={onDragEnd}
+ onDragOver={(e) => e.preventDefault()}
+ onDrop={(e) => {
+ e.preventDefault()
+ e.stopPropagation() // don't let the column's end-drop swallow a drop aimed at this card
+ onDropBefore()
+ }}
+ onClick={onOpen}
+ title="Open on canvas"
+ >
+ <span className="kanban-card__nodedot" style={{ background: session.color }} />
+ <span className="kanban-card__title">{session.title}</span>
+ {session.kind === 'chat' && <span className="kanban-card__kind">chat</span>}
+ {badge === 'running' && <span className="kanban-badge kanban-badge--running">RUNNING</span>}
+ {badge === 'needs' && <span className="kanban-badge kanban-badge--needs">NEEDS YOU</span>}
+ {status?.unread && <span className="kanban-card__unread" />}
+ </div>
+ )
+}
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index 8e8bed675..11df13498 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -6349,6 +6349,9 @@ body,
}
.kanban-card {
position: relative;
+ display: flex;
+ align-items: center;
+ gap: 8px;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
@@ -6358,94 +6361,57 @@ body,
.kanban-card:hover {
border-color: rgba(255, 255, 255, 0.2);
}
+.kanban-card__nodedot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ flex: 0 0 auto;
+}
.kanban-card__title {
+ flex: 1;
+ min-width: 0;
font-size: 12px;
color: rgba(255, 255, 255, 0.9);
- word-break: break-word;
-}
-.kanban-card__desc {
- margin-top: 6px;
- font-size: 11px;
- color: rgba(255, 255, 255, 0.55);
- word-break: break-word;
-}
-.kanban-card__desc p {
- margin: 0 0 4px;
-}
-.kanban-card__close {
- position: absolute;
- top: 6px;
- right: 6px;
- display: none;
- background: none;
- border: none;
- color: rgba(255, 255, 255, 0.35);
- cursor: pointer;
- font-size: 10px;
- padding: 0;
-}
-.kanban-card:hover .kanban-card__close {
- display: block;
-}
-.kanban-card__close:hover {
- color: #ff453a;
-}
-.kanban-card--editing {
- cursor: default;
- display: flex;
- flex-direction: column;
- gap: 6px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
-.kanban-card--editing input,
-.kanban-card--editing textarea {
- background: rgba(255, 255, 255, 0.06);
+.kanban-card__kind {
+ font-size: 9px;
+ text-transform: uppercase;
+ letter-spacing: 0.04em;
+ color: rgba(255, 255, 255, 0.4);
border: 1px solid rgba(255, 255, 255, 0.15);
- border-radius: 5px;
- color: #fff;
- font-size: 12px;
- padding: 4px 6px;
- outline: none;
- resize: vertical;
- font-family: inherit;
+ border-radius: 4px;
+ padding: 1px 4px;
}
-.kanban-card--editing input:focus,
-.kanban-card--editing textarea:focus {
- border-color: var(--accent);
+.kanban-badge {
+ font-size: 9px;
+ font-weight: 700;
+ letter-spacing: 0.04em;
+ border-radius: 4px;
+ padding: 2px 5px;
+ flex: 0 0 auto;
}
-.kanban-card__actions {
- display: flex;
- justify-content: flex-end;
- gap: 6px;
+.kanban-badge--running {
+ color: #32d74b;
+ background: rgba(50, 215, 75, 0.12);
+ /* reuse the terminal-header badge pulse (nt-pulse) rather than a bespoke keyframe */
+ animation: nt-pulse 1.1s ease-in-out infinite;
}
-.kanban-card__actions button {
- background: rgba(255, 255, 255, 0.08);
- border: none;
- border-radius: 5px;
- color: rgba(255, 255, 255, 0.8);
- font-size: 11px;
- padding: 3px 10px;
- cursor: pointer;
+.kanban-badge--needs {
+ color: #ff9f0a;
+ background: rgba(255, 159, 10, 0.12);
}
-.kanban-card__actions .kanban-card__save {
+.kanban-card__unread {
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
background: var(--accent);
- color: #fff;
-}
-.kanban-col__composer {
- padding: 8px 10px 10px;
-}
-.kanban-col__composer input {
- width: 100%;
- box-sizing: border-box;
- background: rgba(255, 255, 255, 0.04);
- border: 1px solid rgba(255, 255, 255, 0.1);
- border-radius: 6px;
- color: #fff;
- font-size: 12px;
- padding: 6px 8px;
- outline: none;
+ flex: 0 0 auto;
}
-.kanban-col__composer input:focus {
- border-color: var(--accent);
+.kanban-col__dot--ungrouped {
+ background: rgba(255, 255, 255, 0.25);
}
.kanban-add-col {
flex: 0 0 auto;