summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristine betts <[email protected]>2025-08-21 17:56:18 +0000
committerGitHub <[email protected]>2025-08-21 17:56:18 +0000
commit0a7879272d2015b122e18d5bf32e0f8a5d6884ad (patch)
treef5da8590c6147d59f1203f6aa36eab48318b2937
parenta90ca626d3dfcd9b52302f42a8f7b75a836f6dfa (diff)
Fix stats display layout (#6758)
-rw-r--r--packages/cli/src/ui/components/StatsDisplay.tsx10
-rw-r--r--packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap2
-rw-r--r--packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap24
3 files changed, 19 insertions, 17 deletions
diff --git a/packages/cli/src/ui/components/StatsDisplay.tsx b/packages/cli/src/ui/components/StatsDisplay.tsx
index 8dd00efd..bcf02906 100644
--- a/packages/cli/src/ui/components/StatsDisplay.tsx
+++ b/packages/cli/src/ui/components/StatsDisplay.tsx
@@ -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:">
diff --git a/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
index 97a0b525..7c925f72 100644
--- a/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
+++ b/packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
@@ -7,7 +7,7 @@ exports[`<SessionSummaryDisplay /> > renders the summary display with a title 1`
│ │
│ Interaction Summary │
│ Session ID: │
-│ Tool Calls: 0 ( ✔ 0 ✖ 0 ) │
+│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ Code Changes: +42 -15 │
│ │
diff --git a/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
index d6842188..8106d1f5 100644
--- a/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
+++ b/packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
@@ -7,7 +7,7 @@ exports[`<StatsDisplay /> > Code Changes Display > displays Code Changes when li
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 1 ( ✔ 1 ✖ 0 ) │
+│ Tool Calls: 1 ( ✓ 1 x 0 ) │
│ Success Rate: 100.0% │
│ Code Changes: +42 -18 │
│ │
@@ -28,7 +28,7 @@ exports[`<StatsDisplay /> > Code Changes Display > hides Code Changes when no li
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 1 ( ✔ 1 ✖ 0 ) │
+│ Tool Calls: 1 ( ✓ 1 x 0 ) │
│ Success Rate: 100.0% │
│ │
│ Performance │
@@ -48,7 +48,7 @@ exports[`<StatsDisplay /> > Conditional Color Tests > renders success rate in gr
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 10 ( ✔ 10 ✖ 0 ) │
+│ Tool Calls: 10 ( ✓ 10 x 0 ) │
│ Success Rate: 100.0% │
│ │
│ Performance │
@@ -68,7 +68,7 @@ exports[`<StatsDisplay /> > Conditional Color Tests > renders success rate in re
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 10 ( ✔ 5 ✖ 5 ) │
+│ Tool Calls: 10 ( ✓ 5 x 5 ) │
│ Success Rate: 50.0% │
│ │
│ Performance │
@@ -88,7 +88,7 @@ exports[`<StatsDisplay /> > Conditional Color Tests > renders success rate in ye
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 10 ( ✔ 9 ✖ 1 ) │
+│ Tool Calls: 10 ( ✓ 9 x 1 ) │
│ Success Rate: 90.0% │
│ │
│ Performance │
@@ -108,7 +108,7 @@ exports[`<StatsDisplay /> > Conditional Rendering Tests > hides Efficiency secti
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 0 ( ✔ 0 ✖ 0 ) │
+│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ │
│ Performance │
@@ -132,7 +132,7 @@ exports[`<StatsDisplay /> > Conditional Rendering Tests > hides User Agreement w
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 2 ( ✔ 1 ✖ 1 ) │
+│ Tool Calls: 2 ( ✓ 1 x 1 ) │
│ Success Rate: 50.0% │
│ │
│ Performance │
@@ -152,7 +152,7 @@ exports[`<StatsDisplay /> > Title Rendering > renders the custom title when a ti
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 0 ( ✔ 0 ✖ 0 ) │
+│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ │
│ Performance │
@@ -172,7 +172,7 @@ exports[`<StatsDisplay /> > Title Rendering > renders the default title when no
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 0 ( ✔ 0 ✖ 0 ) │
+│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ │
│ Performance │
@@ -192,7 +192,7 @@ exports[`<StatsDisplay /> > renders a table with two models correctly 1`] = `
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 0 ( ✔ 0 ✖ 0 ) │
+│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ │
│ Performance │
@@ -221,7 +221,7 @@ exports[`<StatsDisplay /> > renders all sections when all data is present 1`] =
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 2 ( ✔ 1 ✖ 1 ) │
+│ Tool Calls: 2 ( ✓ 1 x 1 ) │
│ Success Rate: 50.0% │
│ User Agreement: 100.0% (1 reviewed) │
│ │
@@ -250,7 +250,7 @@ exports[`<StatsDisplay /> > renders only the Performance section in its zero sta
│ │
│ Interaction Summary │
│ Session ID: test-session-id │
-│ Tool Calls: 0 ( ✔ 0 ✖ 0 ) │
+│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ │
│ Performance │