diff --git a/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx index f42362cf..4f713a79 100644 --- a/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx @@ -67,79 +67,97 @@ export const CompactMcpBubble: React.FC = ({ ? : null; + // Once expanded (and there's a label above it), the args drop to their own full-width line instead of fighting the label for a cramped column that breaks URLs mid-token. + const stackBelow = showBody && canToggleDetails && !hideVerbLabel && !!visibleSummary && !isError; + return ( - {ServiceIcon} - {!hideVerbLabel && ( + + {ServiceIcon} + {!hideVerbLabel && ( + + {serviceLabel} + + )} + {visibleSummary && !isError && !stackBelow && ( + + {visibleSummary} + + )} + {(stackBelow || !visibleSummary) && !showTimer && } + {showTimer && ( + <> + + + + )} + {isDenied && ( + + + denied + + )} + {result && !isDenied && ( + + {isError && ( + + )} + {resultElapsedMs != null && ( + + {formatElapsed(resultElapsedMs)} + + )} + + )} + {canToggleDetails && ( + + {showBody ? : } + + )} + + {stackBelow && ( - {serviceLabel} - - )} - {visibleSummary && !isError && ( - {visibleSummary} )} - {!visibleSummary && !showTimer && } - {showTimer && ( - <> - - - - )} - {isDenied && ( - - - denied - - )} - {result && !isDenied && ( - - {isError && ( - - )} - {resultElapsedMs != null && ( - - {formatElapsed(resultElapsedMs)} - - )} - - )} - {canToggleDetails && ( - - {showBody ? : } - - )}