Fix stats display layout (#6758)

This commit is contained in:
christine betts
2025-08-21 17:56:18 +00:00
committed by GitHub
parent a90ca626d3
commit 0a7879272d
3 changed files with 19 additions and 17 deletions
@@ -31,7 +31,8 @@ const StatRow: React.FC<StatRowProps> = ({ title, children }) => (
<Box width={28}>
<Text color={theme.text.link}>{title}</Text>
</Box>
{children}
{/* FIX: Wrap children in a Box that can grow to fill remaining space */}
<Box flexGrow={1}>{children}</Box>
</Box>
);
@@ -47,7 +48,8 @@ const SubStatRow: React.FC<SubStatRowProps> = ({ title, children }) => (
<Box width={26}>
<Text>» {title}</Text>
</Box>
{children}
{/* FIX: Apply the same flexGrow fix here */}
<Box flexGrow={1}>{children}</Box>
</Box>
);
@@ -204,8 +206,8 @@ export const StatsDisplay: React.FC<StatsDisplayProps> = ({
<StatRow title="Tool Calls:">
<Text>
{tools.totalCalls} ({' '}
<Text color={theme.status.success}> {tools.totalSuccess}</Text>{' '}
<Text color={theme.status.error}> {tools.totalFail}</Text> )
<Text color={theme.status.success}> {tools.totalSuccess}</Text>{' '}
<Text color={theme.status.error}>x {tools.totalFail}</Text> )
</Text>
</StatRow>
<StatRow title="Success Rate:">