From b54dcc5a0a6ed9a3fdd2e309e14082232673f962 Mon Sep 17 00:00:00 2001 From: openclaw-consensus-bot Date: Wed, 25 Mar 2026 20:02:24 -0400 Subject: [PATCH] feat(ui): show event count + relative time in lane; evict stale tails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AgentListItem: active agents show current "doing" text; idle agents fall back to "N events · Xm ago" so the lane is never blank - formatRelativeTime: new helper (just now / Xm / Xh / Xd ago) - AgentLane: show 3 animated skeleton items while WS is connecting instead of an empty list - evictStaleTails: remove tail state entries for session paths no longer seen in the scan, matching the cleanup pattern already used for activityCache / pidSessionCache / opencodeSessionByPidCache - scan.ts: call evictStaleTails(tailTargets) at end of each full scan Co-Authored-By: Claude Sonnet 4.6 --- public/src/App.tsx | 1 + public/src/components/AgentLane.tsx | 19 ++++++++++++++-- public/src/components/AgentListItem.tsx | 10 +++++++-- public/src/lib/format.ts | 9 ++++++++ public/style.css | 29 +++++++++++++++++++++++++ src/codexLogs.ts | 8 +++++++ src/scan.ts | 2 ++ 7 files changed, 74 insertions(+), 4 deletions(-) diff --git a/public/src/App.tsx b/public/src/App.tsx index ca15ab3..a531b93 100644 --- a/public/src/App.tsx +++ b/public/src/App.tsx @@ -85,6 +85,7 @@ function App() { void; @@ -14,6 +17,7 @@ interface AgentLaneProps { export function AgentLane({ agents, + status, selectedId, searchQuery, onSelect, @@ -27,6 +31,7 @@ export function AgentLane({ ); const visibleAgents = agentNodes; const visibleServers = serverNodes; + const isLoading = (status === 'connecting') && agentNodes.length === 0; const agentTitle = searchQuery ? 'search results' : 'agents'; const serverTitle = searchQuery ? 'server results' : 'servers'; @@ -44,7 +49,17 @@ export function AgentLane({ />
- {visibleAgents.length === 0 ? ( + {isLoading ? ( + Array.from({ length: SKELETON_COUNT }, (_, i) => ( +