Skip to content

feat(data-modeling): add model status and Trino job details - #123087

Merged
trunk-io[bot] merged 7 commits into
masterfrom
posthog/models-usage-status-details
Oct 24, 2026
Merged

trunk-io[bot] merged 7 commits into
masterfrom
posthog/models-usage-status-details

Conversation

@sakce

@sakce sakce commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Teams cannot quickly find failed models by engine, inspect Managed warehouse failures in a model, or understand why usage values are unavailable. Managed warehouse jobs also omit Trino CPU usage.

Changes

  • The Models Usage tab keeps its data visible during filter reloads.
  • The status chart stacks models by engine. Selecting a bar filters the entire tab to those models.
  • The materialized view filter supports multiple models.
  • Status results remain visible when a range has only running or skipped jobs.
  • Model and job tables show N/A with an explanation when daily usage is not available.
  • Failed job pills show the job error.
  • Model details can show Managed warehouse run history when that engine is enabled. ClickHouse remains the default.
  • The selected Managed warehouse history now updates during polling.
  • Trino execution now records CPU time for successful and failed materialization runs.

Models Usage filtered to a failed model

How did you test this code?

Test rationale: API tests cover multi-model filters, latest model details, and access control. Logic tests cover tab-level filters and Managed warehouse polling. Trino tests cover CPU collection through retries and job storage. Storybook checks status-only and filtered tab states.

  • Model usage API: 21 tests passed
  • Data modeling jobs API: 11 tests passed
  • Materialization jobs logic: 40 tests passed
  • Models usage logic: 9 tests passed
  • Models Usage Storybook: 7 stories and 14 Chromium snapshots passed
  • Ruff, frontend formatting, Oxlint, OpenAPI generation, and targeted Kea type generation passed
  • The complete frontend TypeScript check reports errors only in unchanged warehouse suggestions and MCP analytics files.

Release status

  • This change is behind a feature flag and is not available to users

Docs update

None.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Codex, GPT-5

The review-hog-resolution-criteria and writing-simplified-technical-english skills were used. No matching open PR or issue was found. All committed sample data is invented.


Created with PostHog Desktop

Show model status by engine, expose managed warehouse run history and errors, and record Trino CPU usage.

Generated-By: PostHog Desktop
Task-Id: 7e0a4132-2443-4488-846d-a5d87e15fde9
@sakce sakce self-assigned this Oct 24, 2026
@trunk-io

trunk-io Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Oct 24, 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) — 4 functions above the limit (max 73)

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
MaterializationStatusPanel frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx:127 73 10
ModelsUsageTab products/data_modeling/frontend/ModelsUsageTab.tsx:69 24 10
MaterializationJobsTable products/data_modeling/frontend/MaterializationJobsTable.tsx:72 18 10
<anonymous> products/data_modeling/frontend/ModelsUsageTab.stories.tsx:274 11 10
✅ Duplication (Python) — clean

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.

✅ 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 — 🔺 +39.5 KiB (+0.1%)

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

Total: 76.61 MiB · 🔺 +39.5 KiB (+0.1%)

File Size Δ vs base
render-query/src/render-query/render-query.js 24.73 MiB 🔺 +11.7 KiB (+0.0%)
exporter/src/queries/schema.js 1.26 MiB 🔺 +10.9 KiB (+0.9%)
posthog-app/src/queries/schema.js 1.26 MiB 🔺 +10.9 KiB (+0.9%)
posthog-app/_parent/products/data_modeling/frontend/ModelsScene.js 92.5 KiB 🔺 +3.2 KiB (+3.6%)
exporter/src/exporter/scenes/ExporterNotebookScene.js 3.88 MiB 🔺 +2.3 KiB (+0.1%)

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
1019.4 KiB · 24 files 🔺 +142 B (+0.0%) █████████░ 87.0% 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.95 MiB · 620 files 🔺 +190 B (+0.0%) ██████████ 97.4% of 3.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
7.44 MiB · 2,549 files 🔺 +750 B (+0.0%) ██████████ 99.2% of 7.50 MiB
dashboard scene
src/scenes/dashboard/Dashboard.tsx
9.89 MiB · 3,716 files 🔺 +908 B (+0.0%) ██████████ 98.8% 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.61 MiB · 2,641 files 🔺 +750 B (+0.0%) ██████████ 98.4% 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.86 MiB · 2,633 files 🔺 +750 B (+0.0%) ██████████ 99.4% of 7.91 MiB
events scene
src/scenes/activity/explore/EventsScene.tsx
9.34 MiB · 3,503 files 🔺 +908 B (+0.0%) ██████████ 97.4% of 9.59 MiB
web analytics scene
src/scenes/web-analytics/WebAnalyticsScene.tsx
10.25 MiB · 3,735 files 🔺 +908 B (+0.0%) █████████░ 94.6% of 10.83 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
8.38 MiB · 3,084 files 🔺 +750 B (+0.0%) █████████░ 88.5% 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.7 KiB ../node_modules/.pnpm/@[email protected]/node_modules/@jspm/core/nodelibs/browser/process.js
4.0 KiB ../node_modules/.pnpm/[email protected]/node_modules/scheduler/cjs/scheduler.production.min.js
1.7 KiB ../node_modules/.pnpm/[email protected]/node_modules/base64-js/index.js
1.6 KiB src/index.tsx
1.3 KiB src/lib/utils/bootTiming.ts
1.2 KiB src/RootErrorBoundary.tsx
949 B src/scenes/ChunkLoadErrorBoundary.tsx
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
215.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
99.8 KiB src/products.tsx
86.2 KiB src/lib/api.ts
68.2 KiB src/lib/lemon-ui/icons/icons.tsx
41.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dnd-kit/core/dist/core.esm.js
36.4 KiB ../node_modules/.pnpm/[email protected]_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
27.0 KiB ../node_modules/.pnpm/[email protected]/node_modules/tailwind-merge/dist/bundle-mjs.mjs
24.6 KiB ../node_modules/.pnpm/[email protected]/node_modules/buffer/index.js
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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.8 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
92.5 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
86.2 KiB src/lib/api.ts
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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.8 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
144.1 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
92.5 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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.8 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
92.5 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/dist/index.js
86.2 KiB src/lib/api.ts
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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.8 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
144.1 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
92.5 KiB ../node_modules/.pnpm/[email protected]/node_modules/prosemirror-view/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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.8 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
144.1 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
92.5 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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
182.9 KiB src/queries/validators.js
153.8 KiB ../node_modules/.pnpm/[email protected]/node_modules/re2js/build/index.esm.js
144.1 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
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
285.9 KiB src/taxonomy/core-filter-definitions-by-group.json
239.8 KiB ../packages/quill/packages/quill/dist/index.js
215.9 KiB ../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.8 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
99.8 KiB src/products.tsx
94.5 KiB ../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@tiptap/core/dist/index.js
92.5 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 🔺 +142 B (+0.0%) ████░░░░░░ 40.0% of 5.72 MiB
Deferred (lazy) 2.11 MiB · 40 files 🔺 +560 B (+0.0%) 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.2 KiB dist/toolbar/toolbar-app-CRD3W4A7.css
692.2 KiB dist/toolbar/chunk-chunk-KZJS3INZ.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-LD5GP6L7.js
74.8 KiB dist/toolbar/toolbar-app-TXKYX4J5.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-WFB7UOXI.js
21.7 KiB dist/toolbar/chunk-chunk-CRQXLGRI.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 — 🔺 +444.1 KiB (+0.0%)

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

Total: 964.80 MiB · 🔺 +444.1 KiB (+0.0%)

ℹ️ 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 — all passed

All tests passed.

View test results →

@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 de8e6a0: 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/data_modeling/frontend/ModelsUsageTab.tsx
@trunk-io

trunk-io Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

sakce added 2 commits October 24, 2026 20:01
Make status bars open a model list, preserve status-only results, and refresh selected Managed warehouse history.

Generated-By: PostHog Desktop
Task-Id: 7e0a4132-2443-4488-846d-a5d87e15fde9
Generated-By: PostHog Desktop
Task-Id: 7e0a4132-2443-4488-846d-a5d87e15fde9
@sakce

sakce commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review --deep

@posthog

posthog Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

@sakce PostHog Review is reviewing this pull request.

@posthog

posthog Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PostHog Review · Deep · reviewed 7af8383

Posted 5 findings: 3 Should fix, 2 Consider.

Step Status Result
Prepare the diff done 18 files, 3 chunks
Pick perspectives done 3 perspectives
Run review passes done 8 issues (+3 blind-spot)
Merge overlapping findings done 11 → 11
Validate findings done 5 kept, 6 dismissed
Publish done 5 posted (view review)

Comment thread products/data_modeling/backend/logic/usage.py
Comment thread frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx Outdated
Comment thread products/data_modeling/frontend/ModelsUsageTab.tsx Outdated
Comment thread frontend/src/scenes/data-warehouse/saved_queries/MaterializationStatusPanel.tsx Outdated
Comment thread products/data_modeling/frontend/ModelsUsageTab.tsx
Generated-By: PostHog Desktop
Task-Id: 7e0a4132-2443-4488-846d-a5d87e15fde9
@sakce
sakce marked this pull request as ready for review October 24, 2026 20:59
@sakce sakce added the stamphog Request AI approval (no full review) label Oct 24, 2026
@parameterai

parameterai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Risk: No findings

This increment only updates frontend/snapshots.yml: re-baselined visual snapshot hashes for the Models Usage stories and hashes for two new stories (status-only, filtered-by-failed-models). These are generated image hashes with no runtime code paths, so the previously reviewed backend and frontend changes are unaffected and no new security surface exists.

Sentinel reviewed 786a5a8 · Review settings

@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.

Not approved yet — waiting on the conditions below.

Re-add the stamphog label to request another review once you have addressed this.

The size gate refused this pull request. It has 920 lines of substantive change, and the ceiling for auto-review is 800. That count excludes docs, generated files, and snapshots, and it spans 15 files, mostly in the data modeling, data warehouse, and managed warehouse code. The other gates (prerequisites, deny-list, and tier) passed, but they can't override the size result.

The author can split this into smaller pull requests, for example the Trino CPU time collection, the backend usage API changes, and the Models Usage tab frontend work. Each part could then be submitted separately. The author can also ask a human reviewer to look at it as it stands.

Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✗ too large for auto-review (920L substantive in global — ceiling is 800L; 920L, 15F total, 1333L/25F incl. docs/generated/snapshots)
tier ✓ T1-agent / T1d-complex (1333L, 25F, cross-cutting, feat)
stamphog 2.6.1 .stamphog/policy.yml @ unknown · reviewed head a1cde12

@stamphog stamphog Bot removed the stamphog Request AI approval (no full review) label Oct 24, 2026
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested review from a team October 24, 2026 21:00

@benben benben left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated review generated on behalf of @benben.

Approve. The PR adds a per-engine latest-status breakdown to the model usage API, multi-model filters on the usage and jobs endpoints, a Managed warehouse run history view, and Trino CPU time collection. The paths I traced hold up. Array params serialize to comma-separated text, which BaseInFilter accepts. last_run_at defaults to now, so running jobs fall in range. CPU usage reaches the job row on both the success and failure paths.

  • minor products/data_modeling/backend/presentation/views/usage.py:42 Removed saved_query_id param now silently ignored, returns all models. An existing API caller that passes ?saved_query_id= gets unfiltered usage for every model.
  • minor products/data_modeling/backend/logic/usage.py:102 status_breakdown is unpaginated and embeds every model name and error. A team with thousands of models gets every model and its full error text on every page request.
  • nit products/data_modeling/frontend/modelsUsageLogic.ts:441 Status lookup reverses the display label instead of keeping enum keys. Any future change to the label in modelStatusLabel makes the chart counts drop to 0.

Model: us.anthropic.claude-opus-5-5, PR authored with openai.

Generated-By: PostHog Desktop
Task-Id: 7e0a4132-2443-4488-846d-a5d87e15fde9

sakce commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the three review notes in 9f9368a.

  • The API accepts the previous saved_query_id parameter and maps it to the new list filter.
  • The status breakdown no longer includes full job error text. It keeps the complete model list because chart selection must filter to every matching model.
  • Chart counts now use status enum values. Display labels no longer control the lookup.

Verification: 21 model usage API tests and 9 Models Usage logic tests passed. OpenAPI generation, Kea type generation, formatting, and lint also passed.

@posthog

posthog Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Visual changes approved by @sakce — baseline updated in 786a5a8.

View this run in PostHog

10 changed, 4 new.

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

sakce commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

All 7 review threads are resolved and the branch is mergeable (no conflicts). The only failing checks on bcaa8b4 are Complete Visual Review run, PostHog Visual Review / storybook (partial) and Visual regression tests pass.

The gate fails because Visual Review found snapshot changes. The log says Visual Review did not complete successfully (result: failure), and the Storybook build, flake verification and all chromium shards passed. These are the expected new and changed Models Usage stories, so there is no code fix to make.

A person with Visual Review access needs to review and approve the run: https://us.posthog.com/project/2/visual-review/runs/1192ca48-4b7c-4d13-836e-a1037f854574

🦉 via talyn.dev

14 updated
Run: 1192ca48-4b7c-4d13-836e-a1037f854574

Co-authored-by: sakce <[email protected]>
@trunk-io
trunk-io Bot merged commit 1a4af3f into master Oct 24, 2026
243 checks passed
@trunk-io
trunk-io Bot deleted the posthog/models-usage-status-details branch October 24, 2026 22:48
@deployment-status-posthog

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

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-10-24 23:09 UTC Run
prod-us ✅ Deployed 2026-10-24 23:18 UTC Run
prod-eu ✅ Deployed 2026-10-24 23:20 UTC Run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants