Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(dashboard): smaller ex-home panel defaults + widgets adapt to panel height (LFE-10813) (#14952)

Nikita Kabardin969aaba74954
diff --git a/packages/shared/src/domain/home-dashboard.ts b/packages/shared/src/domain/home-dashboard.ts
index 9c6ea7ae8e..66b8d1eecb 100644
--- a/packages/shared/src/domain/home-dashboard.ts
+++ b/packages/shared/src/domain/home-dashboard.ts
@@ -56,28 +56,29 @@ const placement = (
export const LANGFUSE_HOME_DASHBOARD_DEFINITION: DashboardDefinition = {
widgets: [
// Grid rows are 16:9-proportional to column width (see DashboardGrid), so
- // row heights shrink with the viewport while the Home cards have fixed
- // intrinsic minimum heights (headline metrics, tabs, min-h chart floors).
- // Sizes below fit the densest card down to ~1240px viewports; below that
- // the preset tile scrolls internally, and below 1025px the grid stacks.
+ // tiles grow with the viewport while the Home cards' content has fixed
+ // minimum heights. Cards adapt to their tile (charts stretch to absorb
+ // extra height; a too-short tile scrolls internally), so sizes below
+ // target a comfortable content fit at typical ~1300–1500px grid widths
+ // rather than the worst case. Below 1024px the grid stacks. (LFE-10813)
// Row 1: overview tables
- placement("home-traces", 0, 0, 4, 6),
- placement("home-model-costs", 4, 0, 4, 6),
- placement("home-scores-table", 8, 0, 4, 6),
+ placement("home-traces", 0, 0, 4, 5),
+ placement("home-model-costs", 4, 0, 4, 5),
+ placement("home-scores-table", 8, 0, 4, 5),
// Row 2: traffic + usage time series (tabbed cards with headline metrics
// have the largest intrinsic height)
- placement("home-traces-obs-time-series", 0, 6, 6, 8),
- placement("home-model-usage", 6, 6, 6, 8),
+ placement("home-traces-obs-time-series", 0, 5, 6, 6),
+ placement("home-model-usage", 6, 5, 6, 6),
// Row 3: users + scores over time
- placement("home-users", 0, 14, 6, 7),
- placement("home-chart-scores", 6, 14, 6, 7),
+ placement("home-users", 0, 11, 6, 6),
+ placement("home-chart-scores", 6, 11, 6, 6),
// Row 4: latency percentile tables
- placement("home-latency-table-traces", 0, 21, 4, 6),
- placement("home-latency-table-generations", 4, 21, 4, 6),
- placement("home-latency-table-observations", 8, 21, 4, 6),
+ placement("home-latency-table-traces", 0, 17, 4, 5),
+ placement("home-latency-table-generations", 4, 17, 4, 5),
+ placement("home-latency-table-observations", 8, 17, 4, 5),
// Row 5+: full-width analytics
- placement("home-generation-latency", 0, 27, 12, 8),
- placement("home-score-analytics", 0, 35, 12, 7),
+ placement("home-generation-latency", 0, 22, 12, 6),
+ placement("home-score-analytics", 0, 28, 12, 6),
],
};
@@ -89,5 +90,5 @@ export const LANGFUSE_HOME_DASHBOARD = {
definition: LANGFUSE_HOME_DASHBOARD_DEFINITION,
filters: [],
createdAt: "2026-07-06T00:00:00.000Z",
- updatedAt: "2026-07-06T13:00:00.000Z",
+ updatedAt: "2026-07-09T00:00:00.000Z",
};
diff --git a/web/src/features/dashboard/components/ChartScores.tsx b/web/src/features/dashboard/components/ChartScores.tsx
index 6892527e70..da0e916127 100644
--- a/web/src/features/dashboard/components/ChartScores.tsx
+++ b/web/src/features/dashboard/components/ChartScores.tsx
@@ -118,7 +118,11 @@ export function ChartScores(props: {
isLoading={props.isLoading || scores.isPending}
>
{!isEmptyTimeSeries({ data: extractedScores }) ? (
- <div className="h-80 w-full shrink-0">
+ // The height is the flex basis (floor); grow lets the chart absorb
+ // extra tile height. On grid (lg) screens the floor is smaller so
+ // tiles fit narrow viewports — grow recovers the height above the
+ // grid's rowHeight floor. (LFE-10813)
+ <div className="h-80 w-full shrink-0 grow lg:h-56">
<Chart
chartType="LINE_TIME_SERIES"
data={chartData}
@@ -132,7 +136,7 @@ export function ChartScores(props: {
isLoading={props.isLoading || scores.isPending}
description="Scores evaluate LLM quality and can be created manually or using the SDK."
href="https://langfuse.com/docs/evaluation/overview"
- className="h-full"
+ className="h-auto grow"
/>
)}
</DashboardCard>
diff --git a/web/src/features/dashboard/components/LatencyChart.tsx b/web/src/features/dashboard/components/LatencyChart.tsx
index fc914b5339..e3b2d66bc1 100644
--- a/web/src/features/dashboard/components/LatencyChart.tsx
+++ b/web/src/features/dashboard/components/LatencyChart.tsx
@@ -177,7 +177,11 @@ export const GenerationLatencyChart = ({
content: (
<>
{!isEmptyTimeSeries({ data: item.data }) ? (
- <div className="h-80 w-full shrink-0">
+ // The height is the flex basis (floor); grow lets the chart absorb
+ // extra tile height. On grid (lg) screens the floor is smaller so
+ // tiles fit narrow viewports — grow recovers the height above the
+ // grid's rowHeight floor. (LFE-10813)
+ <div className="h-80 w-full shrink-0 grow lg:h-56">
<DashboardLineTimeSeriesChart
data={item.data}
label="Latency"
@@ -189,6 +193,7 @@ export const GenerationLatencyChart = ({
) : (
<NoDataOrLoading
isLoading={isLoading || latencies.isPending}
+ className="h-auto grow"
/>
)}
</>
diff --git a/web/src/features/dashboard/components/ModelUsageChart.tsx b/web/src/features/dashboard/components/ModelUsageChart.tsx
index 23c273374e..fe8f60bc93 100644
--- a/web/src/features/dashboard/components/ModelUsageChart.tsx
+++ b/web/src/features/dashboard/components/ModelUsageChart.tsx
@@ -387,9 +387,14 @@ export const ModelUsageChart = ({
queryResult.isPending ? (
<NoDataOrLoading
isLoading={isLoading || queryResult.isPending}
+ className="h-auto grow"
/>
) : (
- <div className="h-80 w-full shrink-0">
+ // The height is the flex basis (floor); grow lets the chart absorb
+ // extra tile height. On grid (lg) screens the floor is smaller so
+ // tiles fit narrow viewports — grow recovers the height above the
+ // grid's rowHeight floor. (LFE-10813)
+ <div className="h-80 w-full shrink-0 grow lg:h-56">
<DashboardLineTimeSeriesChart
data={item.data}
label={item.chartMetricLabel}
diff --git a/web/src/features/dashboard/components/TabsComponent.tsx b/web/src/features/dashboard/components/TabsComponent.tsx
index 5120c97e64..a6d1b28f04 100644
--- a/web/src/features/dashboard/components/TabsComponent.tsx
+++ b/web/src/features/dashboard/components/TabsComponent.tsx
@@ -13,7 +13,9 @@ export const TabComponent = ({ tabs }: TabComponentProps) => {
const [selectedIndex, setSelectedIndex] = useState(0);
const capture = usePostHogClientCapture();
return (
- <div>
+ // Grows inside the card's flex column so tab content (charts) can absorb
+ // extra tile height on dashboards. (LFE-10813)
+ <div className="flex grow flex-col">
<div className="sm:hidden">
<label htmlFor="tabs" className="sr-only">
Select a tab
@@ -59,7 +61,9 @@ export const TabComponent = ({ tabs }: TabComponentProps) => {
</nav>
</div>
</div>
- <div className="mt-4 flex flex-col">{tabs[selectedIndex]?.content}</div>
+ <div className="mt-4 flex grow flex-col">
+ {tabs[selectedIndex]?.content}
+ </div>
</div>
);
};
diff --git a/web/src/features/dashboard/components/TracesBarListChart.tsx b/web/src/features/dashboard/components/TracesBarListChart.tsx
index 0250eaff40..8b820d7a0a 100644
--- a/web/src/features/dashboard/components/TracesBarListChart.tsx
+++ b/web/src/features/dashboard/components/TracesBarListChart.tsx
@@ -134,8 +134,11 @@ export const TracesBarListChart = ({
description="Total traces tracked"
/>
{adjustedData.length > 0 ? (
+ // The computed height is the flex basis (floor); grow lets the chart
+ // absorb extra tile height on dashboards — bar thickness stays
+ // capped, only the spacing stretches. (LFE-10813)
<div
- className="mt-4 w-full"
+ className="mt-4 w-full shrink-0 grow"
style={{
minHeight: 200,
height: Math.max(
@@ -170,6 +173,7 @@ export const TracesBarListChart = ({
isLoading={isLoading || traces.isPending || totalTraces.isPending}
description="Traces contain details about LLM applications and can be created using the SDK."
href="https://langfuse.com/docs/get-started"
+ className="h-auto grow"
/>
)}
<ExpandListButton
diff --git a/web/src/features/dashboard/components/TracesTimeSeriesChart.tsx b/web/src/features/dashboard/components/TracesTimeSeriesChart.tsx
index 497f7e167e..809cc34c86 100644
--- a/web/src/features/dashboard/components/TracesTimeSeriesChart.tsx
+++ b/web/src/features/dashboard/components/TracesTimeSeriesChart.tsx
@@ -207,7 +207,11 @@ export const TracesAndObservationsTimeSeriesChart = ({
}
/>
{!isEmptyTimeSeries({ data: item.data }) ? (
- <div className="h-80 w-full shrink-0">
+ // The height is the flex basis (floor); grow lets the chart absorb
+ // extra tile height. On grid (lg) screens the floor is smaller so
+ // tiles fit narrow viewports — grow recovers the height above the
+ // grid's rowHeight floor. (LFE-10813)
+ <div className="h-80 w-full shrink-0 grow lg:h-56">
<DashboardLineTimeSeriesChart
data={item.data}
label={item.chartMetricLabel}
@@ -228,6 +232,7 @@ export const TracesAndObservationsTimeSeriesChart = ({
}
description="Traces contain details about LLM applications and can be created using the SDK."
href="https://langfuse.com/docs/observability/overview"
+ className="h-auto grow"
/>
)}
</>
diff --git a/web/src/features/dashboard/components/UserChart.tsx b/web/src/features/dashboard/components/UserChart.tsx
index 00c59a7a8d..bf41367a43 100644
--- a/web/src/features/dashboard/components/UserChart.tsx
+++ b/web/src/features/dashboard/components/UserChart.tsx
@@ -159,7 +159,10 @@ export const UserChart = ({
0,
);
- const BAR_ROW_HEIGHT = 36;
+ // Slightly tighter rows than TracesBarListChart: this card also stacks tabs
+ // and an expand button, and grow stretches the spacing back out whenever the
+ // tile offers more height. (LFE-10813)
+ const BAR_ROW_HEIGHT = 32;
const CHART_AXIS_PADDING = 32;
const data = [
@@ -200,13 +203,17 @@ export const UserChart = ({
content: (
<>
{item.data.length > 0 ? (
- <div className="flex flex-col">
+ <div className="flex grow flex-col">
<TotalMetric
metric={item.totalMetric}
description={item.metricDescription}
/>
+ {/* The computed height is the flex basis (floor); grow
+ lets the chart absorb extra tile height on dashboards —
+ bar thickness stays capped, only the spacing
+ stretches. (LFE-10813) */}
<div
- className="mt-4 w-full"
+ className="mt-4 w-full shrink-0 grow"
style={{
minHeight: 200,
height: Math.max(
@@ -240,6 +247,7 @@ export const UserChart = ({
isLoading={isLoading || user.isPending}
description="Consumption per user is tracked by passing their ids on traces."
href="https://langfuse.com/docs/observability/features/users"
+ className="h-auto grow"
/>
)}
</>
diff --git a/web/src/features/dashboard/components/cards/DashboardTable.tsx b/web/src/features/dashboard/components/cards/DashboardTable.tsx
index c59c20f48b..90d8b4e7dc 100644
--- a/web/src/features/dashboard/components/cards/DashboardTable.tsx
+++ b/web/src/features/dashboard/components/cards/DashboardTable.tsx
@@ -91,7 +91,12 @@ export const DashboardTable = ({
) : null}
</div>
) : (
- <NoDataOrLoading isLoading={isLoading} {...noDataProps} />
+ // Fills leftover tile height inside the card's flex column. (LFE-10813)
+ <NoDataOrLoading
+ isLoading={isLoading}
+ {...noDataProps}
+ className="h-auto grow"
+ />
)}
</>
);
diff --git a/web/src/features/widgets/components/DashboardGrid.tsx b/web/src/features/widgets/components/DashboardGrid.tsx
index 34b0732cb1..7e2689d6e3 100644
--- a/web/src/features/widgets/components/DashboardGrid.tsx
+++ b/web/src/features/widgets/components/DashboardGrid.tsx
@@ -99,11 +99,19 @@ export function DashboardGrid({
readOnly?: boolean;
}) {
const { containerRef, width } = useDebouncedContainerWidth(200);
- // Rows stay 16:9-proportional to column width
- const rowHeight = width !== null ? ((width / 12) * 9) / 16 : 150;
-
- // Detect if screen is medium or smaller (1024px and below)
- const isSmallScreen = useMediaQuery("(max-width: 1024px)");
+ // Rows stay 16:9-proportional to column width, with a floor so tiles keep a
+ // usable height on narrow screens — below the floor, widget content (chart
+ // floors, table rows) no longer fits and tiles scroll internally; the grid
+ // grows vertically instead. (LFE-10813)
+ const MIN_ROW_HEIGHT = 58;
+ const rowHeight =
+ width !== null ? Math.max(MIN_ROW_HEIGHT, ((width / 12) * 9) / 16) : 150;
+
+ // Detect if screen is medium or smaller (below 1024px). Exact complement of
+ // Tailwind's `lg:` breakpoint: widget content uses `lg:` variants for its
+ // grid-mode sizing (e.g. smaller chart flex bases that rely on grow), so the
+ // stacked layout must never overlap them. (LFE-10813)
+ const isSmallScreen = useMediaQuery("(max-width: 1023.98px)");
// Convert WidgetPlacement to react-grid-layout format
const layout = widgets.map((w) => ({