Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ function OverviewPanel({
title,
subtitle,
disabled,
fill,
children,
}: {
title: string
subtitle?: React.ReactNode
disabled?: boolean
fill?: boolean
children: React.ReactNode
}): JSX.Element {
return (
<div
className={`border rounded p-4 space-y-3 ${
className={`border rounded p-4 space-y-3 ${fill ? 'h-full flex flex-col' : ''} ${
disabled ? 'bg-surface-secondary opacity-60' : 'bg-surface-primary'
}`}
>
Expand Down Expand Up @@ -184,8 +186,8 @@ function ScorerOverview({ scannerId }: { scannerId: string }): JSX.Element {
)
}
return (
<OverviewPanel title="Score distribution" subtitle={`${scorerSummary.count} scored`}>
<div className="h-40 flex flex-col">
<OverviewPanel title="Score distribution" subtitle={`${scorerSummary.count} scored`} fill>
<div className="flex-1 min-h-40 flex flex-col">
<BarChart
labels={scorerHistogram.labels}
series={[{ key: 'count', label: 'Sessions', color: theme.colors[0], data: scorerHistogram.counts }]}
Expand Down Expand Up @@ -225,11 +227,12 @@ export function ScannerOverview({ scannerId }: { scannerId: string }): JSX.Eleme
// Scorer puts its line chart and score-distribution histogram side by side to reclaim vertical space.
if (scannerType === 'scorer') {
return (
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 items-start">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
{/* min-w-0 lets the canvas charts shrink inside their grid tracks instead of overflowing */}
<div className="min-w-0">
<ScannerInsightsChart scannerId={scannerId} scannerType={scannerType} />
</div>
{/* The histogram fills to match the taller line chart, so the row has no dead space (stretch is the grid default). */}
<div className="min-w-0">{typeOverview}</div>
</div>
)
Expand Down
Loading