fix(sidebar): restore green dot for 'active' worktree status (#1266)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -19,11 +19,12 @@ const StatusIndicator = React.memo(function StatusIndicator({
|
||||
...rest
|
||||
}: StatusIndicatorProps) {
|
||||
// Why: surface the status label as a native tooltip so hovering the dot
|
||||
// reveals the state — matters especially for 'active' vs 'inactive', which
|
||||
// share the same grey dot (see color-branch comment below). Callers pass
|
||||
// aria-hidden="true" alongside an sr-only label, so the `title` attribute
|
||||
// is ignored by AT and only serves sighted users on hover. Callers can
|
||||
// override by passing their own `title`.
|
||||
// reveals the state — matters especially for 'active' vs 'done', which
|
||||
// share the same emerald dot until TODO(#1265) lands (see color-branch
|
||||
// comment below). Callers pass aria-hidden="true" alongside an sr-only
|
||||
// label, so the `title` attribute is ignored by AT and only serves
|
||||
// sighted users on hover. Callers can override by passing their own
|
||||
// `title`.
|
||||
const resolvedTitle = title ?? getWorktreeStatusLabel(status)
|
||||
|
||||
if (status === 'working') {
|
||||
@@ -49,12 +50,18 @@ const StatusIndicator = React.memo(function StatusIndicator({
|
||||
'block size-2 rounded-full',
|
||||
status === 'permission'
|
||||
? 'bg-red-500'
|
||||
: status === 'done'
|
||||
? // Green dot for done; working uses a yellow spinner so the
|
||||
// two states differ by both hue and motion. 'active' (terminal
|
||||
// open, quiet) collapses to the same grey as 'inactive' — the
|
||||
// tooltip carries the distinction for sighted users and the
|
||||
// sr-only sibling in callers carries it for AT.
|
||||
: status === 'done' || status === 'active'
|
||||
? // Green dot for both hook-reported 'done' and the heuristic
|
||||
// 'active' (terminal open, quiet). Without the 'active'
|
||||
// branch users without the experimental agent-tracking
|
||||
// setting never reach 'done' and lose the green dot
|
||||
// entirely. Working uses a yellow spinner so working vs
|
||||
// done differ by both hue and motion; 'inactive' stays grey.
|
||||
// TODO(#1265): differentiate 'active' (quiet terminal)
|
||||
// from 'done' (agent-reported completion) visually — today
|
||||
// both share emerald, so with the experimental tracking
|
||||
// toggle on a newly-opened quiet terminal reads the same
|
||||
// as a completed agent.
|
||||
'bg-emerald-500'
|
||||
: 'bg-neutral-500/40'
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user