Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): cap channel list on Slack webhook setup page (#61110)

Marcus Hof3e1123dbc4fd
diff --git a/products/data_warehouse/frontend/shared/components/forms/WebhookSetupForm.tsx b/products/data_warehouse/frontend/shared/components/forms/WebhookSetupForm.tsx
index ec9e97291d38..e1e5a7ec470a 100644
--- a/products/data_warehouse/frontend/shared/components/forms/WebhookSetupForm.tsx
+++ b/products/data_warehouse/frontend/shared/components/forms/WebhookSetupForm.tsx
@@ -13,6 +13,8 @@ import { SourceConfig, SourceFieldConfig } from '~/queries/schema/schema-general
import { sourceFieldToElement } from './SourceForm'
+const MAX_VISIBLE_WEBHOOK_TABLES = 20
+
export interface WebhookCreateResult {
success: boolean
webhook_url: string
@@ -56,12 +58,20 @@ export function WebhookSetupForm({
const webhookTablesList =
webhookTables && webhookTables.length > 0 ? (
<div className="space-y-1">
- <p className="font-semibold text-sm mb-1">Tables using webhook sync:</p>
+ <p className="font-semibold text-sm mb-1">
+ {webhookTables.length.toLocaleString()} {webhookTables.length === 1 ? 'table' : 'tables'} using
+ webhook sync:
+ </p>
<ul className="list-disc list-inside text-sm">
- {webhookTables.map((t) => (
+ {webhookTables.slice(0, MAX_VISIBLE_WEBHOOK_TABLES).map((t) => (
<li key={t.name}>{t.label || t.name}</li>
))}
</ul>
+ {webhookTables.length > MAX_VISIBLE_WEBHOOK_TABLES && (
+ <p className="text-sm text-muted">
+ …and {(webhookTables.length - MAX_VISIBLE_WEBHOOK_TABLES).toLocaleString()} more
+ </p>
+ )}
</div>
) : null