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(sidebar): simplify workflow statuses

Darren Kattan065edc4a6e6f
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index 68f3fe032..62384ba1a 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -6005,8 +6005,8 @@ export function Canvas() {
}
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
- // immediately re-flag it unread after we clear it (unread edges gate on activeId).
+ // Mark this node as watched and its completion as read. Read state is independent of the
+ // live `done` workflow state, so it remains under Waiting for your response.
useAgentStatus.getState().setActive(nodeId, true)
useAgentStatus.getState().clearUnread(nodeId)
return
diff --git a/src/renderer/components/SessionRow.tsx b/src/renderer/components/SessionRow.tsx
index 0091aa79a..0e4706880 100644
--- a/src/renderer/components/SessionRow.tsx
+++ b/src/renderer/components/SessionRow.tsx
@@ -76,17 +76,12 @@ export function SessionRow({
<IconBellFilled />
</span>
) : row.statusKind !== 'working' && row.unread ? (
- // Finished (or reset to idle) while the user wasn't looking: the SAME check glyph,
+ // Finished before its live state became unknown while the user wasn't looking: the check,
// but accent-blue and pulsing until they visit the node. Working/attention win —
// a new turn or a permission prompt is more urgent than an old unread mark.
<span className="ss-check ss-check--unread" title="Finished — new for you">
<IconCircleCheck />
</span>
- ) : row.statusKind === 'done' ? (
- // Completion glyph: a check icon scans better than one more dot.
- <span className="ss-check" title={row.stateLabel}>
- <IconCircleCheck />
- </span>
) : (
<span className={`ss-dot ss-dot--${row.statusKind}`} title={row.stateLabel} />
)}
diff --git a/src/renderer/components/SessionsSidebar.tsx b/src/renderer/components/SessionsSidebar.tsx
index def21a416..0afdaf5a6 100644
--- a/src/renderer/components/SessionsSidebar.tsx
+++ b/src/renderer/components/SessionsSidebar.tsx
@@ -501,28 +501,24 @@ export function SessionsSidebar(props: SessionsSidebarProps): JSX.Element | null
<div className="sessions-sidebar__empty">No sessions yet.</div>
)}
{grouping === 'status' ? (
- statusSections.length === 0 ? (
- <div className="sessions-sidebar__empty">No sessions yet.</div>
- ) : (
- statusSections.map((section: StatusSection) => (
- <div key={section.kind} className="ss-status">
- <div className="ss-status__head">
- {section.kind === 'attention' ? (
- <span className="ss-status__icon ss-status__icon--attention">
- <IconBellFilled />
- </span>
- ) : (
- <span className={`ss-status__icon ss-status__icon--${section.kind}`} />
- )}
- <span className="ss-status__label">{section.label}</span>
- <span className="ss-status__count">{section.rows.length}</span>
- </div>
- <div className="ss-status__rows">
- {section.rows.map((row) => renderStatusRow(row))}
- </div>
+ statusSections.map((section: StatusSection) => (
+ <div key={section.kind} className="ss-status">
+ <div className="ss-status__head">
+ {section.kind === 'attention' ? (
+ <span className="ss-status__icon ss-status__icon--attention">
+ <IconBellFilled />
+ </span>
+ ) : (
+ <span className={`ss-status__icon ss-status__icon--${section.kind}`} />
+ )}
+ <span className="ss-status__label">{section.label}</span>
+ <span className="ss-status__count">{section.rows.length}</span>
</div>
- ))
- )
+ <div className="ss-status__rows">
+ {section.rows.map((row) => renderStatusRow(row))}
+ </div>
+ </div>
+ ))
) : (
groups.map((g) => {
const collapseKey = projectCollapseKey(g.projectId)
diff --git a/src/renderer/components/kanban/KanbanView.tsx b/src/renderer/components/kanban/KanbanView.tsx
index 13e299c7c..3bc0afea4 100644
--- a/src/renderer/components/kanban/KanbanView.tsx
+++ b/src/renderer/components/kanban/KanbanView.tsx
@@ -1,7 +1,6 @@
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import type { KanbanLabel, 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'
@@ -18,6 +17,7 @@ import { ContextMenu, type MenuItem } from '../ContextMenu'
import { IconAgent, IconExternal, IconNote, IconSwitch, IconTerminal, IconTrash, IconWeb } from '../icons'
import type { GitHubIssueCardView } from '@shared/github-issues'
import { useGitHubIssues } from '../../state/githubIssues'
+import { useAgentStatus } from '../../state/agentStatus'
import { useSession } from '../../session/session'
import { KanbanSourceFilter, type KanbanSource } from './KanbanSourceFilter'
import { GitHubIssueSummaryModal } from './GitHubIssueSummaryModal'
@@ -151,8 +151,8 @@ export const KanbanView = memo(function KanbanView({
.filter((key) => key.startsWith('github:')), [activeFilter])
const toggleFilter = (id: string): void =>
setLabelFilter((f) => (f.includes(id) ? f.filter((x) => x !== id) : [...f, id]))
- // Opening a card = you're looking at that session: clear its unread badge, and report the open
- // node to the canvas (dictation shortcut targeting).
+ // Report the open node to the canvas (dictation shortcut targeting) and mark its completion read.
+ // This clears notification affordances only; the live `done` state remains waiting for a prompt.
useEffect(() => {
onModalNodeChange(modalNodeId)
if (modalNodeId) useAgentStatus.getState().clearUnread(modalNodeId)
diff --git a/src/renderer/lib/sessionList.test.ts b/src/renderer/lib/sessionList.test.ts
index cd0f88e38..a39ccafd4 100644
--- a/src/renderer/lib/sessionList.test.ts
+++ b/src/renderer/lib/sessionList.test.ts
@@ -7,6 +7,7 @@ import {
liveCollapseKeys,
pruneCollapsedItems,
sessionStatusKind,
+ sessionStateAgeLabel,
projectIdAtIndex,
isGroupCollapsed,
projectHeadClickAction,
@@ -35,8 +36,16 @@ describe('sessionStatusKind', () => {
expect(sessionStatusKind('working')).toBe('working')
expect(sessionStatusKind('waiting')).toBe('attention')
expect(sessionStatusKind('blocked')).toBe('attention')
- expect(sessionStatusKind('done')).toBe('done')
- expect(sessionStatusKind(undefined)).toBe('idle')
+ expect(sessionStatusKind('done')).toBe('attention')
+ expect(sessionStatusKind(undefined)).toBe('unknown')
+ })
+})
+
+describe('sessionStateAgeLabel', () => {
+ it('formats an observed transition and does not invent an age for unknown history', () => {
+ const now = 10 * 60_000
+ expect(sessionStateAgeLabel(now - 5 * 60_000, now)).toBe('5m ago')
+ expect(sessionStateAgeLabel(undefined, now)).toBeUndefined()
})
})
@@ -309,8 +318,8 @@ describe('projectSignalCounts', () => {
title: `s${i}`,
color: '#888',
isAgent: false,
- statusKind: 'idle' as const,
- stateLabel: 'Idle',
+ statusKind: 'unknown' as const,
+ stateLabel: 'Unknown',
unread: false,
usesContext: false,
...s
@@ -331,10 +340,10 @@ describe('projectSignalCounts', () => {
node('g1', { kind: 'group', title: 'G', color: '#abc' }),
node('a'), // waiting → attention
node('b', { parentId: 'g1' }), // blocked → attention
- node('c'), // done + unread → unread
- node('d'), // idle + unread → unread (state lost, unread persisted)
+ node('c'), // done + unread → attention (workflow state wins)
+ node('d'), // unknown + unread → unread (state lost, unread persisted)
node('e'), // working + unread → NOT counted (mirrors the row glyph precedence)
- node('f') // plain idle → neither
+ node('f') // plain unknown → neither
]
}
]
@@ -348,7 +357,7 @@ describe('projectSignalCounts', () => {
const [g] = buildSessionList(proj, null, 'p1', status, '')
// `e` is the load-bearing one: it is the single working session AND carries an unread mark,
// so it must land in `working` and NOT in `unread`.
- expect(projectSignalCounts(g)).toEqual({ attention: 2, unread: 2, working: 1 })
+ expect(projectSignalCounts(g)).toEqual({ attention: 3, unread: 1, working: 1 })
})
it('returns zeros for a quiet project', () => {
@@ -367,14 +376,14 @@ describe('projectSignalCounts', () => {
{ statusKind: 'working' },
{ statusKind: 'working' },
{ statusKind: 'attention' },
- { statusKind: 'idle' }
+ { statusKind: 'unknown' }
])
expect(projectSignalCounts(g)).toEqual({ attention: 1, unread: 0, working: 2 })
})
- it('working is 0 when nothing is running, and unread is counted when not working', () => {
- const g = group([{ statusKind: 'idle' }, { statusKind: 'done', unread: true }])
- expect(projectSignalCounts(g)).toEqual({ attention: 0, unread: 1, working: 0 })
+ it('workflow attention wins over unread when nothing is running', () => {
+ const g = group([{ statusKind: 'unknown' }, { statusKind: 'attention', unread: true }])
+ expect(projectSignalCounts(g)).toEqual({ attention: 1, unread: 0, working: 0 })
})
it('drives through buildSessionList: counts grouped sessions, attention wins over unread, working is not double-counted as unread', () => {
@@ -387,7 +396,7 @@ describe('projectSignalCounts', () => {
node('g1', { kind: 'group', title: 'Frontend', color: '#abc' }),
node('a1', { agentId: 'claude', parentId: 'g1' }), // attention + unread -> attention only
node('a2', { agentId: 'claude', parentId: 'g1' }), // working + unread -> working only
- node('t1') // ungrouped, idle
+ node('t1') // ungrouped, unknown
]
}
]
@@ -404,11 +413,11 @@ describe('projectSignalCounts', () => {
describe('buildStatusList', () => {
// Two projects, sessions in various states spread across them.
const status: Record<string, AgentNodeStatus> = {
- a1: { unread: false, state: 'waiting' }, // attention
- a2: { unread: false, state: 'blocked' }, // attention
- d1: { unread: false, state: 'done' }, // done
- w1: { unread: false, state: 'working' }, // working
- i1: { unread: false } // idle (no state)
+ a1: { unread: false, state: 'waiting', lastEventAt: 100 }, // attention, oldest
+ a2: { unread: false, state: 'blocked', lastEventAt: 300 }, // attention, newest
+ d1: { unread: false, state: 'done', lastEventAt: 200 }, // completed turn → attention
+ w1: { unread: false, state: 'working', lastEventAt: 400 }, // working
+ i1: { unread: false } // unknown (no state or transition time)
}
const proj: ProjectInput[] = [
{
@@ -416,7 +425,7 @@ describe('buildStatusList', () => {
name: 'Alpha',
color: '#111',
cwd: '/a',
- nodes: [node('a1', { title: 'zebra' }), node('d1', { title: 'apple' }), node('i1', { title: 'idle1' })]
+ nodes: [node('a1', { title: 'zebra' }), node('d1', { title: 'apple' }), node('i1', { title: 'unknown1' })]
},
{
id: 'p2',
@@ -426,27 +435,31 @@ describe('buildStatusList', () => {
}
]
- it('groups by status in the fixed order attention → idle → done → working', () => {
+ it('groups by workflow status in the fixed order attention → unknown → working', () => {
const sections = buildStatusList(proj, null, 'p1', status, '')
- expect(sections.map((s) => s.kind)).toEqual(['attention', 'idle', 'done', 'working'])
+ expect(sections.map((s) => s.kind)).toEqual(['attention', 'unknown', 'working'])
})
it('flattens across projects and tags each row with its project', () => {
const sections = buildStatusList(proj, null, 'p1', status, '')
const attention = sections.find((s) => s.kind === 'attention')!
- expect(attention.rows.map((r) => r.id).sort()).toEqual(['a1', 'a2'])
+ expect(attention.rows.map((r) => r.id).sort()).toEqual(['a1', 'a2', 'd1'])
const a1 = attention.rows.find((r) => r.id === 'a1')!
expect(a1.projectId).toBe('p1')
expect(a1.projectName).toBe('Alpha')
expect(a1.projectColor).toBe('#111')
+ expect(a1.statusUpdatedAt).toBe(100)
const a2 = attention.rows.find((r) => r.id === 'a2')!
expect(a2.projectId).toBe('p2')
})
- it('sorts rows within a section by project store-order then title', () => {
+ it('sorts rows within a section by descending state-change time', () => {
const sections = buildStatusList(proj, null, 'p1', status, '')
- // attention: p1/zebra then p2/mid (project order wins over title — zebra before mid)
- expect(sections.find((s) => s.kind === 'attention')!.rows.map((r) => r.id)).toEqual(['a1', 'a2'])
+ expect(sections.find((s) => s.kind === 'attention')!.rows.map((r) => r.id)).toEqual([
+ 'a2',
+ 'd1',
+ 'a1'
+ ])
})
it('keeps only terminal nodes (drops stickies/editors)', () => {
@@ -462,27 +475,47 @@ describe('buildStatusList', () => {
expect(a1.title).toBe('renamed live')
})
- it('omits empty sections and filters by title/session', () => {
+ it('keeps empty sections while filtering rows by title/session', () => {
// 'runner' only matches w1 (working)
const filtered = buildStatusList(proj, null, 'p1', status, 'runner')
- expect(filtered.map((s) => s.kind)).toEqual(['working'])
- expect(filtered[0].rows.map((r) => r.id)).toEqual(['w1'])
+ expect(filtered.map((s) => s.kind)).toEqual(['attention', 'unknown', 'working'])
+ expect(filtered.find((s) => s.kind === 'working')!.rows.map((r) => r.id)).toEqual(['w1'])
+ expect(filtered.filter((s) => s.kind !== 'working').every((s) => s.rows.length === 0)).toBe(true)
})
- it('returns only non-empty sections (no empty headers)', () => {
- // Only attention + done present, no idle/working sessions.
+ it('returns every section even when some headers have no sessions', () => {
+ // Waiting + done both land in attention; unknown/working stay present and empty.
const onlyTwo: ProjectInput[] = [
{ id: 'p1', name: 'Alpha', color: '#111', nodes: [node('a1'), node('d1')] }
]
const two: Record<string, AgentNodeStatus> = { a1: { unread: false, state: 'waiting' }, d1: { unread: false, state: 'done' } }
const sections = buildStatusList(onlyTwo, null, 'p1', two, '')
- expect(sections.map((s) => s.kind)).toEqual(['attention', 'done'])
+ expect(sections.map((s) => s.kind)).toEqual(['attention', 'unknown', 'working'])
+ expect(sections.find((s) => s.kind === 'attention')!.rows.map((row) => row.id).sort()).toEqual(['a1', 'd1'])
+ expect(sections.find((s) => s.kind === 'unknown')!.rows).toEqual([])
+ expect(sections.find((s) => s.kind === 'working')!.rows).toEqual([])
+ })
+
+ it('keeps read state separate from workflow grouping', () => {
+ const glowing: Record<string, AgentNodeStatus> = {
+ d1: { unread: true, state: 'done' },
+ i1: { unread: true },
+ w1: { unread: true, state: 'working' }
+ }
+ const sections = buildStatusList(proj, null, 'p1', glowing, '')
+ const attention = sections.find((s) => s.kind === 'attention')!
+ expect(attention.label).toBe('Waiting for your response')
+ expect(attention.rows.map((r) => r.id)).toEqual(['d1'])
+ // Unread alone is not a workflow state; a live turn is still Running.
+ expect(sections.find((s) => s.kind === 'unknown')!.rows.map((r) => r.id)).toContain('i1')
+ expect(sections.find((s) => s.kind === 'working')!.rows.map((r) => r.id)).toEqual(['w1'])
})
- it('falls through to idle when state is unknown', () => {
+ it('falls through to Unknown when no live state is known', () => {
const sections = buildStatusList(proj, null, 'p1', status, '')
- const idle = sections.find((s) => s.kind === 'idle')!
- expect(idle.rows.map((r) => r.id)).toEqual(['i1'])
+ const unknown = sections.find((s) => s.kind === 'unknown')!
+ expect(unknown.label).toBe('Unknown')
+ expect(unknown.rows.map((r) => r.id)).toEqual(['i1'])
})
it('never emits a node twice during a cross-project switch window', () => {
diff --git a/src/renderer/lib/sessionList.ts b/src/renderer/lib/sessionList.ts
index eb7631e99..a376be2ae 100644
--- a/src/renderer/lib/sessionList.ts
+++ b/src/renderer/lib/sessionList.ts
@@ -3,6 +3,7 @@ import type { AgentId } from '@shared/agents/config'
import type { NodeKind } from '@shared/types'
import { hasUsage } from '@shared/agents/config'
import type { SshConnection } from '@shared/ssh'
+import { relativeTime } from './relativeTime'
export interface SessionNodeInput {
id: string
@@ -24,16 +25,15 @@ export interface ProjectInput {
nodes: SessionNodeInput[]
}
-export type StatusKind = 'working' | 'attention' | 'done' | 'idle'
+export type StatusKind = 'working' | 'attention' | 'unknown'
/** Sessions sidebar top-level grouping mode. */
export type SidebarGrouping = 'project' | 'status'
const STATE_LABEL: Record<StatusKind, string> = {
working: 'Running',
- attention: 'Needs you',
- done: 'Done',
- idle: 'Idle'
+ attention: 'Waiting for your response',
+ unknown: 'Unknown'
}
/** Disclosure key for a project row in the sessions tree. */
@@ -48,11 +48,10 @@ export function groupCollapseKey(projectId: string, groupId: string): string {
/**
* Status section order when the sidebar is grouped by status. Anything needing you floats to the
- * top; working sinks to the bottom (a turn in flight is the least urgent to revisit). Idle sits
- * above done so a session whose state was lost — including a waiting one a scraper misclassified
- * as idle — stays above the finished pile.
+ * top; working sinks to the bottom (a turn in flight is the least urgent to revisit). Unknown sits
+ * between them: there is no current hook signal on which to infer a workflow state.
*/
-const STATUS_ORDER: StatusKind[] = ['attention', 'idle', 'done', 'working']
+const STATUS_ORDER: StatusKind[] = ['attention', 'unknown', 'working']
/**
* Whether a project row is collapsed in the sessions sidebar. `settings.sidebarAutoCollapse`
@@ -133,7 +132,8 @@ export function projectHeadClickAction(isActive: boolean): ProjectHeadAction {
/**
* Header badges for a project group: how many sessions need the user right now
- * (waiting/blocked), how many finished unseen, and how many are actively working right now.
+ * (done/waiting/blocked), how many unknown-state completions remain unseen, and how many are
+ * actively working right now.
* Mirrors the row glyph's precedence — an attention session is never double-counted as unread,
* and a working one isn't unread yet (a new turn is running; the old mark resurfaces when it ends).
*/
@@ -155,14 +155,18 @@ export function sessionStatusKind(state: AgentNodeStatus['state']): StatusKind {
return 'working'
case 'waiting':
case 'blocked':
- return 'attention'
case 'done':
- return 'done'
+ return 'attention'
default:
- return 'idle'
+ return 'unknown'
}
}
+/** Human-readable age of the current state. No timestamp means genuinely unknown, not "just now". */
+export function sessionStateAgeLabel(updatedAt: number | undefined, nowMs: number): string | undefined {
+ return updatedAt === undefined ? undefined : relativeTime(updatedAt, nowMs)
+}
+
/**
* Resolves the Cmd/Ctrl+N project shortcut: N is 1-based, matches sidebar/store array order.
* Only 1-9 are addressable — out of range (including an empty or short project list) is null,
@@ -182,6 +186,8 @@ export interface SessionRowVM {
isAgent: boolean
statusKind: StatusKind
stateLabel: string
+ /** When the current live state began. Transient; absent when no transition has been observed. */
+ statusUpdatedAt?: number
unread: boolean
session?: string
loop?: { kind: 'loop' | 'schedule' | 'cron'; count: number }
@@ -236,6 +242,8 @@ function toRow(
status: AgentNodeStatus | undefined,
project?: Pick<ProjectInput, 'id' | 'name' | 'color'>
): SessionRowVM {
+ // Workflow state and read state are deliberately independent. `done` means the agent finished a
+ // turn and is waiting for a new user prompt; `unread` only controls notification/read affordances.
const statusKind = sessionStatusKind(status?.state)
return {
id: n.id,
@@ -245,6 +253,7 @@ function toRow(
isAgent: !!n.agentId,
statusKind,
stateLabel: STATE_LABEL[statusKind],
+ statusUpdatedAt: status?.lastEventAt,
unread: !!status?.unread,
session: status?.session,
// A dismissed cron/schedule entry is retained as a fact (the hibernation guard reads it) but
@@ -362,12 +371,12 @@ export interface StatusSection {
* Build the status-grouped session list: every project's terminal nodes flattened into one list,
* bucketed by live agent status so sessions needing attention float to the top. Project walls and
* canvas sub-group frames are dropped — this is a flat regrouping keyed on status, not a
- * re-sort within project. Within a section, rows keep a stable order (project store-order, then
- * title) so the list doesn't reshuffle as statuses change.
+ * re-sort within project. Within a section, rows are ordered by most-recent state transition first,
+ * so the freshest work in each bucket is easiest to reach.
*
* Status comes from the same global `statusById` map `buildSessionList` reads; for local-core
* projects that map is live for every node regardless of which project is active. Remote/relay
- * nodes are absent from it, so they fall through to `idle` — the same way they render in project
+ * nodes are absent from it, so they fall through to `unknown` — the same way they render in project
* mode today, so this introduces no regression.
*/
export function buildStatusList(
@@ -437,7 +446,8 @@ export function buildStatusList(
}
}
- // Bucket by status, then stable-sort each bucket by project store-order then title.
+ // Bucket by status, then newest state transition first. An absent timestamp is genuinely unknown
+ // and sorts last; project store-order + title provide a deterministic tie-breaker.
const byStatus = new Map<StatusKind, { row: SessionRowVM; pidx: number }[]>()
for (const { row, pidx } of tagged) {
const list = byStatus.get(row.statusKind)
@@ -445,19 +455,19 @@ export function buildStatusList(
else byStatus.set(row.statusKind, [{ row, pidx }])
}
for (const list of byStatus.values()) {
- list.sort((a, b) =>
- a.pidx !== b.pidx
- ? a.pidx - b.pidx
- : a.row.title.toLowerCase().localeCompare(b.row.title.toLowerCase())
- )
+ list.sort((a, b) => {
+ const ageOrder = (b.row.statusUpdatedAt ?? -1) - (a.row.statusUpdatedAt ?? -1)
+ if (ageOrder !== 0) return ageOrder
+ if (a.pidx !== b.pidx) return a.pidx - b.pidx
+ return a.row.title.toLowerCase().localeCompare(b.row.title.toLowerCase())
+ })
}
- // Non-empty sections only, in the fixed order. An empty section has no rows to surface (a
- // misclassified-as-done session still has a row, so Done is rendered) — see the design's
- // done/idle-visibility rule.
- return STATUS_ORDER.map((kind) => {
- const list = byStatus.get(kind)
- if (!list || list.length === 0) return null
- return { kind, label: STATE_LABEL[kind], rows: list.map((t) => t.row) }
- }).filter((s): s is StatusSection => s !== null)
+ // Every section is always present. Stable headers make the grouping legible even when a bucket
+ // is temporarily empty and prevent the sidebar from jumping as sessions move between states.
+ return STATUS_ORDER.map((kind) => ({
+ kind,
+ label: STATE_LABEL[kind],
+ rows: (byStatus.get(kind) ?? []).map((t) => t.row)
+ }))
}
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index 1bd295aca..f263e3de3 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -3928,7 +3928,8 @@ export function TerminalNode({
if (r.ok) applyManualTitle(r.message)
}
- // Selecting a node clears its unread badge.
+ // Read state is separate from workflow state: selection clears the unread notification, while
+ // an agent whose turn is done remains "Waiting for your response" until its next prompt starts.
useEffect(() => {
if (selected) useAgentStatus.getState().clearUnread(id)
}, [selected, id])
diff --git a/src/renderer/state/agentStatus.ts b/src/renderer/state/agentStatus.ts
index 543a4ecf2..e0e061322 100644
--- a/src/renderer/state/agentStatus.ts
+++ b/src/renderer/state/agentStatus.ts
@@ -506,14 +506,15 @@ export function createAgentStatusSession(
set((s) => {
const prev = s.byId[id]
if (!prev) return s
- // Cross-surface ACK: opening a session marks its finishes read EVERYWHERE — the notch
+ // Cross-surface ACK: opening a session marks its finish read EVERYWHERE — the notch
// capsule's green blob, the paired phone's lingering DONE Live Activity, and its Inbox
- // Finished card (all via the core mirror's `ackDone`).
+ // Finished card (all via the core mirror's `ackDone`). This is READ state only: the live
+ // workflow state remains `done` until a genuine new turn begins.
//
// Deliberately gated on NOTHING but the external flag:
// - not on the unread flag, because a session you were LOOKING at when it finished never
- // got marked unread (the `watching` gate in Canvas), so opening it would be the only
- // read signal there ever is — and it was being dropped;
+ // got marked unread (the `watching` gate in Canvas), so opening it is the only local
+ // read signal there will ever be;
// - not on the node's current state, because a node whose PREVIOUS turn finished while a
// new one is already running left the phone showing a Finished card for a result the
// user had open on screen.
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index 55294abb6..3187a29ee 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -6355,8 +6355,7 @@ body,
.ss-row.is-active { background: rgba(var(--tint-rgb), 0.06); border-color: var(--border); }
.ss-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
-.ss-dot--idle { background: var(--muted-2); }
-/* done renders as a check icon (ss-check), not a dot — see SessionRow. */
+.ss-dot--unknown { background: var(--muted-2); }
.ss-check { color: var(--success); margin-top: 2px; flex: 0 0 auto; line-height: 0; }
/* Unread: the same check, accent-blue and pulsing until the user visits the node. */
.ss-check--unread { color: var(--accent); animation: nt-pulse 1.1s ease-in-out infinite; }
@@ -6538,7 +6537,7 @@ body,
.sessions-sidebar__head .seg-pill-opt { font-size: 10.5px; padding: 2px 8px; }
/* Status-grouped sections (sidebar grouped by status). Always expanded — no chevron, no
- collapse; the whole point is that needs-attention sessions are visible at a glance. */
+ collapse; the whole point is that sessions awaiting a response are visible at a glance. */
.ss-status { margin: 2px 0; }
.ss-status + .ss-status { margin-top: 8px; }
.ss-status__head { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; background: rgba(var(--tint-rgb), 0.035); }
@@ -6548,8 +6547,7 @@ body,
.ss-status__icon--attention { width: auto; height: auto; border-radius: 0; color: var(--danger); display: inline-flex; }
.ss-status__icon--attention svg { width: 11px; height: 11px; }
.ss-status__icon--working { background: var(--accent); }
-.ss-status__icon--done { background: var(--muted); }
-.ss-status__icon--idle { background: rgba(var(--tint-rgb), 0.25); }
+.ss-status__icon--unknown { background: rgba(var(--tint-rgb), 0.25); }
.ss-status__rows { padding: 2px 0 2px 2px; }
/* Status-mode row: project monogram in place of the plain color mark. */