From 5bcc22622e5b461f6945a3cb8dfc10c7d22aced8 Mon Sep 17 00:00:00 2001 From: wuyang6 Date: Fri, 12 Jun 2026 18:28:00 +0800 Subject: [PATCH] Show session run badges --- .../components/assistant-ui/thread-list.tsx | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/frontend/app/components/assistant-ui/thread-list.tsx b/frontend/app/components/assistant-ui/thread-list.tsx index 0e33ae7..4bcbeda 100644 --- a/frontend/app/components/assistant-ui/thread-list.tsx +++ b/frontend/app/components/assistant-ui/thread-list.tsx @@ -129,6 +129,9 @@ type ClawReplaySnapshot = SessionReplaySnapshot< ClawRunStatus >; +const SESSION_BADGE_POLL_INTERVAL_MS = 2000; +const MAX_SESSION_BADGE_POLL_COUNT = 80; + function replaySessionSnapshot( replaySession: ReplaySessionFn, sessionId: string, @@ -359,6 +362,7 @@ const ClawSessionList: FC = () => { const renameInputRef = useRef(null); const openRequestRef = useRef(0); const openAbortRef = useRef(null); + const sessionBadges = useSessionRunBadges(sessions, activeSessionId); useEffect(() => { setActiveSessionId(readActiveSessionId()); @@ -423,6 +427,7 @@ const ClawSessionList: FC = () => { }; const openSession = async (sessionId: string) => { + sessionBadges.markRead(sessionId); const requestId = openRequestRef.current + 1; openRequestRef.current = requestId; openAbortRef.current?.abort(); @@ -473,6 +478,7 @@ const ClawSessionList: FC = () => { {sessions.map((session) => { const active = activeSessionId === session.session_id; const loading = loadingSessionId === session.session_id; + const badge = sessionBadges.bySessionId.get(session.session_id); return (
{ )} +