Skip to content

feat(signals): Notify suggested reviewers in Slack#58774

Merged
Twixes merged 17 commits into
masterfrom
posthog-code/signals-inbox-slack-notifications
May 22, 2026
Merged

feat(signals): Notify suggested reviewers in Slack#58774
Twixes merged 17 commits into
masterfrom
posthog-code/signals-inbox-slack-notifications

Conversation

@Twixes
Copy link
Copy Markdown
Member

@Twixes Twixes commented May 18, 2026

Problem

Signals inbox items only surfaced in-app. When a new report landed and a user was a suggested reviewer, they had no way to find out until they opened the inbox. We want to pull them in.

Changes

Adding Slack notifications for new inbox items as part of the existing per-user signals autonomy config:

  1. Three new optional fields on SignalUserAutonomyConfig: slack_notification_integration (FK to team-scoped Slack Integration), slack_notification_channel (the same channel_id|#channel-name target string Insight Alerts uses), and slack_notification_min_priority (P0P4, nullable).
  2. New slack_inbox_notifications.py dispatcher resolves the suggested_reviewers artefact to PostHog user and sends a message in Slack when applicable. Runs dispatch_inbox_slack_notifications_activity.

Screenshot 2026-05-19 at 08.51.24@2x.png

Also switched POST /api/users/:id/signal_autonomy/ switched to partial updates so editing autostart priority and Slack settings from different surfaces doesn't wipe each other.

UI changes for the channel/priority picker and the in-app Slack connect flow live in PostHog/code#2174.

How did you test this code?

Added products/signals/backend/test/test_slack_inbox_notifications.py. And ran locally.

Publish to changelog?

no

Docs update

skip-inkeep-docs


Created with PostHog Code

Adds a per-user Slack notification config for the signals product. When
a report transitions to READY (a new inbox item lands), the summary
workflow now dispatches a Slack message to every suggested reviewer
that has wired up an integration + channel in their user autonomy
config. The optional `slack_notification_min_priority` filter mirrors
the autostart-priority threshold: when set, only reports at or above
that priority notify; reports without a priority judgment always notify
so we never silently swallow them.

The dispatch reuses the existing SlackIntegration channel-posting path
used by Insight Alerts and evaluation reports, including the
`channel_id|#channel-name` target convention.

Generated-By: PostHog Code
Task-Id: 046d7425-f0b4-4ab4-97f8-cce0627927f0
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

Migration SQL Changes

Hey 👋, we've detected some migrations on this PR. Here's the SQL output for each migration, make sure they make sense:

products/signals/backend/migrations/0020_signaluserautonomyconfig_slack_notification_fields.py

BEGIN;
--
-- Add field slack_notification_integration to signaluserautonomyconfig
--
ALTER TABLE "signals_signaluserautonomyconfig" ADD COLUMN "slack_notification_integration_id" integer NULL CONSTRAINT "signals_signaluserau_slack_notification_i_8124b54f_fk_posthog_i" REFERENCES "posthog_integration"("id") DEFERRABLE INITIALLY DEFERRED; SET CONSTRAINTS "signals_signaluserau_slack_notification_i_8124b54f_fk_posthog_i" IMMEDIATE;
--
-- Add field slack_notification_channel to signaluserautonomyconfig
--
ALTER TABLE "signals_signaluserautonomyconfig" ADD COLUMN "slack_notification_channel" varchar(255) NULL;
--
-- Add field slack_notification_min_priority to signaluserautonomyconfig
--
ALTER TABLE "signals_signaluserautonomyconfig" ADD COLUMN "slack_notification_min_priority" varchar(2) NULL;
CREATE INDEX "signals_signaluserautonomy_slack_notification_integra_8124b54f" ON "signals_signaluserautonomyconfig" ("slack_notification_integration_id");
COMMIT;

Last updated: 2026-05-22 08:49 UTC (2c6b2cb)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

🔍 Migration Risk Analysis

We've analyzed your migrations for potential risks.

Summary: 1 Safe | 0 Needs Review | 0 Blocked

✅ Safe

Brief or no lock, backwards compatible

signals.0020_signaluserautonomyconfig_slack_notification_fields
  └─ #1 ✅ AddField
     Adding nullable field requires brief lock
     model: signaluserautonomyconfig, field: slack_notification_integration
  └─ #2 ✅ AddField
     Adding nullable field requires brief lock
     model: signaluserautonomyconfig, field: slack_notification_channel
  └─ #3 ✅ AddField
     Adding nullable field requires brief lock
     model: signaluserautonomyconfig, field: slack_notification_min_priority

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

Last updated: 2026-05-22 08:49 UTC (2c6b2cb)

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented May 18, 2026

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 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 →

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 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.

Twixes added 2 commits May 18, 2026 10:20
- mypy: switch `slack_notification_integration_id` to a typed
  `IntegerField` instead of an inferred `PrimaryKeyRelatedField` so
  the read-only field has a clear annotation.
- semgrep idor-lookup-without-team: replace the `team_id__in=` lookup
  on `Integration` with a fetch + per-team-id membership check, which
  the rule recognises as a proper team-scoping pattern.
- migration risk: drop `atomic=False` from migration 0019. The
  migration only adds nullable fields, so a brief lock is fine and
  atomic=True restores transaction rollback safety.
- temporal module integrity test: add the new
  `dispatch_inbox_slack_notifications_activity` to the expected
  activities list so the signals worker count assertion passes.

Generated-By: PostHog Code
Task-Id: 046d7425-f0b4-4ab4-97f8-cce0627927f0
…urn page

Add `slack-integration` to the `/account-connected/<kind>` landing-page kinds
so PostHog Cloud can route Slack OAuth completions to a
`posthog-code://slack-integration?...` deep link. Pairs with the new in-app
Slack connect flow in PostHog/code: users can connect a Slack workspace to
PostHog without leaving the PostHog Code app for any settings page.

`integration_id` is forwarded alongside the existing `installation_id` so
the desktop handler can act on whichever its provider uses.

Generated-By: PostHog Code
Task-Id: 046d7425-f0b4-4ab4-97f8-cce0627927f0
Twixes added a commit to PostHog/code that referenced this pull request May 18, 2026
Adds an in-app Slack connect flow so users no longer have to leave PostHog
Code for the PostHog web settings page just to wire up notifications.

Flow: clicking "Connect Slack workspace" in the inbox source settings
opens the browser to PostHog Cloud's Slack OAuth authorize endpoint with
`next=/account-connected/slack-integration?...`. PostHog Cloud completes
OAuth, creates the team-level Slack `Integration`, and redirects to a
landing page that fires a `posthog-code://slack-integration?...` deep
link back into the app. The new `SlackIntegrationService` (main process)
handles the deep link, emits a callback event, and the renderer hook
refreshes the integrations list.

Mirrors the existing `GitHubIntegrationService` so each provider's deep
link handler stays isolated. Pairs with backend changes in
PostHog/posthog#58774 that teach the `/account-connected/<kind>` page
about the new `slack-integration` kind.

Generated-By: PostHog Code
Task-Id: 046d7425-f0b4-4ab4-97f8-cce0627927f0
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

Size Change: -2.85 MB (-2.39%)

Total Size: 116 MB

📦 View Changed
Filename Size Change
frontend/dist/CalendarHeatMap 9.04 kB +3.97 kB (+78.24%) 🆘
frontend/dist/CustomerAnalyticsScene 28.2 kB +1.27 kB (+4.72%) 🔍
frontend/dist/dist 643 B -559 kB (-99.89%) 🏆
frontend/dist/render-query 26.5 MB -574 kB (-2.12%)
frontend/dist/render-query.js 26.5 MB -574 kB (-2.12%)
frontend/dist/SupportTicketScene 33.8 kB +7.33 kB (+27.66%) 🚨
frontend/dist/toolbar 14.9 MB -574 kB (-3.72%)
frontend/dist/toolbar.js 14.9 MB -574 kB (-3.72%)
frontend/dist/TransformationsScene 2.19 kB -4.24 kB (-65.91%) 🏆
ℹ️ View Unchanged
Filename Size Change
frontend/dist/368Hedgehogs 5.51 kB 0 B
frontend/dist/abap 14.2 kB 0 B
frontend/dist/AccountConnected 3.26 kB +237 B (+7.84%) 🔍
frontend/dist/Action 24.9 kB -145 B (-0.58%)
frontend/dist/Actions 1.23 kB 0 B
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 175 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 0 B
frontend/dist/browserAll-0QZMN1W2 37.4 kB 0 B
frontend/dist/BusinessKnowledgeScene 18.9 kB 0 B
frontend/dist/ButtonPrimitives 796 B -34 B (-4.1%)
frontend/dist/c4Diagram-AAUBKEIU 70.9 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 -34 B (-4.45%)
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 -35 B (-1.47%)
frontend/dist/CustomerJourneyBuilderScene 2.08 kB -34 B (-1.61%)
frontend/dist/CustomerJourneyTemplatesScene 7.75 kB 0 B
frontend/dist/customizations.full.js 18 kB 0 B
frontend/dist/CyclotronJobInputAssignee 1.6 kB 0 B
frontend/dist/CyclotronJobInputBusinessHours 2.96 kB -34 B (-1.14%)
frontend/dist/CyclotronJobInputTicketTags 988 B +34 B (+3.56%)
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.55 kB 0 B
frontend/dist/Dashboards 19.7 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 0 B
frontend/dist/DeploymentProject 5.5 kB 0 B
frontend/dist/Deployments 9.24 kB +35 B (+0.38%)
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/dockerfile 1.91 kB 0 B
frontend/dist/EarlyAccessFeature 1.09 kB 0 B
frontend/dist/EarlyAccessFeatures 3.13 kB 0 B
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/EndpointsScene 24 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 kB -72 B (-0.27%)
frontend/dist/EvaluationTemplates 847 B 0 B
frontend/dist/eventmodeling-FCH6USID 375 B 0 B
frontend/dist/EventsScene 2.84 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 0 B
frontend/dist/FeatureFlags 1.01 kB 0 B
frontend/dist/FeatureFlagTemplatesScene 7.31 kB +33 B (+0.45%)
frontend/dist/FlappyHog 6.02 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.3 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 0 B
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.6 kB 0 B
frontend/dist/LegalDocumentsScene 5.24 kB +34 B (+0.65%)
frontend/dist/LemonTextAreaMarkdown 740 B 0 B
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 0 B
frontend/dist/liquid 4.57 kB 0 B
frontend/dist/LiveDebugger 19.4 kB 0 B
frontend/dist/LiveEventsTable 5.5 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.9 kB 0 B
frontend/dist/LLMAnalyticsDatasetsScene 3.56 kB 0 B
frontend/dist/LLMAnalyticsEvaluation 59.7 kB 0 B
frontend/dist/LLMAnalyticsEvaluationsScene 28 kB 0 B
frontend/dist/LLMAnalyticsPlaygroundScene 37.7 kB 0 B
frontend/dist/LLMAnalyticsScene 118 kB 0 B
frontend/dist/LLMAnalyticsSessionScene 13.7 kB 0 B
frontend/dist/LLMAnalyticsTag 27.3 kB 0 B
frontend/dist/LLMAnalyticsTagsScene 7.19 kB -35 B (-0.48%)
frontend/dist/LLMAnalyticsTraceScene 130 kB 0 B
frontend/dist/LLMAnalyticsUsers 798 B +34 B (+4.45%)
frontend/dist/LLMASessionFeedbackDisplay 5.11 kB 0 B
frontend/dist/LLMPromptScene 29.1 kB +35 B (+0.12%)
frontend/dist/LLMPromptsScene 4.71 kB -35 B (-0.74%)
frontend/dist/LLMSkillScene 827 B 0 B
frontend/dist/LLMSkillsScene 844 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 0 B
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.6 kB -41 B (-0.11%)
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.15 kB 0 B
frontend/dist/MessageTemplate 16.5 kB 0 B
frontend/dist/MetricsScene 1.11 kB +34 B (+3.16%)
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.08 kB 0 B
frontend/dist/NewTabScene 1.75 kB 0 B
frontend/dist/NodeDetailScene 16.9 kB -32 B (-0.19%)
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 722 B 0 B
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.8 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 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 0 B
frontend/dist/ReplayLens 21.8 kB 0 B
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 -35 B (-0.15%)
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.98 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.26 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 +34 B (+3.53%)
frontend/dist/SourcesScene 6.2 kB 0 B
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.5 kB 0 B
frontend/dist/SubscriptionsScene 5.45 kB 0 B
frontend/dist/SupportSettingsScene 1.71 kB -35 B (-2.01%)
frontend/dist/SupportTicketsScene 971 B -34 B (-3.38%)
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.4 kB -74 B (-0.32%)
frontend/dist/TaskTracker 14.5 kB 0 B
frontend/dist/tcl 3.61 kB 0 B
frontend/dist/TextCardMarkdownEditor 11.2 kB 0 B
frontend/dist/timeline-definition-PNZ67QCA 31.4 kB 0 B
frontend/dist/ToolbarLaunch 2.75 kB 0 B
frontend/dist/tracing-headers.js 1.84 kB 0 B
frontend/dist/TracingScene 54 kB -38 B (-0.07%)
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.87 kB +34 B (+0.5%)
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.57 kB 0 B
frontend/dist/UserInterviews 4.11 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.21 kB 0 B
frontend/dist/VisualReviewSettingsScene 11 kB 0 B
frontend/dist/VisualReviewSnapshotHistoryScene 13.8 kB +36 B (+0.26%)
frontend/dist/VisualReviewSnapshotOverviewScene 19.4 kB -37 B (-0.19%)
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 104 kB 0 B
frontend/dist/WorkflowsScene 60 kB 0 B
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

Twixes and others added 4 commits May 19, 2026 01:20
Filter the cached channel list server-side so clients can search large
workspaces without loading every channel at once.
Align the autonomy config integration guard with the standard team
visibility helper instead of a raw organization membership query.
…mail lookup

Frame channel posts with reviewer @mentions via lookup_slack_user_id_by_email,
PostHog Code deep links, and first-line summary excerpts. Add GitHub integration
callback route and Slack channel search API follow-ups for notification settings.
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented May 19, 2026

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 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 →

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented May 19, 2026

⏭️ Skipped snapshot commit because branch advanced to 7653c7a while workflow was testing f3cdfc2.

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

@github-actions
Copy link
Copy Markdown
Contributor

MCP UI Apps size report

App JS CSS
debug 478.4 KB 139.9 KB
action 353.8 KB 139.9 KB
action-list 361.7 KB 139.9 KB
cohort 352.9 KB 139.9 KB
cohort-list 360.6 KB 139.9 KB
error-details 374.3 KB 139.9 KB
error-issue 353.6 KB 139.9 KB
error-issue-list 361.6 KB 139.9 KB
experiment 358.1 KB 139.9 KB
experiment-list 362.4 KB 139.9 KB
experiment-results 360.2 KB 139.9 KB
feature-flag 438.5 KB 139.9 KB
feature-flag-list 443.0 KB 139.9 KB
feature-flag-testing 431.4 KB 139.9 KB
insight-actors 356.7 KB 139.9 KB
llm-costs 356.3 KB 139.9 KB
session-recording 354.6 KB 139.9 KB
session-summary 360.6 KB 139.9 KB
survey 354.4 KB 139.9 KB
survey-global-stats 359.2 KB 139.9 KB
survey-list 362.3 KB 139.9 KB
survey-stats 359.2 KB 139.9 KB
trace-span 353.3 KB 139.9 KB
trace-span-list 361.5 KB 139.9 KB
workflow 353.2 KB 139.9 KB
workflow-list 361.0 KB 139.9 KB
query-results 375.0 KB 139.9 KB

@Twixes Twixes changed the title feat(signals): notify suggested reviewers in slack when inbox items land feat(signals): Notify suggested reviewers in Slack May 19, 2026
Twixes and others added 2 commits May 19, 2026 08:47
GitHub integration callback and finish_setup work moved to
fix/github-integration-finish-setup.
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented May 19, 2026

⏭️ Skipped snapshot commit because branch advanced to fc54f35 while workflow was testing cb5c9fb.

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

@Twixes Twixes marked this pull request as ready for review May 19, 2026 17:22
@Twixes Twixes requested a review from a team May 19, 2026 17:23
@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team May 19, 2026 17:23
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

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

---

### Issue 1 of 2
products/signals/frontend/generated/api.zod.ts:101-111
The generated `UsersSignalAutonomyCreateBody` Zod schema is missing `slack_notification_integration_id`, even though `SignalUserAutonomyConfigCreateSerializer` defines it as an `IntegerField`. Without this field in the schema, any frontend client using Zod validation to build the POST body will be unable to type-check or validate the integration ID — the key field that actually enables Slack notifications.

```suggestion
export const UsersSignalAutonomyCreateBody = /* @__PURE__ */ zod.object({
    autostart_priority: zod
        .union([
            zod
                .enum(['P0', 'P1', 'P2', 'P3', 'P4'])
                .describe('\* `P0` - P0\n\* `P1` - P1\n\* `P2` - P2\n\* `P3` - P3\n\* `P4` - P4'),
            zod.enum(['']),
            zod.null(),
        ])
        .optional(),
    slack_notification_integration_id: zod
        .number()
        .int()
        .nullish()
        .describe(
            'Primary key of a Slack Integration row in one of the caller\'s teams. Pair with `slack_notification_channel` to enable notifications; pass null on either to disable them.'
        ),
    slack_notification_channel: zod
```

### Issue 2 of 2
posthog/api/test/__snapshots__/test_api_docs.ambr:2-6
**OpenAPI enum naming warning accepted rather than fixed**

The `ENUM_NAME_OVERRIDES` addition maps `"AutonomyPriorityEnum"` to `products.signals.backend.models.AutonomyPriority`, but the warning surfacing is `SlackNotificationMinPriorityEnum` — a different auto-generated name for the same choices set derived from the `slack_notification_min_priority` field name. The override didn't suppress the warning, so the snapshot was updated to expect it instead of resolving it. Adding `"SlackNotificationMinPriorityEnum": "products.signals.backend.models.AutonomyPriority"` to `ENUM_NAME_OVERRIDES` in `posthog/settings/web.py` should eliminate the warning without needing to carry it in the snapshot.

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

Comment on lines 101 to +111
@@ -106,4 +108,23 @@ export const UsersSignalAutonomyCreateBody = /* @__PURE__ */ zod.object({
zod.null(),
])
.optional(),
slack_notification_channel: zod
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 The generated UsersSignalAutonomyCreateBody Zod schema is missing slack_notification_integration_id, even though SignalUserAutonomyConfigCreateSerializer defines it as an IntegerField. Without this field in the schema, any frontend client using Zod validation to build the POST body will be unable to type-check or validate the integration ID — the key field that actually enables Slack notifications.

Suggested change
export const UsersSignalAutonomyCreateBody = /* @__PURE__ */ zod.object({
autostart_priority: zod
.union([
zod
.enum(['P0', 'P1', 'P2', 'P3', 'P4'])
.describe('\* `P0` - P0\n\* `P1` - P1\n\* `P2` - P2\n\* `P3` - P3\n\* `P4` - P4'),
zod.enum(['']),
zod.null(),
])
.optional(),
slack_notification_integration_id: zod
.number()
.int()
.nullish()
.describe(
'Primary key of a Slack Integration row in one of the caller\'s teams. Pair with `slack_notification_channel` to enable notifications; pass null on either to disable them.'
),
slack_notification_channel: zod
Prompt To Fix With AI
This is a comment left during a code review.
Path: products/signals/frontend/generated/api.zod.ts
Line: 101-111

Comment:
The generated `UsersSignalAutonomyCreateBody` Zod schema is missing `slack_notification_integration_id`, even though `SignalUserAutonomyConfigCreateSerializer` defines it as an `IntegerField`. Without this field in the schema, any frontend client using Zod validation to build the POST body will be unable to type-check or validate the integration ID — the key field that actually enables Slack notifications.

```suggestion
export const UsersSignalAutonomyCreateBody = /* @__PURE__ */ zod.object({
    autostart_priority: zod
        .union([
            zod
                .enum(['P0', 'P1', 'P2', 'P3', 'P4'])
                .describe('\* `P0` - P0\n\* `P1` - P1\n\* `P2` - P2\n\* `P3` - P3\n\* `P4` - P4'),
            zod.enum(['']),
            zod.null(),
        ])
        .optional(),
    slack_notification_integration_id: zod
        .number()
        .int()
        .nullish()
        .describe(
            'Primary key of a Slack Integration row in one of the caller\'s teams. Pair with `slack_notification_channel` to enable notifications; pass null on either to disable them.'
        ),
    slack_notification_channel: zod
```

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

Comment thread posthog/api/test/__snapshots__/test_api_docs.ambr
cursoragent and others added 2 commits May 19, 2026 17:59
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
@veria-ai
Copy link
Copy Markdown

veria-ai Bot commented May 19, 2026

PR overview

Slack inbox notifications for suggested reviewers

This PR adds Signals Slack notification configuration and dispatch, plus Slack channel search/pagination and generated client updates. I checked the new autonomy config authorization, team scoping on selected integrations, notification dispatch path, Slack channel filtering/cache behavior, and the generated/frontend changes, and did not find a new security issue in the diff.

Security review

  • No new security issues were flagged in the latest review.
  • 1 issue(s) remain open on this pull request.

Risk: 2/10

return []

return list(
SignalUserAutonomyConfig.objects.filter(user_id__in=user_ids)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium: Missing project access check for notification recipients

A user who configured Slack notifications while they had project access can keep receiving future report titles and summaries after being removed from that project, as long as their GitHub login is still resolved in the organization. Filter targets by current project membership before posting.

Suggested change
SignalUserAutonomyConfig.objects.filter(user_id__in=user_ids)
SignalUserAutonomyConfig.objects.filter(user_id__in=user_ids, user__teams__id=report.team_id)

Co-authored-by: Michael Matloka <dev@twixes.com>
Comment on lines +1000 to +1001
current_team_id = request.user.current_team_id
if current_team_id is None or current_team_id not in UserPermissions(user).team_ids_visible_for_user:
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.

Security/Logic bug: Using request.user.current_team_id to validate against the target user's permissions is incorrect. When a staff member updates another user's autonomy config, this checks if request.user.current_team_id is in the target user's visible teams, which will fail if the staff member's current team differs from the target user's teams.

Impact: Staff members cannot update other users' Slack notification settings even though they should be able to.

Fix:

if integration_id is not None:
    user_team_ids = UserPermissions(user).team_ids_visible_for_user
    candidate = Integration.objects.filter(
        pk=integration_id,
        kind="slack",
        team_id__in=user_team_ids,
    ).first()
    if candidate is None:
        raise serializers.ValidationError(
            {"slack_notification_integration_id": "Unknown Slack integration for this user."}
        )
    integration = candidate

This ensures the integration's team is one that the target user has access to, regardless of who is making the request.

Suggested change
current_team_id = request.user.current_team_id
if current_team_id is None or current_team_id not in UserPermissions(user).team_ids_visible_for_user:
if integration_id is not None:
user_team_ids = UserPermissions(user).team_ids_visible_for_user
candidate = Integration.objects.filter(
pk=integration_id,
kind="slack",
team_id__in=user_team_ids,
).first()
if candidate is None:
raise serializers.ValidationError(
{"slack_notification_integration_id": "Unknown Slack integration for this user."}
)
integration = candidate

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Co-authored-by: Michael Matloka <dev@twixes.com>
return email or "Unknown user"


def lookup_slack_user_id_by_email(slack: SlackIntegration, email: str) -> str | None:
Copy link
Copy Markdown
Member

@andrewm4894 andrewm4894 May 21, 2026

Choose a reason for hiding this comment

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

👋 just double checkign this one around caching:

This is called once per recipient per report with no caching, and users.lookupByEmail is Slack Tier 3 (~50/min per workspace) — a burst of reports with several configured reviewers each can throttle the workspace's lookups, and we'll repeat the same lookup for the same person across every report.

An earlier commit (f3cdfc2f9f3) imported lookup_slack_user_id_by_email from products/slack_app/backend/api.py, which already layers a Django cache on top of the SlackUserProfileCache DB table — so steady-state Slack traffic from this feature scales with new reviewer emails, not report volume × reviewer count. Was there a reason for inlining a copy here? Re-using that helper looks like it would address this with no extra plumbing.

Renumber slack notification migration to 0020 after master 0019.
@github-actions
Copy link
Copy Markdown
Contributor

ClickHouse migration SQL per cloud environment

No ClickHouse migrations changed in this PR.

@Twixes Twixes merged commit c066578 into master May 22, 2026
256 of 259 checks passed
Copy link
Copy Markdown
Member Author

Twixes commented May 22, 2026

Merge activity

@Twixes Twixes deleted the posthog-code/signals-inbox-slack-notifications branch May 22, 2026 11:45
@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented May 22, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-05-22 12:10 UTC Run
prod-us ✅ Deployed 2026-05-22 12:25 UTC Run
prod-eu ✅ Deployed 2026-05-22 12:26 UTC Run

Twixes added a commit to PostHog/code that referenced this pull request May 22, 2026
## Problem

Signals inbox items previously surfaced only in-app. Users wanting a heads-up when a new item lands and they're a suggested reviewer had no way to opt in.

Even after the initial Slack notifications work landed, picking a channel still required a detour through PostHog Web — users had to leave PostHog Code to install the Slack integration, then come back. That's too much friction for what should be a one-time setup.

## Changes

![Screenshot 2026-05-19 at 08.52.23@2x.png](https://app.graphite.com/user-attachments/assets/51720fb7-3f89-4f77-a2d4-e8a89cad9a12.png)

Adding Slack notifications under **Inbox** source settings.

What it includes:

- Slack workspace picker (shown only when more than one Slack `Integration` is connected; otherwise the single workspace is implied).
- Notification channel picker, populated from `/api/environments/{teamId}/integrations/{id}/channels/` - same endpoint as Insight Alerts. Includes an explicit "Off" option.
- Minimum priority filter (also includes an "All priorities" option).

Also, in-app Slack connect flow so users no longer have to leave PostHog Code for PostHog Web.

- `SlackIntegrationService` in the main process. Mirrors the existing `GitHubIntegrationService` but registers a separate `slack-integration` deep-link key so each provider's handler stays isolated.
- `slackIntegration` tRPC router.
- The empty state in `SignalSlackNotificationsSettings` shows a "Connect Slack workspace" button that runs connection without redirecting to the Integrations page of Cloud settings.

Pairs with the backend changes in PostHog/posthog#58774.

## How did you test this?

Ran this locally.

## Publish to changelog?

no

---

_Created with_ [_PostHog Code_](https://posthog.com/code?ref=pr)
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.

3 participants