Shrink AgentAvatar to sm + dim on idle instead of removing

Persistent presence is less jumpy than pop-in/out. When the model isn't
actively doing anything, the avatar collapses to the `sm` size variant,
loses its activity label, and dims to 50% opacity. Springs back to
full-size + label when activity resumes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jules
2026-05-01 20:28:54 +10:00
parent 1b2e85cdad
commit b9a163c7cc

View File

@@ -571,14 +571,19 @@ function ChatSurface({
pendingConfirm: !!pendingConfirm, pendingConfirm: !!pendingConfirm,
confirmBusy, confirmBusy,
}) })
if (activity === "idle") return null const isIdle = activity === "idle"
return ( return (
<div className="self-start"> <div
className={`self-start transition-opacity duration-300 ${
isIdle ? "opacity-50" : "opacity-100"
}`}
>
<AgentAvatar <AgentAvatar
name={activeAgent?.name ?? "Atlas"} name={activeAgent?.name ?? "Atlas"}
activity={activity} activity={activity}
initials={activeAgent ? agentInitials(activeAgent.name) : "AT"} initials={activeAgent ? agentInitials(activeAgent.name) : "AT"}
showLabel size={isIdle ? "sm" : "md"}
showLabel={!isIdle}
/> />
</div> </div>
) )