Skip to content

feat(logs): explain-changes pivot from the logs view - #69712

Merged
jonmcwest merged 3 commits into
masterfrom
posthog-code/logs-explain-spike
Jul 13, 2026
Merged

feat(logs): explain-changes pivot from the logs view#69712
jonmcwest merged 3 commits into
masterfrom
posthog-code/logs-explain-spike

Conversation

@jonmcwest

Copy link
Copy Markdown
Contributor

Problem

The compare mode (previous PR in this stack) answers "what changed" — but only if you already know to open the Patterns view and flip the toggle. The natural moment for that question is while looking at a spike on the Logs view's volume chart, and there's no path from there.

Changes

Stacked on the compare-mode PR. The design leans on two things that already exist: drag-selecting on the sparkline already zooms the date range to the selection, and the alert detail scene embeds the full LogsViewer — so one button in the display bar covers both entry points named in the plan, with no new popover container and no backend changes.

  • "Explain changes" button in the Logs display bar (patterns flag gated, Logs lens only): one click opens the Patterns view in compare mode against the preceding period. The flow for a spike is drag-select the spike (existing zoom) then click Explain — the compare table sorted most-interesting-first is the explanation, pivot-to-matching-lines included.
  • Compare state moved from logsPatternsLogic to logsViewerConfigLogic (where viewMode lives). The patterns logic is unmounted while in Logs view, so the button couldn't reach state living there; the move also means the compare choice now survives Logs↔Patterns lens switches instead of silently resetting. The patterns logic connects to the moved values/actions, so its public interface (and the compare-mode UI) is unchanged.
  • Atomic openPatternsComparison(mode) action sets view mode + compare + baseline in one dispatch, so callers in other views can't half-configure the pivot. logsPatternsLogic's afterMount now checks for pre-armed compare and loads the diff instead of the plain mine.
  • MCP prompt: the diff tool's description gains the matching one-call spike recipe ("set the spike window, baseline just before it — don't mine two windows and diff them yourself").

How did you test this code?

  • 1 new logic test (12 total pass): openPatternsComparison dispatched before the patterns logic mounts arms compare so mounting loads the diff, not the plain mine — that armed-before-mount handoff is the entire feature's wiring and nothing else exercises it. The 11 existing tests passing unchanged is itself the evidence the state move preserved the logic's interface.
  • Typecheck clean on touched files; kea typegen regenerated for both logics.
  • Not done: live end-to-end pass (shared caveat with the rest of the stack before undrafting).

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Built with Claude Code (PostHog Code task) using the /writing-kea-logics and /writing-tests skills. Decisions: rejected a popover-on-sparkline-selection design after exploring the viewer — selection already zooms synchronously (no interception point without changing that behavior), the product has no chart-popover pattern to follow, and reusing the compare table avoids duplicating diff rendering in a second container; chose the display bar over the sparkline itself so the affordance works even without a selection (explains the whole current window) and is inherited by the alert scene's embedded viewer.


Created with PostHog Code

@jonmcwest jonmcwest self-assigned this Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

Bundle size — 🟢 -6.98 MiB (-10.0%)

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

Total: 63.04 MiB · 🟢 -6.98 MiB (-10.0%)

File Size Δ vs base
render-query/src/render-query/render-query.js 21.21 MiB 🟢 -2.97 MiB (-12.3%)
toolbar/src/toolbar/toolbar-app.js 71.0 KiB 🟢 -1.65 MiB (-96.0%)
toolbar/src/scenes/product-tours/editor/chunk-generateStepHtml.js 647.0 KiB 🔺 +647.0 KiB (new)
exporter/src/exporter/scenes/ExporterNotebookScene.js 3.19 MiB 🔺 +324.5 KiB (+11.0%)
exporter/src/exporter/scenes/ExporterDashboardScene.js 272.2 KiB 🔺 +264.9 KiB (+3642.0%)
exporter/_parent/node_modules/.pnpm/katex@0.16.45/node_modules/katex/dist/katex.js removed 🟢 -259.3 KiB (-100.0%)
exporter/_parent/products/workflows/frontend/Workflows/WorkflowScene.js removed 🟢 -157.3 KiB (-100.0%)
exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene.js removed 🟢 -150.7 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js removed 🟢 -147.3 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/AIObservabilityTraceScene.js removed 🟢 -130.0 KiB (-100.0%)
exporter/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene.js removed 🟢 -119.6 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/AIObservabilityScene.js removed 🟢 -115.1 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js removed 🟢 -114.4 KiB (-100.0%)
exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene.js removed 🟢 -100.5 KiB (-100.0%)
exporter/_parent/products/tracing/frontend/TracingScene.js removed 🟢 -88.8 KiB (-100.0%)
toolbar/src/toolbar/surveys/chunk-SurveySidebar.js 86.2 KiB 🔺 +86.2 KiB (new)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js removed 🟢 -80.8 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js removed 🟢 -70.4 KiB (-100.0%)
exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner.js removed 🟢 -70.1 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js removed 🟢 -68.9 KiB (-100.0%)
exporter/_parent/products/workflows/frontend/WorkflowsScene.js removed 🟢 -60.5 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js removed 🟢 -59.9 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation.js removed 🟢 -59.9 KiB (-100.0%)
exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene.js removed 🟢 -58.9 KiB (-100.0%)
exporter/_parent/products/endpoints/frontend/EndpointScene.js removed 🟢 -56.4 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene.js removed 🟢 -52.9 KiB (-100.0%)
exporter/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene.js removed 🟢 -52.7 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js removed 🟢 -49.4 KiB (-100.0%)
exporter/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene.js removed 🟢 -48.6 KiB (-100.0%)
exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene.js removed 🟢 -46.9 KiB (-100.0%)
exporter/_parent/products/posthog_ai/frontend/scenes/TaskTracker/TaskTracker.js removed 🟢 -43.1 KiB (-100.0%)
exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene.js removed 🟢 -42.4 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js removed 🟢 -40.5 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-2RQKCTM6.js removed 🟢 -38.5 KiB (-100.0%)
toolbar/src/toolbar/stats/chunk-HeatmapToolbarMenu.js 37.7 KiB 🔺 +37.7 KiB (new)
exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptScene.js removed 🟢 -37.6 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene.js removed 🟢 -36.9 KiB (-100.0%)
exporter/_parent/products/growth/frontend/IdentityMatchingScene.js removed 🟢 -35.3 KiB (-100.0%)
exporter/_parent/products/metrics/frontend/MetricsScene.js removed 🟢 -35.1 KiB (-100.0%)
exporter/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene.js removed 🟢 -33.9 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js removed 🟢 -33.5 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene.js removed 🟢 -32.6 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTag.js removed 🟢 -31.8 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-4Y6WPE33.js removed 🟢 -30.9 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js removed 🟢 -30.3 KiB (-100.0%)
exporter/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene.js removed 🟢 -29.7 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js removed 🟢 -29.2 KiB (-100.0%)
exporter/_parent/products/replay_vision/frontend/replay_scanners/ScannerEditorScene.js removed 🟢 -28.6 KiB (-100.0%)
exporter/_parent/products/actions/frontend/pages/Action.js removed 🟢 -28.5 KiB (-100.0%)
exporter/_parent/products/data_warehouse/DataWarehouseScene.js removed 🟢 -28.2 KiB (-100.0%)
exporter/_parent/products/endpoints/frontend/EndpointsScene.js removed 🟢 -27.4 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js removed 🟢 -26.8 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/mermaid.core.js removed 🟢 -26.7 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-YWT4CUSO.js removed 🟢 -25.5 KiB (-100.0%)
exporter/_parent/products/links/frontend/LinkScene.js removed 🟢 -25.1 KiB (-100.0%)
exporter/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene.js removed 🟢 -24.5 KiB (-100.0%)
exporter/_parent/products/session_summaries/frontend/SessionGroupSummaryScene.js removed 🟢 -23.5 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js removed 🟢 -23.2 KiB (-100.0%)
exporter/_parent/products/logs/frontend/LogsScene.js removed 🟢 -22.9 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js removed 🟢 -22.8 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-RKZ34NQL.js removed 🟢 -22.8 KiB (-100.0%)
exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.js removed 🟢 -22.6 KiB (-100.0%)
exporter/src/scenes/data-pipelines/event-filtering/EventFilterScene.js removed 🟢 -22.5 KiB (-100.0%)
exporter/_parent/products/engineering_analytics/frontend/scenes/PullRequestDetailScene.js removed 🟢 -21.6 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene.js removed 🟢 -21.5 KiB (-100.0%)
exporter/_parent/products/replay_vision/frontend/observations/ReplayObservation.js removed 🟢 -21.4 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-UN3LZRKU.js removed 🟢 -20.5 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene.js removed 🟢 -20.5 KiB (-100.0%)
exporter/src/scenes/models/ModelsScene.js removed 🟢 -19.9 KiB (-100.0%)
exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene.js removed 🟢 -19.6 KiB (-100.0%)
exporter/_parent/products/live_debugger/frontend/LiveDebugger.js removed 🟢 -19.3 KiB (-100.0%)
exporter/_parent/products/subscriptions/frontend/scenes/SubscriptionScene.js removed 🟢 -19.0 KiB (-100.0%)
toolbar/src/toolbar/debug/chunk-EventDebugMenu.js 18.5 KiB 🔺 +18.5 KiB (new)
exporter/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene.js removed 🟢 -18.4 KiB (-100.0%)
exporter/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunsScene.js removed 🟢 -17.6 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-YF4QCWOH.js removed 🟢 -17.4 KiB (-100.0%)
exporter/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate.js removed 🟢 -17.1 KiB (-100.0%)
toolbar/src/toolbar/actions/chunk-ActionsToolbarMenu.js 16.8 KiB 🔺 +16.8 KiB (new)
exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.js removed 🟢 -16.1 KiB (-100.0%)
exporter/_parent/products/managed_migrations/frontend/ManagedMigration.js removed 🟢 -15.6 KiB (-100.0%)
exporter/src/scenes/models/NodeDetailScene.js removed 🟢 -14.8 KiB (-100.0%)
exporter/_parent/products/replay_vision/frontend/replay_scanners/ActionEditorScene.js removed 🟢 -14.6 KiB (-100.0%)
exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene.js removed 🟢 -14.2 KiB (-100.0%)
toolbar/src/toolbar/product-tours/chunk-ProductToursSidebar.js 14.1 KiB 🔺 +14.1 KiB (new)
exporter/_parent/products/ai_gateway/frontend/AIGatewayScene.js removed 🟢 -13.2 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene.js removed 🟢 -12.1 KiB (-100.0%)
exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene.js removed 🟢 -11.6 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js removed 🟢 -11.4 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-BM42HDAG.js removed 🟢 -11.3 KiB (-100.0%)
toolbar/src/toolbar/experiments/chunk-ExperimentsToolbarMenu.js 11.2 KiB 🔺 +11.2 KiB (new)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js removed 🟢 -11.1 KiB (-100.0%)
exporter/_parent/products/tracing/frontend/TracingOperationScene.js removed 🟢 -10.8 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js removed 🟢 -10.7 KiB (-100.0%)
exporter/_parent/products/user_interviews/frontend/UserInterview.js removed 🟢 -10.6 KiB (-100.0%)
posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner.js 82.1 KiB 🔺 +10.4 KiB (+14.5%)
exporter/_parent/products/feature_flags/frontend/staff/FeatureFlagsStaffToolsScene.js removed 🟢 -9.6 KiB (-100.0%)
exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene.js removed 🟢 -9.4 KiB (-100.0%)
exporter/_parent/products/logs/frontend/scenes/LogsAlertNotificationDetailScene/LogsAlertNotificationDetailScene.js removed 🟢 -9.0 KiB (-100.0%)
exporter/_parent/products/tasks/frontend/SlackTaskContextScene.js removed 🟢 -9.0 KiB (-100.0%)
exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene.js removed 🟢 -8.3 KiB (-100.0%)
exporter/src/scenes/data-pipelines/TransformationsScene.js removed 🟢 -8.3 KiB (-100.0%)
exporter/_parent/products/user_interviews/frontend/UserInterviewResponse.js removed 🟢 -8.1 KiB (-100.0%)
exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene.js removed 🟢 -7.9 KiB (-100.0%)
exporter/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunDetailScene.js removed 🟢 -7.8 KiB (-100.0%)
exporter/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthorScene.js removed 🟢 -7.8 KiB (-100.0%)
exporter/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene.js removed 🟢 -7.8 KiB (-100.0%)
exporter/_parent/products/data_warehouse/frontend/scenes/SourceConnectScene/SourceConnectScene.js removed 🟢 -7.3 KiB (-100.0%)
posthog-app/src/scenes/App.js 26.9 KiB 🔺 +7.3 KiB (+37.1%)
exporter/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene.js removed 🟢 -6.9 KiB (-100.0%)
exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene.js removed 🟢 -6.8 KiB (-100.0%)
exporter/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene.js removed 🟢 -6.8 KiB (-100.0%)
exporter/_parent/products/replay_vision/frontend/replay_scanners/VisionActionRunScene.js removed 🟢 -6.7 KiB (-100.0%)
exporter/_parent/products/subscriptions/frontend/scenes/SubscriptionsScene.js removed 🟢 -6.6 KiB (-100.0%)
exporter/_parent/products/user_interviews/frontend/UserInterviews.js removed 🟢 -6.5 KiB (-100.0%)
exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene.js removed 🟢 -6.5 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-2AECGRRQ.js removed 🟢 -6.4 KiB (-100.0%)
exporter/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene.js removed 🟢 -6.2 KiB (-100.0%)
exporter/_parent/products/actions/frontend/pages/Actions.js removed 🟢 -6.1 KiB (-100.0%)
exporter/_parent/products/early_access_features/frontend/EarlyAccessFeature.js removed 🟢 -6.0 KiB (-100.0%)
posthog-app/src/scenes/insights/InsightScene.js 37.4 KiB 🟢 -6.0 KiB (-13.7%)
exporter/_parent/products/replay_vision/frontend/replay_scanners/VisionActionScene.js removed 🟢 -5.8 KiB (-100.0%)
toolbar/src/toolbar/flags/chunk-FlagsToolbarMenu.js 5.6 KiB 🔺 +5.6 KiB (new)
exporter/_parent/products/games/FlappyHog/FlappyHog.js removed 🟢 -5.6 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene.js removed 🟢 -5.6 KiB (-100.0%)
exporter/_parent/products/posthog_ai/frontend/components/tool/builtinToolRenderers.js removed 🟢 -5.6 KiB (-100.0%)
exporter/_parent/products/session_summaries/frontend/SessionGroupSummariesTable.js removed 🟢 -5.5 KiB (-100.0%)
exporter/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene.js removed 🟢 -5.4 KiB (-100.0%)
exporter/_parent/products/links/frontend/LinksScene.js removed 🟢 -5.3 KiB (-100.0%)
posthog-app/_parent/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene.js 58.7 KiB 🔺 +5.2 KiB (+9.8%)
exporter/_parent/products/games/368Hedgehogs/368Hedgehogs.js removed 🟢 -5.2 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-LMA3HP47.js removed 🟢 -4.8 KiB (-100.0%)
exporter/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay.js removed 🟢 -4.7 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-4H26LBE5.js removed 🟢 -4.7 KiB (-100.0%)
posthog-app/_parent/products/replay_vision/frontend/observations/ReplayObservation.js 19.3 KiB 🟢 -4.4 KiB (-18.7%)
toolbar/src/toolbar/web-vitals/chunk-WebVitalsToolbarMenu.js 4.4 KiB 🔺 +4.4 KiB (new)
exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene.js removed 🟢 -4.2 KiB (-100.0%)
exporter/_parent/products/posthog_ai/frontend/components/tool/posthogCodeToolRenderers.js removed 🟢 -4.2 KiB (-100.0%)
exporter/_parent/products/early_access_features/frontend/EarlyAccessFeatures.js removed 🟢 -4.0 KiB (-100.0%)
exporter/src/exporter/scenes/ExporterRecordingScene.js 2.3 KiB 🟢 -4.0 KiB (-63.5%)
exporter/_parent/products/ai_observability/frontend/AIObservabilityUsers.js removed 🟢 -3.8 KiB (-100.0%)
exporter/_parent/products/customer_analytics/frontend/components/AccountRelationshipsInput/CyclotronJobInputAccountRelationships.js removed 🟢 -3.7 KiB (-100.0%)
posthog-app/_parent/products/alerts/frontend/views/EditAlertModal.js 3.5 KiB 🔺 +3.5 KiB (new)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5GNKFQAL.js removed 🟢 -3.4 KiB (-100.0%)
exporter/_parent/products/posthog_ai/frontend/components/tool/EditDiffRenderer.js removed 🟢 -3.4 KiB (-100.0%)
exporter/_parent/products/customer_analytics/frontend/components/AccountPropertiesInput/CyclotronJobInputAccountProperties.js removed 🟢 -3.3 KiB (-100.0%)
exporter/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene.js removed 🟢 -3.3 KiB (-100.0%)
exporter/src/queries/nodes/WebVitals/WebVitals.js 8.5 KiB 🟢 -3.3 KiB (-28.0%)
exporter/src/exporter/scenes/ExporterInsightScene.js 4.4 KiB 🟢 -3.3 KiB (-42.9%)
exporter/src/queries/Query/Query.js 2.2 KiB 🟢 -3.3 KiB (-59.5%)
exporter/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene.js removed 🟢 -3.2 KiB (-100.0%)
exporter/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene.js removed 🟢 -3.2 KiB (-100.0%)
toolbar/src/toolbar/surveys/chunk-SurveysToolbarMenu.js 3.2 KiB 🔺 +3.2 KiB (new)
exporter/_parent/products/ai_observability/frontend/AIObservabilitySessionScene.js removed 🟢 -3.1 KiB (-100.0%)
exporter/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene.js removed 🟢 -3.0 KiB (-100.0%)
posthog-app/_parent/products/metrics/frontend/MetricsScene.js 38.9 KiB 🔺 +2.8 KiB (+7.6%)
exporter/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours.js removed 🟢 -2.6 KiB (-100.0%)
toolbar/src/toolbar/field-notes/chunk-FieldNotesOverlay.js 2.6 KiB 🔺 +2.6 KiB (new)
toolbar/src/toolbar/field-notes/chunk-FieldNotesToolbarMenu.js 2.3 KiB 🔺 +2.3 KiB (new)
exporter/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram.js removed 🟢 -2.0 KiB (-100.0%)
exporter/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene.js removed 🟢 -1.9 KiB (-100.0%)
exporter/_parent/products/posthog_ai/frontend/components/QuestionRenderer.js removed 🟢 -1.7 KiB (-100.0%)
exporter/_parent/products/skills/frontend/LLMSkillsScene.js removed 🟢 -1.7 KiB (-100.0%)
toolbar/src/toolbar/product-tours/chunk-ProductToursToolbarMenu.js 1.7 KiB 🔺 +1.7 KiB (new)
exporter/_parent/products/skills/frontend/LLMSkillScene.js removed 🟢 -1.7 KiB (-100.0%)
exporter/src/lib/components/ActivityLog/describers.js 126.9 KiB 🟢 -1.4 KiB (-1.1%)
exporter/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee.js removed 🟢 -1.3 KiB (-100.0%)
exporter/src/queries/schema.js 1.01 MiB 🔺 +1.3 KiB (+0.1%)
posthog-app/src/queries/schema.js 1.01 MiB 🔺 +1.3 KiB (+0.1%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-5YYISTIA.js removed 🟢 -1.2 KiB (-100.0%)
exporter/_parent/products/alerts/frontend/views/EditAlertModal.js 1.2 KiB 🔺 +1.2 KiB (new)
posthog-app/_parent/products/engineering_analytics/frontend/scenes/PullRequestDetailScene.js 23.6 KiB 🔺 +1.2 KiB (+5.2%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-Q7XG4LA2.js removed 🟢 -1.0 KiB (-100.0%)
exporter/_parent/node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-4FO5ZUOK.js removed 🟢 -1.0 KiB (-100.0%)
posthog-app/_parent/products/engineering_analytics/frontend/scenes/WorkflowRunsScene.js 19.4 KiB 🔺 +1.0 KiB (+5.5%)

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
1.21 MiB · 22 files 🔺 +294 B (+0.0%) ███░░░░░░░ 28.2% of 4.29 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.09 MiB · 2,970 files 🟢 -7.3 KiB (-0.1%) █████████░ 87.5% of 9.25 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
668 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
278.6 KiB ../node_modules/.pnpm/posthog-js@1.399.2/node_modules/posthog-js/dist/rrweb.js
266.9 KiB ../node_modules/.pnpm/@posthog+icons@0.37.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
234.9 KiB src/taxonomy/core-filter-definitions-by-group.json
221.5 KiB ../node_modules/.pnpm/posthog-js@1.399.2/node_modules/posthog-js/dist/module.js
164.0 KiB src/queries/validators.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/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

Dist folder size — 🟢 -171.28 MiB (-11.9%)

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

Total: 1267.12 MiB · 🟢 -171.28 MiB (-11.9%)

ℹ️ MCP UI apps size — 31 app(s), 15651.9 KB JS

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

App JS CSS
debug 577.8 KB 177.2 KB
action 429.2 KB 177.2 KB
action-list 542.6 KB 177.2 KB
cohort 428.2 KB 177.2 KB
cohort-list 541.6 KB 177.2 KB
email-template 428.1 KB 177.2 KB
error-details 443.9 KB 177.2 KB
error-issue 428.9 KB 177.2 KB
error-issue-list 542.5 KB 177.2 KB
experiment 539.9 KB 177.2 KB
experiment-list 543.4 KB 177.2 KB
experiment-results 541.6 KB 177.2 KB
feature-flag 545.4 KB 177.2 KB
feature-flag-list 549.1 KB 177.2 KB
feature-flag-testing 432.1 KB 177.2 KB
insight-actors 540.6 KB 177.2 KB
invite-email-preview 427.5 KB 177.2 KB
llm-costs 537.9 KB 177.2 KB
session-recording 429.9 KB 177.2 KB
session-summary 435.3 KB 177.2 KB
survey 429.7 KB 177.2 KB
survey-global-stats 540.7 KB 177.2 KB
survey-list 543.3 KB 177.2 KB
survey-stats 540.6 KB 177.2 KB
trace-span 428.6 KB 177.2 KB
trace-span-list 542.6 KB 177.2 KB
workflow 428.6 KB 177.2 KB
workflow-list 542.0 KB 177.2 KB
query-results 723.5 KB 177.2 KB
render-ui 613.8 KB 177.2 KB
visual-review-snapshots 433.0 KB 177.2 KB

Base automatically changed from posthog-code/logs-patterns-compare to posthog-code/logs-patterns-diff July 9, 2026 17:03
@jonmcwest
jonmcwest marked this pull request as ready for review July 9, 2026 17:21
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team July 9, 2026 17:21
@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore: update OpenAPI generated types" | Re-trigger Greptile

Comment thread products/logs/frontend/components/LogsPatterns/logsPatternsLogic.ts
@jonmcwest
jonmcwest force-pushed the posthog-code/logs-explain-spike branch from 165d6fd to 48bb2d8 Compare July 9, 2026 17:41
@github-actions
github-actions Bot requested a deployment to preview-pr-69712 July 9, 2026 17:41 In progress
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ✅ ready

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds — a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit 43d8f82 · box box-abcbc1c592c2 · ready in 586s (push → usable) · build log · rebuilds on every push, torn down on close

@trunk-io

trunk-io Bot commented Jul 9, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Base automatically changed from posthog-code/logs-patterns-diff to master July 10, 2026 11:35
Add an "Explain changes" button to the Logs display bar that opens the
Patterns view in compare mode against the preceding period — one click
from a spike (drag-selecting on the sparkline already zooms the window)
to the classified diff that explains it. Compare state moves from
logsPatternsLogic to logsViewerConfigLogic so other views can arm the
comparison before the patterns logic mounts, and the choice survives
lens switches; an atomic openPatternsComparison action sets view mode,
compare, and baseline together, and the patterns logic loads the diff
on mount when compare arrives pre-armed. The diff MCP prompt gains the
matching one-call spike-explain recipe.

Generated-By: PostHog Code
Task-Id: 8876f5bb-d599-44f1-9cce-0f5cf383d1b8
Split the shared patternsError reducer into mineError and diffError and
derive the displayed error from the active mode. The two loaders run
independently — toggling compare off fires a plain mine without cancelling
an in-flight diff — so a stale diff failure could otherwise clobber a
successful plain-mine table's empty state.

Generated-By: PostHog Code
Task-Id: bbaad670-e0f4-4f03-9c83-ac0831b1eca8
@jonmcwest
jonmcwest force-pushed the posthog-code/logs-explain-spike branch from 6944936 to 43d8f82 Compare July 10, 2026 14:25
@jonmcwest jonmcwest added the stamphog Request AI approval (no full review) label Jul 13, 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.

Frontend-only feature (logs patterns UI + MCP prompt/schema docs) outside risky territory, authored by a strong-familiarity owning-team member; the sole substantive review concern (shared error state) was fixed and resolved with a bot 👍, and no holds or in-flight reviews are present.

  • Author wrote 100% of the modified lines and has 132 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 99L, 5F substantive, 136L/7F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1c-medium (136L, 7F, two-areas, feat)
stamphog 2.0.0b3 .stamphog/policy.yml @ c9df32f · reviewed head 43d8f82

@jonmcwest
jonmcwest merged commit aab665f into master Jul 13, 2026
291 of 292 checks passed
@jonmcwest
jonmcwest deleted the posthog-code/logs-explain-spike branch July 13, 2026 09:12
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-13 09:35 UTC Run
prod-us ✅ Deployed 2026-07-13 09:46 UTC Run
prod-eu ✅ Deployed 2026-07-13 09:46 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