From 9f0924a7adc5c783dbc76b802bd6cec2dca61dae Mon Sep 17 00:00:00 2001 From: ciregenz Date: Tue, 4 Aug 2026 21:55:12 -0700 Subject: [PATCH] [eric] chat: only the newest tool row can glow as running, and the slot keeps the page's exact aspect so the live mini sits flush --- frontend/src/app/pages/AgentChat/AgentChat.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/pages/AgentChat/AgentChat.tsx b/frontend/src/app/pages/AgentChat/AgentChat.tsx index c74425a5..8d94c6cc 100644 --- a/frontend/src/app/pages/AgentChat/AgentChat.tsx +++ b/frontend/src/app/pages/AgentChat/AgentChat.tsx @@ -273,11 +273,12 @@ const AgentChat: React.FC = ({ sessionId: sessionIdProp, onClose // Shared by the anchor slot and the fallback slot so both read as the same framed block. const browserSlotSx = { position: 'relative', - width: '100%', + // When the height cap bites, the WIDTH shrinks to keep the slot at the page's exact aspect (a maxHeight that broke the ratio left the live overlay letterboxed inside its own frame). + width: dockedSurfaceW > 0 && dockedSurfaceH > 0 ? `min(100%, calc(min(400px, 42vh) * ${dockedSurfaceW / dockedSurfaceH}))` : '100%', aspectRatio: dockedSurfaceW > 0 && dockedSurfaceH > 0 ? `${dockedSurfaceW} / ${dockedSurfaceH}` : undefined, height: dockedSurfaceW > 0 && dockedSurfaceH > 0 ? 'auto' : 'min(360px, 38vh)', - maxHeight: 'min(400px, 42vh)', minHeight: 140, + mx: 'auto', mt: 1, mb: 0.5, borderRadius: '12px', @@ -1764,7 +1765,7 @@ const AgentChat: React.FC = ({ sessionId: sessionIdProp, onClose const groupMeta = session.tool_group_meta?.[item.id]; return ( - + {compactionChip} );