diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 079c7d97b5bb36f1cc001b4ad9f175080a79c5cd..cd36675860df046cdca6b384ffd322172ddd28ee 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -6299,6 +6299,9 @@ export default function ChatView(props: ChatViewProps) { } const working = activeBackgroundLiveness === "working"; const liveCount = agentPanelModel.liveCount; + // Hidden once the Agents surface is on screen; the link would point at nothing. + const showViewAgents = + liveCount > 0 && !(rightPanelOpen && activeRightPanelSurface?.kind === "agents"); return { id: `background-liveness:${activeThread.id}`, variant: "default", @@ -6315,22 +6318,32 @@ export default function ChatView(props: ChatViewProps) { : "Background work" : "Monitoring", actions: ( - + <> + {showViewAgents ? ( + + ) : null} + + ), }; }, [ activeBackgroundLiveness, + activeRightPanelSurface?.kind, activeThread, + addAgentsSurface, agentPanelModel.liveCount, handleStopBackgroundWork, isStoppingBackgroundWork, + rightPanelOpen, ]); // A woken thread announces itself in the open view, not just the sidebar // pill. Dismissing marks the wake as seen (same acknowledgment as the