Skip to content

feat(subscriptions): AI subscription API, validation, telemetry, and UI#59632

Draft
vdekrijger wants to merge 2 commits into
ai-deliveryfrom
ai-api-frontend
Draft

feat(subscriptions): AI subscription API, validation, telemetry, and UI#59632
vdekrijger wants to merge 2 commits into
ai-deliveryfrom
ai-api-frontend

Conversation

@vdekrijger
Copy link
Copy Markdown
Contributor

Problem

Changes

How did you test this code?

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Publish to changelog?

Docs update

🤖 Agent context

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down.

Add the run-playwright label if you want an E2E sweep before merging — CI will pick it up automatically.

Most PRs don't need this. Real regressions still get caught on master and fix-forward.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 22, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​babel/​plugin-transform-nullish-coalescing-operator@​7.24.71001007196100
Addednpm/​@​babel/​plugin-transform-private-property-in-object@​7.24.71001007396100

View full report

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

Size Change: +5.2 kB (0%)

Total Size: 119 MB

📦 View Changed
Filename Size Change
frontend/dist/EndpointsScene 21.8 kB -2.13 kB (-8.9%)
frontend/dist/SupportTicketScene 33.8 kB +7.33 kB (+27.66%) 🚨
ℹ️ View Unchanged
Filename Size Change
frontend/dist/368Hedgehogs 5.54 kB +34 B (+0.62%)
frontend/dist/abap 14.2 kB 0 B
frontend/dist/AccountConnected 3.26 kB 0 B
frontend/dist/Action 25 kB +145 B (+0.58%)
frontend/dist/Actions 1.3 kB +63 B (+5.11%) 🔍
frontend/dist/AdvancedActivityLogsScene 40 kB 0 B
frontend/dist/AgenticAccountMismatch 2.67 kB 0 B
frontend/dist/AgenticAuthorize 5.77 kB 0 B
frontend/dist/apex 3.99 kB 0 B
frontend/dist/ApprovalDetail 16.5 kB 0 B
frontend/dist/architecture-7EHR7CIX 372 B 0 B
frontend/dist/architectureDiagram-3BPJPVTR 151 kB 0 B
frontend/dist/array.full.es5.js 348 kB 0 B
frontend/dist/array.full.js 428 kB 0 B
frontend/dist/array.js 192 kB 0 B
frontend/dist/AsyncMigrations 13.4 kB 0 B
frontend/dist/AuthenticatedShell 180 kB 0 B
frontend/dist/AuthorizationStatus 1 kB 0 B
frontend/dist/azcli 885 B 0 B
frontend/dist/bat 1.88 kB 0 B
frontend/dist/BatchExportScene 60.8 kB 0 B
frontend/dist/bicep 2.59 kB 0 B
frontend/dist/Billing 765 B 0 B
frontend/dist/BillingSection 21 kB 0 B
frontend/dist/blockDiagram-GPEHLZMM 72.5 kB 0 B
frontend/dist/BoxPlot 5.32 kB +34 B (+0.64%)
frontend/dist/browserAll-0QZMN1W2 37.4 kB 0 B
frontend/dist/BusinessKnowledgeScene 18.9 kB -34 B (-0.18%)
frontend/dist/ButtonPrimitives 830 B 0 B
frontend/dist/c4Diagram-AAUBKEIU 70.9 kB 0 B
frontend/dist/CalendarHeatMap 9.04 kB 0 B
frontend/dist/cameligo 2.23 kB 0 B
frontend/dist/changeRequestsLogic 782 B 0 B
frontend/dist/classDiagram-4FO5ZUOK 1.32 kB 0 B
frontend/dist/classDiagram-v2-Q7XG4LA2 1.32 kB 0 B
frontend/dist/CLIAuthorize 11.7 kB 0 B
frontend/dist/CLILive 4.29 kB 0 B
frontend/dist/clojure 9.68 kB 0 B
frontend/dist/CodeEditorInline 730 B 0 B
frontend/dist/coffee 3.63 kB 0 B
frontend/dist/Cohort 28.3 kB 0 B
frontend/dist/CohortCalculationHistory 6.5 kB 0 B
frontend/dist/Cohorts 9.7 kB 0 B
frontend/dist/ConfirmOrganization 4.8 kB 0 B
frontend/dist/conversations.js 67.3 kB 0 B
frontend/dist/cose-bilkent-S5V4N54A 82.8 kB 0 B
frontend/dist/Coupons 997 B 0 B
frontend/dist/cpp 5.33 kB 0 B
frontend/dist/Create 1.11 kB 0 B
frontend/dist/CredentialReview 3.83 kB 0 B
frontend/dist/crisp-chat-integration.js 1.97 kB 0 B
frontend/dist/csharp 4.56 kB 0 B
frontend/dist/csp 1.45 kB 0 B
frontend/dist/css 4.54 kB 0 B
frontend/dist/cssMode 4.2 kB 0 B
frontend/dist/CustomCssScene 3.83 kB 0 B
frontend/dist/CustomerAnalyticsConfigurationScene 2.34 kB 0 B
frontend/dist/CustomerAnalyticsScene 26.9 kB 0 B
frontend/dist/CustomerJourneyBuilderScene 2.11 kB 0 B
frontend/dist/CustomerJourneyTemplatesScene 7.75 kB 0 B
frontend/dist/customizations.full.js 18 kB 0 B
frontend/dist/CyclotronJobInputAssignee 1.57 kB 0 B
frontend/dist/CyclotronJobInputBusinessHours 2.96 kB 0 B
frontend/dist/CyclotronJobInputTicketTags 954 B -34 B (-3.44%)
frontend/dist/cypher 3.42 kB 0 B
frontend/dist/dagre-BM42HDAG 11.9 kB 0 B
frontend/dist/dart 4.29 kB 0 B
frontend/dist/Dashboard 1.58 kB 0 B
frontend/dist/Dashboards 19.8 kB 0 B
frontend/dist/DashboardTemplateCopyScene 5.98 kB 0 B
frontend/dist/DataManagementScene 918 B 0 B
frontend/dist/DataPipelinesNewScene 2.58 kB 0 B
frontend/dist/DataWarehouseScene 46.6 kB 0 B
frontend/dist/Deactivated 1.41 kB 0 B
frontend/dist/dead-clicks-autocapture.js 14.3 kB 0 B
frontend/dist/DeadLetterQueue 5.67 kB 0 B
frontend/dist/DebugScene 20.2 kB 0 B
frontend/dist/decompressionWorker 2.85 kB 0 B
frontend/dist/decompressionWorker.js 2.85 kB 0 B
frontend/dist/DecompressionWorkerManager 329 B 0 B
frontend/dist/DefinitionEdit 17.1 kB 0 B
frontend/dist/DefinitionView 24.3 kB 0 B
frontend/dist/Deployment 3.97 kB +34 B (+0.86%)
frontend/dist/DeploymentProject 5.47 kB 0 B
frontend/dist/Deployments 9.2 kB 0 B
frontend/dist/DestinationsScene 2.95 kB 0 B
frontend/dist/diagram-2AECGRRQ 6.69 kB 0 B
frontend/dist/diagram-5GNKFQAL 3.64 kB 0 B
frontend/dist/diagram-KO2AKTUF 11.5 kB 0 B
frontend/dist/diagram-LMA3HP47 5.06 kB 0 B
frontend/dist/diagram-OG6HWLK6 11.8 kB 0 B
frontend/dist/dist 559 kB 0 B
frontend/dist/dockerfile 1.91 kB 0 B
frontend/dist/EarlyAccessFeature 923 B -170 B (-15.55%) 👏
frontend/dist/EarlyAccessFeatures 3.17 kB +35 B (+1.12%)
frontend/dist/ecl 5.38 kB 0 B
frontend/dist/EditorScene 1.41 kB 0 B
frontend/dist/elixir 10.3 kB 0 B
frontend/dist/elk.bundled 1.44 MB 0 B
frontend/dist/EmailMFAVerify 3.29 kB 0 B
frontend/dist/EndpointScene 40 kB 0 B
frontend/dist/erDiagram-TEJ5UH35 27.8 kB 0 B
frontend/dist/ErrorTrackingIssueFingerprintsScene 7.26 kB 0 B
frontend/dist/ErrorTrackingIssueScene 101 kB -909 B (-0.9%)
frontend/dist/ErrorTrackingScene 27.1 kB 0 B
frontend/dist/EvaluationTemplates 847 B +34 B (+4.18%)
frontend/dist/eventmodeling-FCH6USID 375 B 0 B
frontend/dist/EventsScene 3.21 kB 0 B
frontend/dist/exception-autocapture.js 11.8 kB 0 B
frontend/dist/Experiment 206 kB 0 B
frontend/dist/Experiments 20.3 kB 0 B
frontend/dist/exporter 19.1 kB 0 B
frontend/dist/exporter.js 19.1 kB 0 B
frontend/dist/ExporterDashboardScene 1.88 kB 0 B
frontend/dist/ExporterHeatmapScene 19.6 kB 0 B
frontend/dist/ExporterInsightScene 2.91 kB 0 B
frontend/dist/ExporterInterviewScene 309 kB 0 B
frontend/dist/ExporterNotebookScene 2.71 MB 0 B
frontend/dist/ExporterRecordingScene 1.03 kB 0 B
frontend/dist/exporterSharedChunkAnchors 1.16 kB 0 B
frontend/dist/exporterSharedChunkAnchors.js 1.16 kB 0 B
frontend/dist/ExportsScene 4.26 kB 0 B
frontend/dist/FeatureFlag 134 kB +34 B (+0.03%)
frontend/dist/FeatureFlags 1.01 kB 0 B
frontend/dist/FeatureFlagTemplatesScene 7.28 kB -33 B (-0.45%)
frontend/dist/FlappyHog 6.05 kB 0 B
frontend/dist/flow9 1.85 kB 0 B
frontend/dist/flowDiagram-I6XJVG4X 61.7 kB 0 B
frontend/dist/freemarker2 16.7 kB 0 B
frontend/dist/fsharp 3.02 kB 0 B
frontend/dist/ganttDiagram-6RSMTGT7 50.9 kB 0 B
frontend/dist/gitGraph-WXDBUCRP 360 B 0 B
frontend/dist/gitGraphDiagram-PVQCEYII 30.2 kB 0 B
frontend/dist/go 2.69 kB 0 B
frontend/dist/graphql 2.3 kB 0 B
frontend/dist/Group 15.4 kB 0 B
frontend/dist/Groups 4.18 kB 0 B
frontend/dist/GroupsNew 7.62 kB 0 B
frontend/dist/handlebars 7.38 kB 0 B
frontend/dist/hcl 3.63 kB 0 B
frontend/dist/HealthCategoryDetailScene 7.51 kB 0 B
frontend/dist/HealthScene 12.4 kB 0 B
frontend/dist/HeatmapNewScene 5.31 kB 0 B
frontend/dist/HeatmapRecordingScene 4.2 kB 0 B
frontend/dist/HeatmapScene 6.83 kB 0 B
frontend/dist/HeatmapsScene 4.16 kB 0 B
frontend/dist/hls 394 kB 0 B
frontend/dist/HogFunctionScene 59.5 kB 0 B
frontend/dist/hogql_parser_wasm_browser 1.54 MB 0 B
frontend/dist/HogRepl 7.65 kB 0 B
frontend/dist/html 5.62 kB 0 B
frontend/dist/htmlMode 4.65 kB 0 B
frontend/dist/image-blob-reduce.esm 49.5 kB 0 B
frontend/dist/InboxScene 63.2 kB 0 B
frontend/dist/index 60.9 kB 0 B
frontend/dist/index.js 60.9 kB 0 B
frontend/dist/info-J43DQDTF 348 B 0 B
frontend/dist/infoDiagram-5YYISTIA 1.35 kB 0 B
frontend/dist/ini 1.14 kB 0 B
frontend/dist/InsightQuickStart 5.7 kB 0 B
frontend/dist/InsightScene 34.7 kB +39 B (+0.11%)
frontend/dist/IntegrationsRedirect 1.01 kB 0 B
frontend/dist/intercom-integration.js 2.03 kB 0 B
frontend/dist/InviteSignup 15.3 kB 0 B
frontend/dist/ishikawaDiagram-YF4QCWOH 18 kB 0 B
frontend/dist/java 3.26 kB 0 B
frontend/dist/javascript 1.02 kB 0 B
frontend/dist/journeyDiagram-JHISSGLW 24 kB 0 B
frontend/dist/jsonMode 13.9 kB 0 B
frontend/dist/julia 7.26 kB 0 B
frontend/dist/kanban-definition-UN3LZRKU 21.3 kB 0 B
frontend/dist/katex 266 kB 0 B
frontend/dist/kotlin 3.44 kB 0 B
frontend/dist/lazy 146 kB 0 B
frontend/dist/LegacyPluginScene 20.9 kB 0 B
frontend/dist/LegalDocumentNewScene 59.7 kB 0 B
frontend/dist/LegalDocumentsScene 5.24 kB 0 B
frontend/dist/LemonTextAreaMarkdown 740 B -34 B (-4.39%)
frontend/dist/less 3.93 kB 0 B
frontend/dist/lexon 2.47 kB 0 B
frontend/dist/lib 2.25 kB 0 B
frontend/dist/Link 733 B 0 B
frontend/dist/LinkScene 25.1 kB +35 B (+0.14%)
frontend/dist/LinksScene 4.47 kB +35 B (+0.79%)
frontend/dist/liquid 4.57 kB 0 B
frontend/dist/LiveDebugger 19.4 kB 0 B
frontend/dist/LiveEventsTable 5.51 kB 0 B
frontend/dist/LLMAnalyticsClusterScene 21.6 kB 0 B
frontend/dist/LLMAnalyticsClustersScene 54.9 kB -35 B (-0.06%)
frontend/dist/LLMAnalyticsDatasetScene 20.8 kB -72 B (-0.34%)
frontend/dist/LLMAnalyticsDatasetsScene 3.56 kB 0 B
frontend/dist/LLMAnalyticsEvaluation 59.7 kB -35 B (-0.06%)
frontend/dist/LLMAnalyticsEvaluationsScene 28 kB 0 B
frontend/dist/LLMAnalyticsPlaygroundScene 37.6 kB 0 B
frontend/dist/LLMAnalyticsScene 118 kB -449 B (-0.38%)
frontend/dist/LLMAnalyticsSessionScene 13.7 kB +40 B (+0.29%)
frontend/dist/LLMAnalyticsTag 27.3 kB -35 B (-0.13%)
frontend/dist/LLMAnalyticsTagsScene 7.22 kB +35 B (+0.49%)
frontend/dist/LLMAnalyticsTraceScene 130 kB 0 B
frontend/dist/LLMAnalyticsUsers 798 B 0 B
frontend/dist/LLMASessionFeedbackDisplay 5.08 kB 0 B
frontend/dist/LLMPromptScene 29.1 kB +35 B (+0.12%)
frontend/dist/LLMPromptsScene 4.75 kB 0 B
frontend/dist/LLMSkillScene 861 B +34 B (+4.11%)
frontend/dist/LLMSkillsScene 878 B 0 B
frontend/dist/Login 10.1 kB 0 B
frontend/dist/Login2FA 4.52 kB 0 B
frontend/dist/logs.js 38.9 kB 0 B
frontend/dist/LogsAlertDetailScene 17.2 kB -37 B (-0.21%)
frontend/dist/LogsSamplingDetailScene 5.23 kB +35 B (+0.67%)
frontend/dist/LogsSamplingNewScene 2.15 kB -39 B (-1.79%)
frontend/dist/LogsScene 17.7 kB 0 B
frontend/dist/lua 2.16 kB 0 B
frontend/dist/m3 2.85 kB 0 B
frontend/dist/main 819 kB 0 B
frontend/dist/ManagedMigration 14.8 kB 0 B
frontend/dist/markdown 3.83 kB 0 B
frontend/dist/MarketingAnalyticsScene 40.4 kB 0 B
frontend/dist/MaterializedColumns 11.9 kB 0 B
frontend/dist/Max 922 B 0 B
frontend/dist/MCPAnalyticsScene 38.7 kB 0 B
frontend/dist/MCPAnalyticsToolDetail 18.4 kB 0 B
frontend/dist/mdx 5.43 kB 0 B
frontend/dist/memlens.lib.bundle 27.9 kB 0 B
frontend/dist/mermaid.core 28.6 kB 0 B
frontend/dist/MermaidDiagram 2.19 kB +39 B (+1.82%)
frontend/dist/MessageTemplate 16.6 kB 0 B
frontend/dist/MetricsScene 1.08 kB 0 B
frontend/dist/mindmap-definition-RKZ34NQL 24.8 kB 0 B
frontend/dist/mips 2.62 kB 0 B
frontend/dist/ModelsScene 19 kB 0 B
frontend/dist/MonacoDiffEditor 471 B 0 B
frontend/dist/monacoEditorWorker 288 kB 0 B
frontend/dist/monacoEditorWorker.js 288 kB 0 B
frontend/dist/monacoJsonWorker 419 kB 0 B
frontend/dist/monacoJsonWorker.js 419 kB 0 B
frontend/dist/monacoTsWorker 7.02 MB 0 B
frontend/dist/monacoTsWorker.js 7.02 MB 0 B
frontend/dist/MoveToPostHogCloud 4.73 kB 0 B
frontend/dist/msdax 4.95 kB 0 B
frontend/dist/mysql 11.3 kB 0 B
frontend/dist/NavTabChat 7.42 kB 0 B
frontend/dist/NewSourceScene 1.01 kB -68 B (-6.28%)
frontend/dist/NewTabScene 1.75 kB 0 B
frontend/dist/NodeDetailScene 16.9 kB 0 B
frontend/dist/NotebookCanvasScene 3.75 kB 0 B
frontend/dist/NotebookPanel 5.71 kB 0 B
frontend/dist/NotebookScene 8.95 kB 0 B
frontend/dist/NotebooksScene 7.87 kB 0 B
frontend/dist/OAuthAuthorize 912 B 0 B
frontend/dist/objective-c 2.44 kB 0 B
frontend/dist/Onboarding 790 kB 0 B
frontend/dist/OnboardingCouponRedemption 1.48 kB 0 B
frontend/dist/packet-YPE3B663 354 B 0 B
frontend/dist/pascal 3.03 kB 0 B
frontend/dist/pascaligo 2.04 kB 0 B
frontend/dist/passkeyLogic 756 B +34 B (+4.71%) 🔍
frontend/dist/PasswordReset 4.63 kB 0 B
frontend/dist/PasswordResetComplete 3.27 kB 0 B
frontend/dist/PendingDeletion 2.38 kB 0 B
frontend/dist/perl 8.29 kB 0 B
frontend/dist/PersonScene 18.9 kB 0 B
frontend/dist/PersonsScene 6.01 kB 0 B
frontend/dist/pgsql 13.5 kB 0 B
frontend/dist/php 8.06 kB 0 B
frontend/dist/pie-LRSECV5Y 345 B 0 B
frontend/dist/pieDiagram-4H26LBE5 4.95 kB 0 B
frontend/dist/PipelineStatusScene 9.38 kB 0 B
frontend/dist/pla 1.72 kB 0 B
frontend/dist/posthog 146 kB 0 B
frontend/dist/postiats 7.9 kB 0 B
frontend/dist/powerquery 17 kB 0 B
frontend/dist/powershell 3.31 kB 0 B
frontend/dist/PreflightCheck 5.84 kB 0 B
frontend/dist/product-tours.js 115 kB 0 B
frontend/dist/ProductTour 275 kB 0 B
frontend/dist/ProductTours 4.96 kB 0 B
frontend/dist/ProjectHomepage 20.3 kB 0 B
frontend/dist/protobuf 9.09 kB 0 B
frontend/dist/pug 4.86 kB 0 B
frontend/dist/python 4.8 kB 0 B
frontend/dist/qsharp 3.23 kB 0 B
frontend/dist/quadrantDiagram-W4KKPZXB 34.4 kB 0 B
frontend/dist/QueryPerformance 8.89 kB 0 B
frontend/dist/r 3.16 kB 0 B
frontend/dist/radar-GUYGQ44K 351 B 0 B
frontend/dist/razor 9.38 kB 0 B
frontend/dist/react-json-view 121 kB 0 B
frontend/dist/recorder-v2.js 98.7 kB 0 B
frontend/dist/recorder.js 98.7 kB 0 B
frontend/dist/redis 3.59 kB 0 B
frontend/dist/redshift 11.8 kB 0 B
frontend/dist/RegionMap 29.7 kB -34 B (-0.11%)
frontend/dist/render-query 27.1 MB 0 B
frontend/dist/render-query.js 27.1 MB +267 B (0%)
frontend/dist/ReplayLens 21.8 kB -37 B (-0.17%)
frontend/dist/ReplayLensesScene 12.2 kB 0 B
frontend/dist/requirementDiagram-4Y6WPE33 31.9 kB 0 B
frontend/dist/ResourceTransfer 9.45 kB 0 B
frontend/dist/restructuredtext 3.94 kB 0 B
frontend/dist/RevenueAnalyticsScene 25.8 kB 0 B
frontend/dist/ruby 8.54 kB 0 B
frontend/dist/rust 4.2 kB 0 B
frontend/dist/sankeyDiagram-5OEKKPKP 24.1 kB 0 B
frontend/dist/SavedInsights 936 B 0 B
frontend/dist/sb 1.86 kB 0 B
frontend/dist/scala 7.36 kB 0 B
frontend/dist/schema 723 kB 0 B
frontend/dist/SchemaScene 24 kB 0 B
frontend/dist/scheme 1.8 kB 0 B
frontend/dist/scss 6.45 kB 0 B
frontend/dist/SdkDoctorScene 9.69 kB 0 B
frontend/dist/sequenceDiagram-3UESZ5HK 117 kB 0 B
frontend/dist/SessionAttributionExplorerScene 6.9 kB 0 B
frontend/dist/SessionGroupSummariesTable 4.94 kB 0 B
frontend/dist/SessionGroupSummaryScene 19.1 kB 0 B
frontend/dist/SessionProfileScene 15.3 kB 0 B
frontend/dist/SessionRecordingDetail 2.03 kB 0 B
frontend/dist/SessionRecordingFilePlaybackScene 4.74 kB 0 B
frontend/dist/SessionRecordings 1.05 kB 0 B
frontend/dist/SessionRecordingsKiosk 10.2 kB 0 B
frontend/dist/SessionRecordingsPlaylistScene 5.38 kB 0 B
frontend/dist/SessionRecordingsSettingsScene 2.24 kB 0 B
frontend/dist/SessionsScene 4.61 kB 0 B
frontend/dist/SettingsScene 3.83 kB 0 B
frontend/dist/sharedChunkAnchors 1.15 kB 0 B
frontend/dist/sharedChunkAnchors.js 1.15 kB 0 B
frontend/dist/SharedMetric 6.33 kB 0 B
frontend/dist/SharedMetrics 821 B 0 B
frontend/dist/shell 3.11 kB 0 B
frontend/dist/SignupContainer 28.5 kB 0 B
frontend/dist/Site 1.47 kB 0 B
frontend/dist/solidity 18.6 kB 0 B
frontend/dist/sophia 2.8 kB 0 B
frontend/dist/SourceScene 996 B 0 B
frontend/dist/SourcesScene 6.24 kB +34 B (+0.55%)
frontend/dist/sparql 2.59 kB 0 B
frontend/dist/sql 10.3 kB 0 B
frontend/dist/SqlVariableEditScene 7.52 kB 0 B
frontend/dist/st 7.44 kB 0 B
frontend/dist/StartupProgram 21.5 kB 0 B
frontend/dist/stateDiagram-AJRCARHV 11.3 kB 0 B
frontend/dist/stateDiagram-v2-BHNVJYJU 1.22 kB 0 B
frontend/dist/StripeConfirmInstall 3.81 kB 0 B
frontend/dist/SubscriptionScene 14.1 kB 0 B
frontend/dist/SubscriptionsScene 5.73 kB +611 B (+11.93%) ⚠️
frontend/dist/SupportSettingsScene 1.71 kB 0 B
frontend/dist/SupportTicketsScene 1 kB 0 B
frontend/dist/Survey 1.29 kB 0 B
frontend/dist/SurveyFormBuilder 1.82 kB 0 B
frontend/dist/Surveys 26.6 kB 0 B
frontend/dist/surveys.js 94.7 kB 0 B
frontend/dist/SurveyWizard 72.6 kB 0 B
frontend/dist/swift 5.3 kB 0 B
frontend/dist/SystemStatus 17.3 kB 0 B
frontend/dist/systemverilog 7.65 kB 0 B
frontend/dist/TaskDetailScene 23.5 kB +74 B (+0.32%)
frontend/dist/TaskTracker 14.5 kB +37 B (+0.25%)
frontend/dist/tcl 3.61 kB 0 B
frontend/dist/TextCardMarkdownEditor 11.2 kB +25 B (+0.22%)
frontend/dist/timeline-definition-PNZ67QCA 31.4 kB 0 B
frontend/dist/toolbar 15.4 MB 0 B
frontend/dist/toolbar.js 15.4 MB +267 B (0%)
frontend/dist/ToolbarLaunch 2.75 kB 0 B
frontend/dist/tracing-headers.js 1.84 kB 0 B
frontend/dist/TracingScene 54 kB 0 B
frontend/dist/TransformationsScene 6.44 kB 0 B
frontend/dist/treemap-LRROVOQU 357 B 0 B
frontend/dist/treeView-BLDUP644 360 B 0 B
frontend/dist/TrendsBarChart 6.88 kB 0 B
frontend/dist/TrendsLineChart 6.84 kB 0 B
frontend/dist/tsMode 24 kB 0 B
frontend/dist/twig 6.01 kB 0 B
frontend/dist/TwoFactorReset 4.3 kB 0 B
frontend/dist/typescript 274 B 0 B
frontend/dist/typespec 2.86 kB 0 B
frontend/dist/Unsubscribe 1.93 kB 0 B
frontend/dist/UserInterview 6.32 kB 0 B
frontend/dist/UserInterviewResponse 5.6 kB +34 B (+0.61%)
frontend/dist/UserInterviews 4.08 kB 0 B
frontend/dist/vb 5.83 kB 0 B
frontend/dist/vennDiagram-CIIHVFJN 41.7 kB 0 B
frontend/dist/VercelConnect 5.27 kB 0 B
frontend/dist/VercelLinkError 2.54 kB 0 B
frontend/dist/VerifyEmail 5.05 kB 0 B
frontend/dist/vimMode 211 kB 0 B
frontend/dist/VisualReviewIndexScene 2.44 kB 0 B
frontend/dist/VisualReviewRunScene 44.6 kB 0 B
frontend/dist/VisualReviewRunsScene 7.25 kB 0 B
frontend/dist/VisualReviewSettingsScene 11 kB +34 B (+0.31%)
frontend/dist/VisualReviewSnapshotHistoryScene 13.8 kB 0 B
frontend/dist/VisualReviewSnapshotOverviewScene 19.5 kB 0 B
frontend/dist/wardley-L42UT6IY 352 B 0 B
frontend/dist/wardleyDiagram-YWT4CUSO 26.2 kB 0 B
frontend/dist/web-vitals-with-attribution.js 11.8 kB 0 B
frontend/dist/web-vitals.js 6.39 kB 0 B
frontend/dist/WebAnalyticsScene 10.4 kB 0 B
frontend/dist/WebGLRenderer-DYjOwNoG 60.4 kB 0 B
frontend/dist/WebGPURenderer-B_wkl_Ja 36.3 kB 0 B
frontend/dist/WebScriptsScene 2.82 kB 0 B
frontend/dist/WebVitals 7.41 kB 0 B
frontend/dist/WebVitalsPathBreakdown 3.89 kB 0 B
frontend/dist/webworkerAll-puPV1rBA 397 B 0 B
frontend/dist/wgsl 7.38 kB 0 B
frontend/dist/Wizard 4.73 kB 0 B
frontend/dist/WorkflowScene 110 kB 0 B
frontend/dist/WorkflowsScene 60.1 kB +90 B (+0.15%)
frontend/dist/WorldMap 1.04 MB 0 B
frontend/dist/xml 3.02 kB 0 B
frontend/dist/xychartDiagram-2RQKCTM6 39.6 kB 0 B
frontend/dist/yaml 4.64 kB 0 B

compressed-size-action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🔍 Migration Risk Analysis

We've analyzed your migrations for potential risks.

Summary: 0 Safe | 0 Needs Review | 1 Blocked

❌ Blocked

Causes locks or breaks compatibility

posthog.1177_subscription_ai_fields
  │  └─ #1 ✅ AddField
  │     Adding NOT NULL field with constant default (safe in PG11+)
  │     model: subscription, field: content_type
  │  └─ #2 ✅ AddField
  │     Adding nullable field requires brief lock
  │     model: subscription, field: prompt
  │  └─ #3 ✅ AddField
  │     Adding nullable field requires brief lock
  │     model: subscription, field: ai_config
  │  └─ #4 ⚠️ RunPython: RunPython data migration needs review for performance
  │
  └──> �[91m⚠️  COMBINATION RISKS:�[0m
       ❌ BLOCKED: #4 RunPython + #1 AddField, #2 AddField, #3 AddField
       RunPython data migration combined with schema changes. Data
       migrations can hold locks during execution, especially on large
       tables. Split into separate migrations: 1) schema changes, 2)
       data migration.

📚 How to Deploy These Changes Safely

AddField:

This operation acquires a brief lock but doesn't rewrite the table.

Deployment uses lock timeouts with automatic retries, so lock contention will cause retries rather than connection pile-up.

RunPython:

Use batching for large data migrations:

  • Use .iterator() to avoid loading all rows into memory
  • Use .bulk_update() instead of saving individual objects
  • Batch size: 1,000-10,000 rows per batch
  • Add pauses between batches
  • Consider background jobs for very large updates (millions of rows)

See the migration safety guide

Last updated: 2026-05-27 07:48 UTC (af2c303)

@posthog
Copy link
Copy Markdown
Contributor

posthog Bot commented May 22, 2026

👋 Visual changes detected for this PR.

Review and approve in PostHog Visual Review

If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix.

Comment thread ee/api/subscription.py Outdated
_AI_CONFIG_ALLOWED_KEYS = frozenset({"model", "planner_model"})


def _validate_ai_config_dict(value):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As mentioned this and the AI_CONFIG_ALLOWED_KEYS should all be removed as I think we should remove that field to begin with.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Similar to the ai config fields below, will ignore flagging them and consider this one to be the main signal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in af2c303 — removed the API-layer ai_config usage and the AI_CONFIG_ALLOWED_KEYS import. The model field + migration removal belongs in #59634 (where it was added), so I scoped that out of this PR.

Comment thread ee/api/subscription.py Outdated


def _ai_create_gate_reason(organization, *, kind: str = "subscriptions", verb: str = "creating") -> Optional[str]:
"""Returns the human-readable reason why creating an AI subscription / ad-hoc AI
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please simplify this doc! It's a bit too verbose.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Simplified in af2c303 — trimmed the docstring/comment down to the essential rationale.

Comment thread ee/api/subscription.py Outdated


class AiReportRequestSerializer(serializers.Serializer):
"""Input for the ad-hoc AI report endpoint — same prompt validation as a scheduled AI subscription."""
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wait what is this? Why do we have an ad hoc AI report endpoint? why isn't everything part of the prompt / scheduled sub with a possibility to "fire off now"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in af2c303 — dropped the ad-hoc ai_report action and its serializers entirely. Everything now goes through the scheduled prompt subscription path.

Comment thread ee/api/subscription.py Outdated
if existing is None and "content_type" not in attrs:
attrs["content_type"] = content_type

if content_type == Subscription.ContentType.INSIGHT:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This entire validation fiesta is new right? I think we can do better here to avoid the if elif stuff that it's currently looking like. Also I think that the content type fallbacks might not be needed as we just need ot ensure it's always set in the migration PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Refactored in af2c303 — replaced the if/elif chain with a dict-dispatch on content_type (one validator per type) plus a fail-soft fallback that returns a 400 instead of a 500 on an unexpected value (e.g. a stale row).

Comment thread ee/api/subscription.py Outdated
# on the first scheduled run is a poor first impression — fail fast here.
effective_target_type = attrs.get("target_type") or (existing.target_type if existing else None)
if effective_target_type and effective_target_type not in (
Subscription.SubscriptionTarget.EMAIL,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought we already had checks like this at creation time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed — folded into the create-time gate in af2c303 rather than duplicating the check.

</LemonBanner>
)}
<LemonBanner type="info" className="text-sm">
The AI plans up to 3 HogQL queries against your project's events and writes a
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does it make sense to tell these implementation details:? if it ever deviates, this risks becoming outdated, I wonder if we can instead keep it more abstract?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed — abstracted in af2c303. The banner copy no longer names pipeline internals (HogQL / query count) so it won't go stale if the implementation changes.

* (turns red at the cap), so we don't add our own. Example chips sit beneath
* the textarea on their own row so they wrap cleanly without competing with
* the counter for horizontal space.
*/}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No need for this comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in af2c303.

),
render: (_value: unknown, sub: SubscriptionApi) => {
// All three kinds render as neutral grey LemonTags differentiated by icon, not
// colour — status/accent colours (red, green, purple) would read as
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This comment feels unneeded as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in af2c303.

Mine = 'mine',
Dashboard = 'dashboard',
Insight = 'insight',
Ai = 'ai_prompt',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please capitalise the I in AI as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in af2c303 — AiAI across the enum and its references.

@@ -0,0 +1,567 @@
/**
* Auto-generated from the Django backend OpenAPI schema.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These files indicate that we had no MCP behaviour yet for the subscription flow? Or what is the goal of all these auto generated files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are the auto-generated API types (Orval from the OpenAPI spec) for the subscriptions product module, regenerated here because the serializer changed — not hand-edited. They're produced by hogli build:openapi. No MCP behaviour changed in this PR.

Fixes from the review-swarm pass: fail-soft content_type dispatch (400
not 500 on unexpected values), persist trimmed prompt, add type
annotations to validate() helpers, field-keyed validator errors, SLO
content_type assertion guard, stale comment cleanup.
@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
High CVE: npm @babel/plugin-transform-modules-systemjs generates arbitrary code when compiling malicious input

CVE: GHSA-fv7c-fp4j-7gwp @babel/plugin-transform-modules-systemjs generates arbitrary code when compiling malicious input (HIGH)

Affected versions: >= 7.12.0 < 7.29.4; >= 8.0.0-alpha.0 < 8.0.0-alpha.13

Patched version: 7.29.4

From: pnpm-lock.yamlnpm/@babel/plugin-transform-modules-systemjs@7.23.3

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@babel/plugin-transform-modules-systemjs@7.23.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

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.

1 participant