Skip to content

feat(dashboards): discriminate widget batch-add openapi schema (4/4)#61457

Open
MattPua wants to merge 3 commits into
06-03-feat_dashboards_add_widget_delivery_slosfrom
feat/dashboards-discriminated-widget-openapi
Open

feat(dashboards): discriminate widget batch-add openapi schema (4/4)#61457
MattPua wants to merge 3 commits into
06-03-feat_dashboards_add_widget_delivery_slosfrom
feat/dashboards-discriminated-widget-openapi

Conversation

@MattPua
Copy link
Copy Markdown
Member

@MattPua MattPua commented Jun 3, 2026

Problem

MCP agents calling dashboard-widgets-batch-add saw widget config as an untyped JSON blob (or an uncorrelated config union). That made it easy to send replay config with an error-tracking widget_type without schema feedback.

Changes

  • Add OpenAPI-only discriminated AddDashboardWidgetRequest serializers keyed by widget_type (batch exports pattern)
  • Wire widgets_batch @extend_schema(request=AddDashboardWidgetsBatchRequestOpenApiSerializer) while keeping runtime validation on the existing serializer
  • Tighten runtime widget_type to ChoiceField over EXPECTED_WIDGET_TYPES
  • Regenerate product + MCP zod/types (hogli build:openapi)

How did you test this code?

Agent-authored. Ran:

  • ./bin/hogli test products/dashboards/backend/api/test/test_dashboard_widgets.py::TestDashboardWidgetOpenApiSchema
  • ./bin/hogli build:openapi

Automatic notifications

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

Docs update

🤖 Agent context

Cursor agent stacked this on the MCP widgets PR. Chose a separate OpenAPI-only batch-add serializer so runtime widget validation stays unchanged while spectacular emits a widget_type discriminator with per-type config shapes. PATCH tiles[].widget remains untyped in OpenAPI — follow-up if we want dashboard-update agent ergonomics too.

Made with Cursor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Size Change: 0 B

Total Size: 81.9 MB

ℹ️ View Unchanged
Filename Size
frontend/dist-report/decompression-worker/src/scenes/session-recordings/player/snapshot-processing/decompressionWorker 2.85 kB
frontend/dist-report/exporter/_chunks/chunk 8.67 MB
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Action 25 kB
frontend/dist-report/exporter/_parent/products/actions/frontend/pages/Actions 1.33 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityScene 120 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 19.9 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 132 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/AIObservabilityUsers 872 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.7 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 55.1 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 21 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 3.64 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 59.9 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 28.2 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 915 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 5.19 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.8 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 29.2 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 4.83 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/skills/LLMSkillScene 929 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/skills/LLMSkillsScene 946 B
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 27.4 kB
frontend/dist-report/exporter/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 7.31 kB
frontend/dist-report/exporter/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 20.4 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.67 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 3.06 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 1.06 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 1.82 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 34.4 kB
frontend/dist-report/exporter/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.07 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 70.5 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 2.65 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 2.18 kB
frontend/dist-report/exporter/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 7.86 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/DataWarehouseScene 46.8 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 1.15 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 26.6 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 1.1 kB
frontend/dist-report/exporter/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 6.31 kB
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeature 1.02 kB
frontend/dist-report/exporter/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.24 kB
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointScene 40.6 kB
frontend/dist-report/exporter/_parent/products/endpoints/frontend/EndpointsScene 24.5 kB
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.34 kB
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 104 kB
frontend/dist-report/exporter/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 33.6 kB
frontend/dist-report/exporter/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 7.38 kB
frontend/dist-report/exporter/_parent/products/games/368Hedgehogs/368Hedgehogs 5.61 kB
frontend/dist-report/exporter/_parent/products/games/FlappyHog/FlappyHog 6.12 kB
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 60.5 kB
frontend/dist-report/exporter/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 5.31 kB
frontend/dist-report/exporter/_parent/products/links/frontend/LinkScene 25.2 kB
frontend/dist-report/exporter/_parent/products/links/frontend/LinksScene 4.55 kB
frontend/dist-report/exporter/_parent/products/live_debugger/frontend/LiveDebugger 19.5 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/LogsScene 17.8 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 17.2 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsAlertNotificationDetailScene/LogsAlertNotificationDetailScene 8.49 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 5.3 kB
frontend/dist-report/exporter/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 2.25 kB
frontend/dist-report/exporter/_parent/products/managed_migrations/frontend/ManagedMigration 14.9 kB
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 40.6 kB
frontend/dist-report/exporter/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 18.6 kB
frontend/dist-report/exporter/_parent/products/metrics/frontend/MetricsScene 16.2 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart 3.31 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart 3.14 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 8.55 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 4.41 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 4.6 kB
frontend/dist-report/exporter/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 4.43 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/observations/ReplayObservation 13.9 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 41.1 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 15.3 kB
frontend/dist-report/exporter/_parent/products/replay_vision/frontend/replay_scanners/ScannerTemplatesScene 4.59 kB
frontend/dist-report/exporter/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 26.5 kB
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.05 kB
frontend/dist-report/exporter/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 19.2 kB
frontend/dist-report/exporter/_parent/products/tasks/frontend/SlackTaskContextScene 8.88 kB
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskDetailScene 23.8 kB
frontend/dist-report/exporter/_parent/products/tasks/frontend/TaskTracker 14.6 kB
frontend/dist-report/exporter/_parent/products/tracing/frontend/TracingScene 67.2 kB
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterview 9.37 kB
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviewResponse 7.79 kB
frontend/dist-report/exporter/_parent/products/user_interviews/frontend/UserInterviews 6.08 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 2.56 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 44.8 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 7.32 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.1 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 13.9 kB
frontend/dist-report/exporter/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.6 kB
frontend/dist-report/exporter/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 16.6 kB
frontend/dist-report/exporter/_parent/products/workflows/frontend/Workflows/WorkflowScene 111 kB
frontend/dist-report/exporter/_parent/products/workflows/frontend/WorkflowsScene 60.1 kB
frontend/dist-report/exporter/src/exporter/exporter 36.8 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterDashboardScene 2.02 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterHeatmapScene 19.9 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterInsightScene 3.02 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterInterviewScene 310 kB
frontend/dist-report/exporter/src/exporter/scenes/ExporterNotebookScene 2.71 MB
frontend/dist-report/exporter/src/exporter/scenes/ExporterRecordingScene 1.13 kB
frontend/dist-report/exporter/src/exporterSharedChunkAnchors 1.19 kB
frontend/dist-report/exporter/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 11.3 kB
frontend/dist-report/exporter/src/lib/components/MonacoDiffEditor 471 B
frontend/dist-report/exporter/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2.25 kB
frontend/dist-report/exporter/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 842 B
frontend/dist-report/exporter/src/lib/lemon-ui/Link/Link 359 B
frontend/dist-report/exporter/src/lib/monaco/CodeEditorInline 832 B
frontend/dist-report/exporter/src/lib/monaco/vimMode 211 kB
frontend/dist-report/exporter/src/lib/ui/Button/ButtonPrimitives 422 B
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitals 7.52 kB
frontend/dist-report/exporter/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.09 kB
frontend/dist-report/exporter/src/queries/schema 853 kB
frontend/dist-report/exporter/src/scenes/approvals/changeRequestsLogic 884 B
frontend/dist-report/exporter/src/scenes/authentication/shared/passkeyLogic 824 B
frontend/dist-report/exporter/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.2 kB
frontend/dist-report/exporter/src/scenes/data-pipelines/TransformationsScene 6.58 kB
frontend/dist-report/exporter/src/scenes/insights/views/BoxPlot/BoxPlot 5.39 kB
frontend/dist-report/exporter/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 8.84 kB
frontend/dist-report/exporter/src/scenes/insights/views/RegionMap/RegionMap 29.8 kB
frontend/dist-report/exporter/src/scenes/insights/views/WorldMap/WorldMap 1.04 MB
frontend/dist-report/exporter/src/scenes/models/ModelsScene 19 kB
frontend/dist-report/exporter/src/scenes/models/NodeDetailScene 17 kB
frontend/dist-report/monaco-editor-worker/src/lib/monaco/workers/monacoEditorWorker 288 kB
frontend/dist-report/monaco-json-worker/src/lib/monaco/workers/monacoJsonWorker 419 kB
frontend/dist-report/monaco-typescript-worker/src/lib/monaco/workers/monacoTsWorker 7.02 MB
frontend/dist-report/posthog-app/_chunks/chunk 8.87 MB
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Action 25.1 kB
frontend/dist-report/posthog-app/_parent/products/actions/frontend/pages/Actions 1.4 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityScene 120 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilitySessionScene 20 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityTraceScene 132 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/AIObservabilityUsers 906 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClusterScene 21.7 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/clusters/AIObservabilityClustersScene 55.1 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetScene 21 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/datasets/AIObservabilityDatasetsScene 3.67 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluation 59.9 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/AIObservabilityEvaluationsScene 28.2 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/evaluations/EvaluationTemplates 949 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/LLMASessionFeedbackDisplay 5.23 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene 37.8 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptScene 29.2 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/prompts/LLMPromptsScene 4.86 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/skills/LLMSkillScene 963 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/skills/LLMSkillsScene 980 B
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTag 27.4 kB
frontend/dist-report/posthog-app/_parent/products/ai_observability/frontend/tags/AIObservabilityTagsScene 7.34 kB
frontend/dist-report/posthog-app/_parent/products/business_knowledge/frontend/scenes/BusinessKnowledgeScene 20.4 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee 1.71 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours 3.09 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags 1.09 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/settings/SupportSettingsScene 1.85 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/ticket/SupportTicketScene 26.6 kB
frontend/dist-report/posthog-app/_parent/products/conversations/frontend/scenes/tickets/SupportTicketsScene 1.11 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/CustomerAnalyticsScene 69.3 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/CustomerAnalyticsConfigurationScene 2.68 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyBuilderScene/CustomerJourneyBuilderScene 2.22 kB
frontend/dist-report/posthog-app/_parent/products/customer_analytics/frontend/scenes/CustomerJourneyTemplatesScene/CustomerJourneyTemplatesScene 7.9 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/DataWarehouseScene 1.81 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/NewSourceScene/NewSourceScene 1.25 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SchemaScene/SchemaScene 26.6 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourceScene/SourceScene 1.17 kB
frontend/dist-report/posthog-app/_parent/products/data_warehouse/frontend/scenes/SourcesScene/SourcesScene 6.34 kB
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeature 1.2 kB
frontend/dist-report/posthog-app/_parent/products/early_access_features/frontend/EarlyAccessFeatures 3.28 kB
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointScene 40.7 kB
frontend/dist-report/posthog-app/_parent/products/endpoints/frontend/EndpointsScene 22.4 kB
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingFingerprintsScene/ErrorTrackingIssueFingerprintsScene 7.37 kB
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingIssueScene/ErrorTrackingIssueScene 103 kB
frontend/dist-report/posthog-app/_parent/products/error_tracking/frontend/scenes/ErrorTrackingScene/ErrorTrackingScene 33.7 kB
frontend/dist-report/posthog-app/_parent/products/feature_flags/frontend/FeatureFlagTemplatesScene 7.42 kB
frontend/dist-report/posthog-app/_parent/products/games/368Hedgehogs/368Hedgehogs 5.65 kB
frontend/dist-report/posthog-app/_parent/products/games/FlappyHog/FlappyHog 6.16 kB
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentNewScene 60.5 kB
frontend/dist-report/posthog-app/_parent/products/legal_documents/frontend/scenes/LegalDocumentsScene 5.35 kB
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinkScene 25.2 kB
frontend/dist-report/posthog-app/_parent/products/links/frontend/LinksScene 4.58 kB
frontend/dist-report/posthog-app/_parent/products/live_debugger/frontend/LiveDebugger 19.5 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/LogsScene 17.8 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsAlertDetailScene/LogsAlertDetailScene 17.3 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsAlertNotificationDetailScene/LogsAlertNotificationDetailScene 8.53 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingDetailScene/LogsSamplingDetailScene 5.34 kB
frontend/dist-report/posthog-app/_parent/products/logs/frontend/scenes/LogsSamplingNewScene/LogsSamplingNewScene 2.29 kB
frontend/dist-report/posthog-app/_parent/products/managed_migrations/frontend/ManagedMigration 14.9 kB
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsScene 40.6 kB
frontend/dist-report/posthog-app/_parent/products/mcp_analytics/frontend/MCPAnalyticsToolDetail 18.6 kB
frontend/dist-report/posthog-app/_parent/products/metrics/frontend/MetricsScene 16.2 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/stickiness/StickinessBarChart/StickinessBarChart 3.35 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/stickiness/StickinessLineChart/StickinessLineChart 3.18 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsBarChart/TrendsBarChart 8.58 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLifecycleChart/TrendsLifecycleChart 4.45 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsLineChart/TrendsLineChart 4.64 kB
frontend/dist-report/posthog-app/_parent/products/product_analytics/frontend/insights/trends/TrendsPieChart/TrendsPieChart 4.47 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/observations/ReplayObservation 13.9 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScanner 41.2 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ReplayScannersScene 15.3 kB
frontend/dist-report/posthog-app/_parent/products/replay_vision/frontend/replay_scanners/ScannerTemplatesScene 4.63 kB
frontend/dist-report/posthog-app/_parent/products/revenue_analytics/frontend/RevenueAnalyticsScene 26.7 kB
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummariesTable 5.09 kB
frontend/dist-report/posthog-app/_parent/products/session_summaries/frontend/SessionGroupSummaryScene 19.3 kB
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/SlackTaskContextScene 8.91 kB
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskDetailScene 23.9 kB
frontend/dist-report/posthog-app/_parent/products/tasks/frontend/TaskTracker 14.7 kB
frontend/dist-report/posthog-app/_parent/products/tracing/frontend/TracingScene 67.3 kB
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterview 9.41 kB
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviewResponse 7.83 kB
frontend/dist-report/posthog-app/_parent/products/user_interviews/frontend/UserInterviews 6.12 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewIndexScene 2.59 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunScene 44.9 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewRunsScene 7.36 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSettingsScene 11.1 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotHistoryScene 13.9 kB
frontend/dist-report/posthog-app/_parent/products/visual_review/frontend/scenes/VisualReviewSnapshotOverviewScene 19.6 kB
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/TemplateLibrary/MessageTemplate 16.7 kB
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/Workflows/WorkflowScene 104 kB
frontend/dist-report/posthog-app/_parent/products/workflows/frontend/WorkflowsScene 60.2 kB
frontend/dist-report/posthog-app/src/index 61.1 kB
frontend/dist-report/posthog-app/src/layout/panel-layout/ai-first/tabs/NavTabChat 7.26 kB
frontend/dist-report/posthog-app/src/lib/components/Cards/TextCard/TextCardMarkdownEditor 11.3 kB
frontend/dist-report/posthog-app/src/lib/components/MonacoDiffEditor 471 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonMarkdown/MermaidDiagram 2.29 kB
frontend/dist-report/posthog-app/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown 876 B
frontend/dist-report/posthog-app/src/lib/lemon-ui/Link/Link 359 B
frontend/dist-report/posthog-app/src/lib/monaco/CodeEditorInline 866 B
frontend/dist-report/posthog-app/src/lib/monaco/vimMode 211 kB
frontend/dist-report/posthog-app/src/lib/ui/Button/ButtonPrimitives 426 B
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitals 7.55 kB
frontend/dist-report/posthog-app/src/queries/nodes/WebVitals/WebVitalsPathBreakdown 4.12 kB
frontend/dist-report/posthog-app/src/queries/schema 853 kB
frontend/dist-report/posthog-app/src/scenes/activity/explore/EventsScene 3.32 kB
frontend/dist-report/posthog-app/src/scenes/activity/explore/SessionsScene 4.72 kB
frontend/dist-report/posthog-app/src/scenes/activity/live/LiveEventsTable 5.62 kB
frontend/dist-report/posthog-app/src/scenes/agentic/AgenticAuthorize 5.87 kB
frontend/dist-report/posthog-app/src/scenes/approvals/ApprovalDetail 16.6 kB
frontend/dist-report/posthog-app/src/scenes/approvals/changeRequestsLogic 918 B
frontend/dist-report/posthog-app/src/scenes/audit-logs/AdvancedActivityLogsScene 42.1 kB
frontend/dist-report/posthog-app/src/scenes/AuthenticatedShell 173 kB
frontend/dist-report/posthog-app/src/scenes/authentication/account/AccountConnected 3.36 kB
frontend/dist-report/posthog-app/src/scenes/authentication/account/AgenticAccountMismatch 2.77 kB
frontend/dist-report/posthog-app/src/scenes/authentication/account/credential-review/CredentialReview 4.01 kB
frontend/dist-report/posthog-app/src/scenes/authentication/cli/CLIAuthorize 11.8 kB
frontend/dist-report/posthog-app/src/scenes/authentication/cli/CLILive 4.41 kB
frontend/dist-report/posthog-app/src/scenes/authentication/email-mfa-verify/EmailMFAVerify 3.42 kB
frontend/dist-report/posthog-app/src/scenes/authentication/invite-signup/InviteSignup 1.31 kB
frontend/dist-report/posthog-app/src/scenes/authentication/login-2fa/Login2FA 5.12 kB
frontend/dist-report/posthog-app/src/scenes/authentication/login/Login 1.34 kB
frontend/dist-report/posthog-app/src/scenes/authentication/password-reset/PasswordReset 4.74 kB
frontend/dist-report/posthog-app/src/scenes/authentication/password-reset/PasswordResetComplete 3.38 kB
frontend/dist-report/posthog-app/src/scenes/authentication/shared/passkeyLogic 858 B
frontend/dist-report/posthog-app/src/scenes/authentication/signup/SignupContainer 1.3 kB
frontend/dist-report/posthog-app/src/scenes/authentication/two-factor-reset/TwoFactorReset 4.41 kB
frontend/dist-report/posthog-app/src/scenes/authentication/vercel/VercelConnect 5.37 kB
frontend/dist-report/posthog-app/src/scenes/authentication/vercel/VercelLinkError 2.64 kB
frontend/dist-report/posthog-app/src/scenes/authentication/verify-email/VerifyEmail 5.16 kB
frontend/dist-report/posthog-app/src/scenes/billing/AuthorizationStatus 1.1 kB
frontend/dist-report/posthog-app/src/scenes/billing/Billing 867 B
frontend/dist-report/posthog-app/src/scenes/billing/BillingSection 21.2 kB
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohort 28.5 kB
frontend/dist-report/posthog-app/src/scenes/cohorts/CohortCalculationHistory 6.61 kB
frontend/dist-report/posthog-app/src/scenes/cohorts/Cohorts 9.81 kB
frontend/dist-report/posthog-app/src/scenes/coupons/Coupons 1.1 kB
frontend/dist-report/posthog-app/src/scenes/dashboard/Dashboard 1.68 kB
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/Dashboards 19.9 kB
frontend/dist-report/posthog-app/src/scenes/dashboard/dashboards/templates/DashboardTemplateCopyScene 6.09 kB
frontend/dist-report/posthog-app/src/scenes/data-management/DataManagementScene 1.02 kB
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionEdit 17.3 kB
frontend/dist-report/posthog-app/src/scenes/data-management/definition/DefinitionView 24.4 kB
frontend/dist-report/posthog-app/src/scenes/data-management/MaterializedColumns/MaterializedColumns 12 kB
frontend/dist-report/posthog-app/src/scenes/data-management/variables/SqlVariableEditScene 7.63 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/batch-exports/BatchExportScene 60.1 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DataPipelinesNewScene 2.76 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/DestinationsScene 3.13 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/event-filtering/EventFilterScene 22.3 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/legacy-plugins/LegacyPluginScene 21 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/TransformationsScene 2.37 kB
frontend/dist-report/posthog-app/src/scenes/data-pipelines/WebScriptsScene 2.99 kB
frontend/dist-report/posthog-app/src/scenes/data-warehouse/DataWarehouseScene 1.75 kB
frontend/dist-report/posthog-app/src/scenes/data-warehouse/editor/EditorScene 1.52 kB
frontend/dist-report/posthog-app/src/scenes/debug/DebugScene 20.3 kB
frontend/dist-report/posthog-app/src/scenes/debug/hog/HogRepl 7.75 kB
frontend/dist-report/posthog-app/src/scenes/experiments/Experiment 211 kB
frontend/dist-report/posthog-app/src/scenes/experiments/Experiments 21.8 kB
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetric 6.45 kB
frontend/dist-report/posthog-app/src/scenes/experiments/SharedMetrics/SharedMetrics 923 B
frontend/dist-report/posthog-app/src/scenes/exports/ExportsScene 4.45 kB
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlag 144 kB
frontend/dist-report/posthog-app/src/scenes/feature-flags/FeatureFlags 1.12 kB
frontend/dist-report/posthog-app/src/scenes/groups/Group 15.4 kB
frontend/dist-report/posthog-app/src/scenes/groups/Groups 4.29 kB
frontend/dist-report/posthog-app/src/scenes/groups/GroupsNew 7.73 kB
frontend/dist-report/posthog-app/src/scenes/health-alerts/HealthAlertsScene 4.17 kB
frontend/dist-report/posthog-app/src/scenes/health/categoryDetail/HealthCategoryDetailScene 7.64 kB
frontend/dist-report/posthog-app/src/scenes/health/HealthScene 13.2 kB
frontend/dist-report/posthog-app/src/scenes/health/pipelineStatus/PipelineStatusScene 11.5 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapNewScene 5.41 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapRecordingScene 4.24 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmap/HeatmapScene 6.87 kB
frontend/dist-report/posthog-app/src/scenes/heatmaps/scenes/heatmaps/HeatmapsScene 4.27 kB
frontend/dist-report/posthog-app/src/scenes/hog-functions/HogFunctionScene 55.3 kB
frontend/dist-report/posthog-app/src/scenes/inbox/InboxScene 63.4 kB
frontend/dist-report/posthog-app/src/scenes/insights/InsightQuickStart/InsightQuickStart 5.81 kB
frontend/dist-report/posthog-app/src/scenes/insights/InsightScene 34.8 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/BoxPlot/BoxPlot 5.43 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/CalendarHeatMap/CalendarHeatMap 4.87 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/RegionMap/RegionMap 29.8 kB
frontend/dist-report/posthog-app/src/scenes/insights/views/WorldMap/WorldMap 5.16 kB
frontend/dist-report/posthog-app/src/scenes/instance/AsyncMigrations/AsyncMigrations 13.5 kB
frontend/dist-report/posthog-app/src/scenes/instance/DeadLetterQueue/DeadLetterQueue 5.77 kB
frontend/dist-report/posthog-app/src/scenes/instance/QueryPerformance/QueryPerformance 9 kB
frontend/dist-report/posthog-app/src/scenes/instance/SystemStatus/SystemStatus 17.4 kB
frontend/dist-report/posthog-app/src/scenes/IntegrationsRedirect/IntegrationsRedirect 1.11 kB
frontend/dist-report/posthog-app/src/scenes/marketing-analytics/MarketingAnalyticsScene 42.1 kB
frontend/dist-report/posthog-app/src/scenes/max/Max 1.06 kB
frontend/dist-report/posthog-app/src/scenes/models/ModelsScene 19.1 kB
frontend/dist-report/posthog-app/src/scenes/models/NodeDetailScene 17.1 kB
frontend/dist-report/posthog-app/src/scenes/moveToPostHogCloud/MoveToPostHogCloud 4.84 kB
frontend/dist-report/posthog-app/src/scenes/new-tab/NewTabScene 1.85 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookCanvasScene 3.81 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookPanel/NotebookPanel 5.84 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebookScene 9.16 kB
frontend/dist-report/posthog-app/src/scenes/notebooks/NotebooksScene 8.01 kB
frontend/dist-report/posthog-app/src/scenes/oauth/OAuthAuthorize 1.01 kB
frontend/dist-report/posthog-app/src/scenes/onboarding/coupon/OnboardingCouponRedemption 1.58 kB
frontend/dist-report/posthog-app/src/scenes/onboarding/Onboarding 792 kB
frontend/dist-report/posthog-app/src/scenes/onboarding/sdks/SdkDoctorScene 8.31 kB
frontend/dist-report/posthog-app/src/scenes/organization/ConfirmOrganization/ConfirmOrganization 4.87 kB
frontend/dist-report/posthog-app/src/scenes/organization/Create/Create 1.03 kB
frontend/dist-report/posthog-app/src/scenes/organization/Deactivated 1.51 kB
frontend/dist-report/posthog-app/src/scenes/organization/PendingDeletion 2.48 kB
frontend/dist-report/posthog-app/src/scenes/persons/PersonScene 20.6 kB
frontend/dist-report/posthog-app/src/scenes/persons/PersonsScene 6.12 kB
frontend/dist-report/posthog-app/src/scenes/PreflightCheck/PreflightCheck 5.95 kB
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTour 275 kB
frontend/dist-report/posthog-app/src/scenes/product-tours/ProductTours 5.06 kB
frontend/dist-report/posthog-app/src/scenes/project-homepage/ProjectHomepage 19.1 kB
frontend/dist-report/posthog-app/src/scenes/project/Create/Create 1.21 kB
frontend/dist-report/posthog-app/src/scenes/resource-transfer/ResourceTransfer 9.56 kB
frontend/dist-report/posthog-app/src/scenes/saved-insights/SavedInsights 1.04 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/detail/SessionRecordingDetail 2.14 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/file-playback/SessionRecordingFilePlaybackScene 4.85 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/kiosk/SessionRecordingsKiosk 10.3 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/player/snapshot-processing/DecompressionWorkerManager 329 B
frontend/dist-report/posthog-app/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene 5.42 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/SessionRecordings 1.08 kB
frontend/dist-report/posthog-app/src/scenes/session-recordings/settings/SessionRecordingsSettingsScene 2.28 kB
frontend/dist-report/posthog-app/src/scenes/sessions/SessionProfileScene 15.6 kB
frontend/dist-report/posthog-app/src/scenes/settings/SettingsScene 3.94 kB
frontend/dist-report/posthog-app/src/scenes/sites/Site 1.9 kB
frontend/dist-report/posthog-app/src/scenes/startups/StartupProgram 21.6 kB
frontend/dist-report/posthog-app/src/scenes/StripeConfirmInstall/StripeConfirmInstall 3.92 kB
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionScene 14.4 kB
frontend/dist-report/posthog-app/src/scenes/subscriptions/SubscriptionsScene 5.23 kB
frontend/dist-report/posthog-app/src/scenes/surveys/forms/SurveyFormBuilder 1.93 kB
frontend/dist-report/posthog-app/src/scenes/surveys/Survey 1.39 kB
frontend/dist-report/posthog-app/src/scenes/surveys/Surveys 26.8 kB
frontend/dist-report/posthog-app/src/scenes/surveys/wizard/SurveyWizard 72.8 kB
frontend/dist-report/posthog-app/src/scenes/themes/CustomCssScene 3.94 kB
frontend/dist-report/posthog-app/src/scenes/toolbar-launch/ToolbarLaunch 2.85 kB
frontend/dist-report/posthog-app/src/scenes/Unsubscribe/Unsubscribe 2.04 kB
frontend/dist-report/posthog-app/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene 7.01 kB
frontend/dist-report/posthog-app/src/scenes/web-analytics/WebAnalyticsScene 14.8 kB
frontend/dist-report/posthog-app/src/scenes/wizard/Wizard 4.83 kB
frontend/dist-report/posthog-app/src/sharedChunkAnchors 1.19 kB
frontend/dist-report/render-query/src/render-query/render-query 27.6 MB
frontend/dist-report/toolbar/src/toolbar/toolbar 15.9 MB

compressed-size-action

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 3, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
products/dashboards/frontend/generated/api.zod.ts:564-570
**Duplicate `.enum()` call breaks the Zod schema at runtime**

The generated `widget_type` field calls `.enum(['error_tracking_list']).describe('...').enum(['error_tracking_list']).describe('...')`. In Zod v3, `.enum` on a `ZodEnum` instance is a getter property that returns `{ error_tracking_list: 'error_tracking_list' }` — a plain object, not a function. The second `.enum(['error_tracking_list'])` invocation would throw `TypeError: (...).enum is not a function` when the module is first loaded, making the entire schema unusable.

This pattern appears twice here (lines 564–570 for `error_tracking_list` and lines 689–695 for `session_replay_list`) and identically in `services/mcp/src/generated/dashboards/api.ts` (lines 530–536 and 655–661). The root cause is that drf-spectacular emits two `description` entries for the `ChoiceField` (one for the choice-value representation and one for `help_text`), and the Orval/Zod generator renders each as a separate `.enum(...).describe(...)` chain. The fix should be in the OpenAPI output or in the Orval code-generator config, not in these generated files.

Reviews (1): Last reviewed commit: "feat(dashboards): discriminate widget ba..." | Re-trigger Greptile

Comment on lines +564 to +570
widget_type: zod
.enum(['error_tracking_list'])
.describe('\* `error_tracking_list` - error_tracking_list')
.enum(['error_tracking_list'])
.describe(
'Widget type identifier. Supported values: error_tracking_list, session_replay_list. Use dashboard-widget-catalog-list for config_schema_hints per type.\n\n\* `error_tracking_list` - error_tracking_list'
),
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.

P1 Duplicate .enum() call breaks the Zod schema at runtime

The generated widget_type field calls .enum(['error_tracking_list']).describe('...').enum(['error_tracking_list']).describe('...'). In Zod v3, .enum on a ZodEnum instance is a getter property that returns { error_tracking_list: 'error_tracking_list' } — a plain object, not a function. The second .enum(['error_tracking_list']) invocation would throw TypeError: (...).enum is not a function when the module is first loaded, making the entire schema unusable.

This pattern appears twice here (lines 564–570 for error_tracking_list and lines 689–695 for session_replay_list) and identically in services/mcp/src/generated/dashboards/api.ts (lines 530–536 and 655–661). The root cause is that drf-spectacular emits two description entries for the ChoiceField (one for the choice-value representation and one for help_text), and the Orval/Zod generator renders each as a separate .enum(...).describe(...) chain. The fix should be in the OpenAPI output or in the Orval code-generator config, not in these generated files.

Prompt To Fix With AI
This is a comment left during a code review.
Path: products/dashboards/frontend/generated/api.zod.ts
Line: 564-570

Comment:
**Duplicate `.enum()` call breaks the Zod schema at runtime**

The generated `widget_type` field calls `.enum(['error_tracking_list']).describe('...').enum(['error_tracking_list']).describe('...')`. In Zod v3, `.enum` on a `ZodEnum` instance is a getter property that returns `{ error_tracking_list: 'error_tracking_list' }` — a plain object, not a function. The second `.enum(['error_tracking_list'])` invocation would throw `TypeError: (...).enum is not a function` when the module is first loaded, making the entire schema unusable.

This pattern appears twice here (lines 564–570 for `error_tracking_list` and lines 689–695 for `session_replay_list`) and identically in `services/mcp/src/generated/dashboards/api.ts` (lines 530–536 and 655–661). The root cause is that drf-spectacular emits two `description` entries for the `ChoiceField` (one for the choice-value representation and one for `help_text`), and the Orval/Zod generator renders each as a separate `.enum(...).describe(...)` chain. The fix should be in the OpenAPI output or in the Orval code-generator config, not in these generated files.

How can I resolve this? If you propose a fix, please make it concise.

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.

This seems fair, but not sure why there is a duplicate enum/describe thing here 😕, maybe it's an outdated generated artefact?

@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch from d117cbb to 30b777e Compare June 3, 2026 18:11
@MattPua MattPua changed the base branch from 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets to graphite-base/61457 June 3, 2026 18:13
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from e2de932 to 5f314de Compare June 3, 2026 18:13
@MattPua MattPua force-pushed the graphite-base/61457 branch from d117cbb to 2484fe6 Compare June 3, 2026 18:13
@MattPua MattPua changed the base branch from graphite-base/61457 to 06-03-feat_dashboards_add_widget_delivery_slos June 3, 2026 18:14
Copy link
Copy Markdown
Member Author

MattPua commented Jun 3, 2026

@MattPua MattPua changed the title feat(dashboards): discriminate widget batch-add openapi schema feat(dashboards): discriminate widget batch-add openapi schema (14/14) Jun 3, 2026
@MattPua MattPua added the stamphog Request AI review from stamphog label Jun 3, 2026 — with Graphite App
Copy link
Copy Markdown

@stamphog stamphog Bot left a comment

Choose a reason for hiding this comment

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

Gates denied: this PR modifies public API contracts (OpenAPI schema discrimination for widget batch-add) and spans generated types across dashboards frontend and the MCP service — changes that require human review to validate correctness and downstream compatibility.

@stamphog stamphog Bot removed the stamphog Request AI review from stamphog label Jun 3, 2026
@MattPua MattPua requested review from vdekrijger and removed request for a team June 3, 2026 18:50
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from 9b02dc0 to be2f3ac Compare June 3, 2026 19:03
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 2484fe6 to 285d4bc Compare June 3, 2026 19:03
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from be2f3ac to c64c892 Compare June 3, 2026 19:18
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 285d4bc to 72f9878 Compare June 3, 2026 19:18
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from c64c892 to 936dc70 Compare June 3, 2026 20:24
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 72f9878 to 504e583 Compare June 3, 2026 20:24
@MattPua MattPua changed the title feat(dashboards): discriminate widget batch-add openapi schema (14/14) feat(dashboards): discriminate widget batch-add openapi schema (4/4) Jun 3, 2026
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 504e583 to 65b7b63 Compare June 3, 2026 20:34
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from 936dc70 to 12a8e9a Compare June 3, 2026 20:34
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 65b7b63 to a17b4ab Compare June 3, 2026 20:35
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from 12a8e9a to 3d71e86 Compare June 3, 2026 20:35
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

⏭️ Skipped snapshot commit because branch advanced to 3d71e86 while workflow was testing 936dc70.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from 3d71e86 to 4c398d5 Compare June 3, 2026 20:57
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from a17b4ab to 6f79ef2 Compare June 3, 2026 20:57
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from 4c398d5 to 2d1ad74 Compare June 3, 2026 20:58
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 6f79ef2 to 4a0a6c3 Compare June 3, 2026 20:58
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

⏭️ Skipped snapshot commit because branch advanced to 2d1ad74 while workflow was testing 3d71e86.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

Query snapshots: Backend query snapshots updated

Changes: 2 snapshots (2 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

Copy link
Copy Markdown
Contributor

@vdekrijger vdekrijger left a comment

Choose a reason for hiding this comment

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

Same comment as the previous one regarding the .ambr ones, but otherwise LGTM! Just a few notes from the bots that seem fair.

Comment on lines +564 to +570
widget_type: zod
.enum(['error_tracking_list'])
.describe('\* `error_tracking_list` - error_tracking_list')
.enum(['error_tracking_list'])
.describe(
'Widget type identifier. Supported values: error_tracking_list, session_replay_list. Use dashboard-widget-catalog-list for config_schema_hints per type.\n\n\* `error_tracking_list` - error_tracking_list'
),
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.

This seems fair, but not sure why there is a duplicate enum/describe thing here 😕, maybe it's an outdated generated artefact?

widget_type: zod
.enum(['session_replay_list'])
.describe('\* `session_replay_list` - session_replay_list')
.enum(['session_replay_list'])
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.

This also has the udplicate enum / describe thing

widget_type: zod
.enum(['session_replay_list'])
.describe('* `session_replay_list` - session_replay_list')
.enum(['session_replay_list'])
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.

Just flagging this one as well as the bots did not flag this duplicate (probably due to it being implicitly referenced by their comments already).

@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 5a5a735 to 26e655d Compare June 4, 2026 12:55
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from 9638929 to d96d2ae Compare June 4, 2026 12:55
MattPua and others added 3 commits June 4, 2026 09:08
Use widget_type-discriminated polymorphic request serializers for
dashboard-widgets-batch-add so generated zod/MCP schemas tie config shape
to widget_type. Runtime validation unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Assert discriminator keys against EXPECTED_WIDGET_TYPES, reuse widget flag
patch targets, and patch immutability test with a valid alternate type.

Co-authored-by: Cursor <cursoragent@cursor.com>
@MattPua MattPua force-pushed the 06-03-feat_dashboards_add_widget_delivery_slos branch from 26e655d to a210144 Compare June 4, 2026 13:08
@MattPua MattPua force-pushed the feat/dashboards-discriminated-widget-openapi branch from d96d2ae to 081b88d Compare June 4, 2026 13:08
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 4, 2026

⏭️ Skipped snapshot commit because branch advanced to 081b88d while workflow was testing d96d2ae.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

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