From 67ff1bb05322fb8818e77d96521d0a0750314fef Mon Sep 17 00:00:00 2001 From: Taylor Ho Date: Sat, 27 Jun 2026 10:48:25 -0700 Subject: [PATCH] refactor(desktop): clarify activity stop affordance - Move the stop affordance fully into the Activity settings menu so the header keeps only settings and close controls. - Replace the standalone Live pill with a small settings-cog badge that appears only when the current turn can actually be stopped. - Keep the disabled stop row visible during active turns and add helper text explaining that interruption is only available for locally managed agents. Co-authored-by: Taylor Ho Signed-off-by: Taylor Ho --- .../channels/ui/AgentSessionThreadPanel.tsx | 76 ++++++++++--------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/desktop/src/features/channels/ui/AgentSessionThreadPanel.tsx b/desktop/src/features/channels/ui/AgentSessionThreadPanel.tsx index 4d5ed0b65a..ae63d84502 100644 --- a/desktop/src/features/channels/ui/AgentSessionThreadPanel.tsx +++ b/desktop/src/features/channels/ui/AgentSessionThreadPanel.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { CircleDot, Octagon, Settings, TerminalSquare } from "lucide-react"; +import { Octagon, Settings, TerminalSquare } from "lucide-react"; import { toast } from "sonner"; import { ManagedAgentSessionPanel } from "@/features/agents/ui/ManagedAgentSessionPanel"; @@ -23,7 +23,6 @@ import { auxiliaryPanelHeaderBodyOffsetClass, auxiliaryPanelContentPaddingClass, } from "@/shared/layout/AuxiliaryPanelHeader"; -import { Badge } from "@/shared/ui/badge"; import { Button } from "@/shared/ui/button"; import type { UserProfileLookup } from "@/features/profile/lib/identity"; import { @@ -34,11 +33,11 @@ import { } from "@/shared/ui/OverlayPanelBackdrop"; import { THREAD_PANEL_MIN_WIDTH_PX } from "@/shared/hooks/useThreadPanelWidth"; import { Switch } from "@/shared/ui/switch"; -import { Tooltip, TooltipContent, TooltipTrigger } from "@/shared/ui/tooltip"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, + DropdownMenuSeparator, DropdownMenuTrigger, } from "@/shared/ui/dropdown-menu"; import type { ChannelAgentSessionAgent } from "./useChannelAgentSessions"; @@ -89,6 +88,7 @@ export function AgentSessionThreadPanel({ }, [rawFeedScopeKey], ); + const canStopCurrentTurn = isWorking && canInterruptTurn; async function handleInterruptTurn() { if (!channel) { @@ -111,17 +111,12 @@ export function AgentSessionThreadPanel({ const agentHeaderActions = ( - {isLive && isWorking ? ( - - - Live - - ) : null} {isLive ? ( event.stopPropagation()} /> + {isWorking ? ( + <> + + { + void handleInterruptTurn(); + }} + title={ + canStopCurrentTurn + ? "Interrupt the current ACP turn without stopping the agent process." + : "Only locally managed agents can be interrupted from this workspace." + } + > + + + + Stop current turn + + {!canStopCurrentTurn ? ( + + Only available for locally managed agents. + + ) : null} + + + + ) : null} ) : null} - {isLive && isWorking ? ( - - - - - - {canInterruptTurn - ? "Interrupt the current ACP turn without stopping the agent process." - : "This agent cannot be interrupted from this workspace."} - - - ) : null}