Skip to content

feat(mcp-analytics): add view toggles to tool quality charts - #122615

Merged
trunk-io[bot] merged 16 commits into
masterfrom
posthog/mcp-tool-quality-chart-views
Oct 23, 2026
Merged

trunk-io[bot] merged 16 commits into
masterfrom
posthog/mcp-tool-quality-chart-views

Conversation

@pauldambra

@pauldambra pauldambra commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Problem

  • People who watch MCP tool quality cannot get a second look at each chart on the Tool quality tab.
  • Errors hug the zero line on the calls chart, because there are far fewer errors than calls.
  • The p50/p95/p99 lines hide how latency spreads inside each day.
  • The request asked for one toggle per chart. It gives no other reason.

Changes

  • Each chart on the Tool quality tab now has a toggle at the top right of its card. Success rate has one "Zoom in" button, because zoom is on or off.
Chart Default Other view
Calls and errors Counts Percent: errors as a percentage of calls, as one series
Success rate Axis from 0 to 100% Zoom in: the y-axis fits the data range, so a small change near 100% is visible
Latency Trends (p50/p95/p99) Box plot per day: quartiles, median and mean, with whiskers from min to p99
  • Whiskers stop at p99, so one very slow call does not flatten every box. The tooltip still shows the true max.
  • Success rate ticks show one decimal place, so a zoomed axis does not repeat the same label.
  • The browser saves the choice for each chart.
  • The three charts go side by side when the tab is wide enough, not when the window is. With the side panel open, they now stack instead of squashing.
  • On a narrow card, the toggle wraps below the title.
  • Each switch sends mcp analytics tool quality chart view changed with the chart and the view.
  • The daily stats query also returns min, p25, mean, p75 and max latency. These fields are optional, so responses cached before this change still parse. A cached row with no spread draws no box.
  • quill BoxPlot now includes each mean in the y-axis range. Before, a mean above the whiskers was drawn off the canvas.
  • Mechanical: quill now exports CardAction, and the schema files are regenerated.

Before:

before-settled-window

After, default views:

after-settled-window

After, other views:

after-alternate-views-zoom-in

After, a narrow column (the Latency toggle wraps below its title):

wrap

Note

An earlier version had a log scale for success rate. A log scale does not spread out rates near 100%, and it cannot show 0%. Zoom in does both. Its tooltip uses the same words as the "Begin at zero" setting in insights.

How did you test this code?

  • Storybook render of the default and other views, in the screenshots above. New AlternateViews and ToggleWrapsBelowTitle stories cover the other views and the wrap. The stories now have a fixed width, because the box plot has no natural width and the snapshot shrank to 116px.
  • Not run locally: the backend test, because it needs ClickHouse. CI runs it.

Test rationale:

  • test_returns_the_latency_spread_for_box_plots catches a query that drops or swaps a spread column. The existing daily stats tests check only buckets and tool scope.
  • The buildDailyChartData tests catch a wrong error rate, a divide by zero when a bucket has no calls, and a box drawn from a cached row with no spread. They extend the existing projection test.
  • The BoxPlot test catches a mean drawn outside the y-axis, above or below the whiskers.
  • The parameterized chart view test catches a toggle that does not change the view, or that does not send the event.

Release status

  • No feature flag controls this change

Docs update

None.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: PostHog Desktop (Claude Code), claude-opus-5-5

  • Skills invoked: /paul-pair, /writing-pr-descriptions.
  • No open PR covers this. It is a new request.
  • All story data is invented.

Created with PostHog Desktop

Each chart on the tool quality tab gets a toggle at the top right:
calls and errors switch between counts and share of the period,
success rate between linear and log scale, and latency between trend
lines and a box plot. The daily stats query now also returns min, p25,
mean, p75 and max latency for the box plot.

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
@pauldambra pauldambra self-assigned this Oct 23, 2026
@trunk-io

trunk-io Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@pauldambra
pauldambra marked this pull request as ready for review October 23, 2026 11:38
@parameterai

parameterai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Risk: No findings

The only change since the last review is two updated Playwright snapshot hashes in frontend/snapshots.yml for the MCP tool quality chart stories — no production code, no security-relevant surface touched.

Sentinel reviewed baeea76 · Review settings

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team October 23, 2026 11:39
@pr-assigner-resolver-posthog

Copy link
Copy Markdown

👀 Auto-assigned reviewers

These soft owners were skipped because they only have minor changes here. Nothing blocks merge, so self-assign if you'd like a look:

  • @PostHog/platform-ux (owners.yaml)
  • @sampennington (owners.yaml)

Soft owners come from each directory's owners.yaml and each product's product.yaml (resolved nearest-file-wins). For a skipped owner, the locator is the file that decided it. Generated files and lockfiles are ignored when deciding ownership.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

⚠️ Complexity (TypeScript) — 1 function above the limit (max 13)

Cyclomatic complexity above the limit in changed typescript files (10 for production files, 15 for test files). Warn only: worth simplifying when you next touch these functions.

Function Location Complexity Limit
<anonymous> products/mcp_analytics/frontend/mcpAnalyticsToolQualityLogic.ts:720 13 10
⚠️ Duplication (Python) — 1 new duplicated block (worst 84 tokens)

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

First copy Second copy Lines Tokens
products/mcp_analytics/backend/hogql_queries/tool_quality_tables.py:388 products/mcp_analytics/backend/hogql_queries/tool_tables.py:524 16 84
✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

⚠️ Bundle size — 🔺 +162.3 KiB (+0.2%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 76.18 MiB · 🔺 +162.3 KiB (+0.2%)

File Size Δ vs base
posthog-app/src/scenes/AuthenticatedShell.js 264.5 KiB 🟢 -56.0 KiB (-17.5%)
posthog-app/_parent/products/ai_observability/frontend/evaluations/EvaluationsScene.js 82.8 KiB 🔺 +48.9 KiB (+144.3%)
render-query/src/render-query/render-query.js 24.68 MiB 🔺 +40.1 KiB (+0.2%)
posthog-app/src/layout/today/TodayShell.js 20.7 KiB 🔺 +20.7 KiB (new)
posthog-app/src/layout/today/TodayTopBar.js 20.0 KiB 🔺 +20.0 KiB (new)
posthog-app/src/layout/today/TodayContextPanelFloating.js 11.4 KiB 🔺 +11.4 KiB (new)
posthog-app/_parent/products/data_modeling/frontend/ModelsScene.js 83.6 KiB 🔺 +9.8 KiB (+13.3%)
posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.js 103.1 KiB 🔺 +7.7 KiB (+8.1%)
posthog-app/src/layout/today/TodaySidePanel.js 7.3 KiB 🔺 +7.3 KiB (new)
posthog-app/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene.js 58.8 KiB 🔺 +6.5 KiB (+12.5%)
posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation.js 102.0 KiB 🔺 +6.4 KiB (+6.7%)
posthog-app/_parent/products/endpoints/frontend/EndpointScene.js 62.1 KiB 🟢 -5.6 KiB (-8.3%)
exporter/src/queries/schema.js 1.25 MiB 🔺 +5.3 KiB (+0.4%)
posthog-app/src/queries/schema.js 1.25 MiB 🔺 +5.3 KiB (+0.4%)
posthog-app/src/scenes/activity/explore/EventDetails.js 12.7 KiB 🔺 +5.2 KiB (+68.8%)
posthog-app/_parent/products/data_catalog/frontend/DataCatalogScene.js 38.6 KiB 🔺 +5.1 KiB (+15.3%)
exporter/src/exporter/scenes/ExporterNotebookScene.js 3.88 MiB 🔺 +4.7 KiB (+0.1%)
posthog-app/_parent/products/ai_observability/frontend/AIObservabilityTraceScene.js 189.2 KiB 🔺 +4.6 KiB (+2.5%)
posthog-app/_parent/products/ai_observability/frontend/AIObservabilitySessionScene.js 14.3 KiB 🔺 +4.0 KiB (+38.6%)
posthog-app/src/scenes/project-homepage/today/TodayPulseMovers.js 2.5 KiB 🔺 +2.5 KiB (new)
exporter/src/scenes/activity/explore/EventDetails.js 6.6 KiB 🔺 +2.3 KiB (+53.5%)
posthog-app/src/scenes/project-homepage/today/TodaySparkline.js 2.2 KiB 🔺 +2.2 KiB (new)
posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene.js 200.0 KiB 🔺 +2.0 KiB (+1.0%)
exporter/_parent/products/workflows/frontend/Workflows/Workflow.js 227.0 KiB 🔺 +1.7 KiB (+0.7%)
posthog-app/src/scenes/project-homepage/today/TodayHome.js 31.5 KiB 🟢 -1.5 KiB (-4.5%)
exporter/src/lib/components/ActivityLog/describers.js 173.3 KiB 🔺 +1.3 KiB (+0.7%)
posthog-app/src/lib/components/ActivityLog/describers.js 172.9 KiB 🔺 +1.3 KiB (+0.7%)

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

✅ Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1017.3 KiB · 24 files 🟢 -21.5 KiB (-2.1%) █████████░ 86.8% of 1.14 MiB
logged-out boot: index + App + bootApp (preloaded by every page, including /login)
src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
2.92 MiB · 620 files 🟢 -19.9 KiB (-0.7%) ██████████ 96.2% of 3.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
7.28 MiB · 2,543 files 🟢 -376.0 KiB (-4.8%) ██████████ 97.2% of 7.50 MiB
dashboard scene
src/scenes/dashboard/Dashboard.tsx
9.67 MiB · 3,707 files 🟢 -12.4 KiB (-0.1%) ██████████ 96.6% of 10.01 MiB
today home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
7.45 MiB · 2,635 files 🟢 -620.7 KiB (-7.5%) ██████████ 96.3% of 7.74 MiB
AI-first home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
7.54 MiB · 2,616 files 🟢 -374.5 KiB (-4.6%) ████████░░ 84.1% of 8.96 MiB
events scene
src/scenes/activity/explore/EventsScene.tsx
9.14 MiB · 3,497 files 🟢 -14.1 KiB (-0.1%) ██████████ 95.3% of 9.59 MiB
web analytics scene
src/scenes/web-analytics/WebAnalyticsScene.tsx
10.00 MiB · 3,715 files 🟢 -14.1 KiB (-0.1%) █████████░ 92.3% of 10.83 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
8.21 MiB · 3,077 files 🟢 -15.2 KiB (-0.2%) █████████░ 86.7% of 9.47 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/zod/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/billing/billingLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayShell.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayContextPanelFloating.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodaySidePanel.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayTopBar.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/todayRailItems.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/queries/validators.js stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 packages/quill/packages/charts/ stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/VisualizationWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/RecordingsWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/api/primitives.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/notebooks/Notebook/notebookLogic.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/validators.js stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/LiveMetricsDashboard/LiveWebAnalyticsMetrics.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 products/product_analytics/frontend/insights/trends/WorldMap/countryVectors.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/scenes/settings/SettingsMap.tsx stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 @jspm/core/nodelibs/browser/fs stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/[email protected]/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@[email protected]/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/[email protected]/node_modules/base64-js/index.js
1.4 KiB src/index.tsx
1.3 KiB src/RootErrorBoundary.tsx
1.3 KiB src/lib/utils/bootTiming.ts
912 B ../node_modules/.pnpm/[email protected]/node_modules/ieee754/index.js
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
69.4 KiB src/lib/lemon-ui/icons/icons.tsx
38.7 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dnd-kit/core/dist/core.esm.js
33.9 KiB ../node_modules/.pnpm/[email protected]_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
29.4 KiB src/scenes/scenes.ts
27.2 KiB src/lib/constants.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
143.3 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
143.3 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
Largest files eagerly shipped from src/scenes/web-analytics/WebAnalyticsScene.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
183.2 KiB src/queries/validators.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
143.3 KiB ../packages/quill/packages/primitives/dist/index.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Size File
322.5 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/module.mjs
316.1 KiB ../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/posthog-js/dist/rrweb.js
286.8 KiB src/taxonomy/core-filter-definitions-by-group.json
238.5 KiB ../packages/quill/packages/quill/dist/index.js
220.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.production.min.js
106.3 KiB src/products.tsx
98.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

✅ Toolbar bundle — eager 2.29 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.29 MiB · 18 files 🔺 +3.8 KiB (+0.2%) ████░░░░░░ 40.0% of 5.72 MiB
Deferred (lazy) 2.11 MiB · 40 files no change n/a — loads on demand
Loader dist/toolbar.js 1.2 KiB no change █░░░░░░░░░ 6.0% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
902.3 KiB dist/toolbar/toolbar-app-H43FZED4.css
692.2 KiB dist/toolbar/chunk-chunk-WL2D7OAJ.js
260.7 KiB dist/toolbar/chunk-chunk-L6XVLVLY.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
130.4 KiB dist/toolbar/chunk-chunk-MTCESV7H.js
74.8 KiB dist/toolbar/toolbar-app-EINNPTP2.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-55A25CQ4.js
21.7 KiB dist/toolbar/chunk-chunk-XMNR6OPK.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +2.38 MiB (+0.2%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1022.98 MiB · 🔺 +2.38 MiB (+0.2%)

ℹ️ MCP UI apps size — 34 app(s), 27969.1 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 844.3 KB 209.1 KB
action 767.7 KB 209.1 KB
action-list 835.3 KB 209.1 KB
cohort 766.7 KB 209.1 KB
cohort-list 834.3 KB 209.1 KB
email-template 766.6 KB 209.1 KB
error-details 771.6 KB 209.1 KB
error-issue 768.9 KB 209.1 KB
error-issue-list 836.7 KB 209.1 KB
experiment 832.4 KB 209.1 KB
experiment-list 836.1 KB 209.1 KB
experiment-results 834.9 KB 209.1 KB
feature-flag 834.7 KB 209.1 KB
feature-flag-list 838.4 KB 209.1 KB
feature-flag-testing 770.0 KB 209.1 KB
inline-scan 767.2 KB 209.1 KB
insight-actors 833.8 KB 209.1 KB
llm-costs 831.1 KB 209.1 KB
session-recording 768.9 KB 209.1 KB
survey 768.3 KB 209.1 KB
survey-global-stats 831.1 KB 209.1 KB
survey-list 836.0 KB 209.1 KB
survey-stats 831.1 KB 209.1 KB
trace-span 767.1 KB 209.1 KB
trace-span-list 835.2 KB 209.1 KB
vision-observation-list 834.4 KB 209.1 KB
workflow 767.0 KB 209.1 KB
workflow-list 834.7 KB 209.1 KB
workflow-setup-status 766.7 KB 209.1 KB
query-results 1086.5 KB 209.1 KB
render-ui 1162.4 KB 209.1 KB
visual-review-snapshots 771.6 KB 209.1 KB
workflow-data-suggestions 769.4 KB 209.1 KB
workflow-sending-rules 768.0 KB 209.1 KB
⚠️ Playwright — 1 flaky

🎭 Playwright report · View test results →

⚠️ 1 flaky test:

  • Creating a SQL insight with a variable and overriding it on a dashboard (chromium)

These issues are not necessarily caused by your changes.
Annoyed by this section? Help fix flakies and failures and it will go green!

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 928bfc6: 2 Should fix.

This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated

@pauldambra pauldambra left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Robot]

Note

🤖 Automated comment by QA Swarm — not written by a human

QA Swarm review complete. See inline comments.

Comment thread products/mcp_analytics/backend/hogql_queries/tool_quality_tables.py Outdated
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
@pauldambra

pauldambra commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

[Robot]

Note

🤖 Automated comment by QA Swarm — not written by a human

Multi-perspective review: router (cheap-first pass) + delegated lenses (qa-team, paul-reviewer, xp-reviewer, security-audit, engineering-systems-thinking as warranted)

Verdict: 💬 APPROVE WITH NITS (round 2 @ ba73aa6)

The round 1 fixes hold, and each has a test that would catch a regression. No correctness, security or data bugs. One medium question about whether the disabled Log reason is visible, plus low-risk design notes.

Key findings

  • 🟡 MEDIUM: the disabled Log toggle uses a native title, which may not show on a disabled control; quill Button has disabledReason for this.
  • 🟢 LOW: pure view helpers (successRateScale, maskIncompleteLatencyBox) live in the component; they fit as selectors in the kea logic.
  • 🟢 LOW: a saved Log choice is shown as Linear while a 0% day is in range, and the user cannot pick Linear for real.
  • 🟢 LOW: log scale on a 90-100% success rate may show less than linear (product question).
  • 🟢 LOW: CardHeader flex override works but overrides quill's grid from outside.
  • 🟢 LOW: five separate quantile() calls could be one quantiles(...) call.
  • 🟢 LOW: schema-general.ts spread fields are number, but the API now sends null.
  • ⚪ NIT: error-rate-only Percent view and card title; persisted chartViews not merged with defaults.

Convergence

  • View logic in the component instead of the kea logic: flagged by router and paul independently.

Reviewer summaries

Reviewer Assessment
🧭 router No bugs since 928bfc6; danger LOW, confidence medium-high; delegated toggle, card header and logic hunks to paul-reviewer (diff over 400 lines).
👤 paul Nothing blocking; check the disabled reason is visible, then move the helpers into the logic.
Previous rounds (1)

round 1 @ 928bfc6 — APPROVE WITH NITS: toggles, persistence, capture and quantile SQL sound; nits fixed in f2d0af5 and later commits.


Automated by QA Swarm — not a human review

@hosthog

hosthog Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

HostHog preview — storybook-quill

The previews for this PR have been torn down and no longer serve.

Coerce missing latency aggregates to None instead of 0 so a bucket with
no durations doesn't draw a flat zero box, mask the box plot's
in-progress bucket the same way the line charts already dash theirs,
and give each chart's view toggle its own aria-label instead of three
toggles sharing "Chart view".

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
@trunk-io

trunk-io Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed a70949e: 1 Should fix.

Comment thread products/mcp_analytics/frontend/mcpAnalyticsToolQualityLogic.ts
Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed ba73aa6: 1 Should fix.

This is review round 3 on this pull request. When findings keep coming back in the same code, the approach is usually the problem. Before the next fix, check whether a different design would remove the whole class of findings.

Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx

@pauldambra pauldambra left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Robot]

Note

🤖 Automated comment by QA Swarm — not written by a human

QA Swarm review complete (round 2 @ ba73aa6). See inline comments.

Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
Comment thread products/mcp_analytics/frontend/tool-quality/ToolQualityCharts.tsx Outdated
Comment thread products/mcp_analytics/frontend/dashboard/Card.tsx
Comment thread products/mcp_analytics/frontend/mcpAnalyticsToolQualityLogic.ts
Comment thread products/mcp_analytics/backend/hogql_queries/tool_quality_tables.py Outdated
Comment thread frontend/src/queries/schema/schema-general.ts Outdated
Show the box plot tooltip values in the same unit as the y-axis,
title the calls card "Error rate" in percent mode, and type the
latency spread fields as nullable to match what the API sends.

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
@posthog

posthog Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🕓 This approval covered an earlier revision. There are new visual changes to review in the newer comment below.

✅ Visual changes approved by @pauldambra — baseline updated in 7ad07c5.

View this run in PostHog

6 changed, 4 new.

Install the Visual Review Chrome extension to see visual review results at the top of your pull requests.

posthog Bot and others added 4 commits October 23, 2026 14:43
10 updated
Run: 51bf4da9-5c35-4c57-a787-1493441accfc

Co-authored-by: pauldambra <[email protected]>
…logic

The latency box mask and the log scale fallback are now selectors in
mcpAnalyticsToolQualityLogic. The chart component only draws what it gets.

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
ToggleGroupItem takes disabledReason. It disables the item and forwards
the reason to Button, which shows it in a tooltip. The chart view toggle
uses it in place of a native title attribute.

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
…oggle

A log scale does not spread out rates near 100% and cannot show 0%.
Zoom fits the y-axis to the data range, so small changes are visible.

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
Zoom is an on/off setting, so one "Zoom in" button reads better than
two options. The tooltip matches the "Begin at zero" insight setting.

Generated-By: PostHog Desktop
Task-Id: 5f7d1523-7072-4662-a685-6723b9b62f9b
@posthog

posthog Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Visual changes approved by @pauldambra — baseline updated in baeea76.

View this run in PostHog

2 changed.

Changed

Snapshot Before After
scenes-app-mcp-analytics-tool-quality-charts--alternate-views--dark before after
scenes-app-mcp-analytics-tool-quality-charts--alternate-views--light before after

Install the Visual Review Chrome extension to see visual review results at the top of your pull requests.

2 updated
Run: f7631b18-c4db-40e7-a9c4-153040d4d6ab

Co-authored-by: pauldambra <[email protected]>
@pauldambra pauldambra added the stamphog Request AI approval (no full review) label Oct 23, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The additive query-response contract change has owning-team authorship and targeted tests, although there are no current-head independent reviews. The supplied historical concerns are addressed or nonblocking in the current code; no additional refusal grounds were found.

  • Author wrote 12% of the modified lines and has 199 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 580L, 13F substantive, 801L/20F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (801L, 20F, cross-cutting, feat)
stamphog 2.6.1 .stamphog/policy.yml @ baeea76 · reviewed head baeea76

@trunk-io
trunk-io Bot merged commit 999a686 into master Oct 23, 2026
285 checks passed
@trunk-io
trunk-io Bot deleted the posthog/mcp-tool-quality-chart-views branch October 23, 2026 21:56
@deployment-status-posthog

deployment-status-posthog Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-10-23 22:20 UTC Run
prod-us ✅ Deployed 2026-10-23 22:34 UTC Run
prod-eu ✅ Deployed 2026-10-23 22:34 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant