Skip to content

Commit eb1c4a5

Browse files
committed
Show running terminal status on completed inbox rows
1 parent d8d7c7e commit eb1c4a5

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

apps/web/src/components/sidebar/InboxRows.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,13 @@ export const InboxDoneRow = memo(function InboxDoneRow(props: InboxDoneRowProps)
639639
const threadRef = scopeThreadRef(thread.environmentId, thread.id);
640640
const threadKey = scopedThreadKey(threadRef);
641641
const threadProjectCwd = useThreadProjectCwd(thread);
642+
// Wrapping a thread settles the conversation, not its terminals: a dev
643+
// server started there keeps running, and this is the icon that finds it.
644+
const runningTerminalIds = useTerminalStateStore(
645+
(state) =>
646+
selectThreadTerminalState(state.terminalStateByThreadKey, threadRef).runningTerminalIds,
647+
);
648+
const terminalStatus = terminalStatusFromRunningIds(runningTerminalIds);
642649

643650
const handleClick = useCallback(() => {
644651
navigateToThread(threadRef);
@@ -778,6 +785,17 @@ export const InboxDoneRow = memo(function InboxDoneRow(props: InboxDoneRowProps)
778785
{thread.title}
779786
</span>
780787
<span className={ROW_META_SLOT_CLASS_NAME}>
788+
{terminalStatus ? (
789+
<span
790+
role="img"
791+
aria-label={terminalStatus.label}
792+
className={cn("inline-flex items-center justify-center", terminalStatus.colorClass)}
793+
>
794+
<TerminalIcon
795+
className={cn("size-3", terminalStatus.pulse && "animate-status-pulse")}
796+
/>
797+
</span>
798+
) : null}
781799
<span className="shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground/45">
782800
{doneAt ? formatRelativeTimeLabel(doneAt) : null}
783801
</span>

0 commit comments

Comments
 (0)