@@ -19,11 +19,12 @@ const StatusIndicator = React.memo(function StatusIndicator({
1919 ...rest
2020} : StatusIndicatorProps ) {
2121 // Why: surface the status label as a native tooltip so hovering the dot
22- // reveals the state — matters especially for 'active' vs 'inactive', which
23- // share the same grey dot (see color-branch comment below). Callers pass
24- // aria-hidden="true" alongside an sr-only label, so the `title` attribute
25- // is ignored by AT and only serves sighted users on hover. Callers can
26- // override by passing their own `title`.
22+ // reveals the state — matters especially for 'active' vs 'done', which
23+ // share the same emerald dot until TODO(#1265) lands (see color-branch
24+ // comment below). Callers pass aria-hidden="true" alongside an sr-only
25+ // label, so the `title` attribute is ignored by AT and only serves
26+ // sighted users on hover. Callers can override by passing their own
27+ // `title`.
2728 const resolvedTitle = title ?? getWorktreeStatusLabel ( status )
2829
2930 if ( status === 'working' ) {
@@ -49,12 +50,18 @@ const StatusIndicator = React.memo(function StatusIndicator({
4950 'block size-2 rounded-full' ,
5051 status === 'permission'
5152 ? 'bg-red-500'
52- : status === 'done'
53- ? // Green dot for done; working uses a yellow spinner so the
54- // two states differ by both hue and motion. 'active' (terminal
55- // open, quiet) collapses to the same grey as 'inactive' — the
56- // tooltip carries the distinction for sighted users and the
57- // sr-only sibling in callers carries it for AT.
53+ : status === 'done' || status === 'active'
54+ ? // Green dot for both hook-reported 'done' and the heuristic
55+ // 'active' (terminal open, quiet). Without the 'active'
56+ // branch users without the experimental agent-tracking
57+ // setting never reach 'done' and lose the green dot
58+ // entirely. Working uses a yellow spinner so working vs
59+ // done differ by both hue and motion; 'inactive' stays grey.
60+ // TODO(#1265): differentiate 'active' (quiet terminal)
61+ // from 'done' (agent-reported completion) visually — today
62+ // both share emerald, so with the experimental tracking
63+ // toggle on a newly-opened quiet terminal reads the same
64+ // as a completed agent.
5865 'bg-emerald-500'
5966 : 'bg-neutral-500/40'
6067 ) }
0 commit comments