Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(mcp-analytics): draw the error rate trend line in red (#126241)

Georgis Andonis255ae901ad07
diff --git a/products/mcp_analytics/frontend/leaderboardHome/MCPAnalyticsLeaderboardHome.tsx b/products/mcp_analytics/frontend/leaderboardHome/MCPAnalyticsLeaderboardHome.tsx
index 21c6b6d5094f..16dfe1ba3caf 100644
--- a/products/mcp_analytics/frontend/leaderboardHome/MCPAnalyticsLeaderboardHome.tsx
+++ b/products/mcp_analytics/frontend/leaderboardHome/MCPAnalyticsLeaderboardHome.tsx
@@ -92,8 +92,10 @@ export function MCPAnalyticsLeaderboardHome(): JSX.Element {
const reliabilityUnavailable = reliabilityFailed || reliabilityRows.length === 0
const harnessErrorRows = useMemo(() => harnessErrorRateRows(harnessRows), [harnessRows])
const errorRateLines = useMemo(
- () => [{ key: 'error-rate', label: 'Error rate', data: reliabilitySeries.errorRatePct }],
- [reliabilitySeries]
+ () => [
+ { key: 'error-rate', label: 'Error rate', color: theme.colors[4], data: reliabilitySeries.errorRatePct },
+ ],
+ [reliabilitySeries, theme]
)
const latencyLines = useMemo(
() => [
diff --git a/products/mcp_analytics/frontend/leaderboardHome/TrendLineCard.tsx b/products/mcp_analytics/frontend/leaderboardHome/TrendLineCard.tsx
index 1692c64134c7..493db019980c 100644
--- a/products/mcp_analytics/frontend/leaderboardHome/TrendLineCard.tsx
+++ b/products/mcp_analytics/frontend/leaderboardHome/TrendLineCard.tsx
@@ -19,6 +19,7 @@ export interface TrendLine {
key: string
label: string
data: number[]
+ color?: string
}
export function TrendLineCard({
@@ -45,7 +46,7 @@ export function TrendLineCard({
formatTick: (value: number) => string
}): JSX.Element {
const series = useMemo<Series[]>(
- () => lines.map((line, index) => ({ ...line, color: theme.colors[index % theme.colors.length] })),
+ () => lines.map((line, index) => ({ ...line, color: line.color ?? theme.colors[index % theme.colors.length] })),
[lines, theme]
)
const config = useChartConfig<TimeSeriesLineChartConfig>(