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): flag empty table name or path in the custom source builder (#85216)

Tom Owers9082affb1147
diff --git a/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx b/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx
index d6d12883c4c8..a5474828f39f 100644
--- a/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx
+++ b/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx
@@ -537,6 +537,11 @@ function TableCard({
onUpdatePaginator: (paginator: Paginator) => void
onRemove: () => void
}): JSX.Element {
+ // Name and path are both required by the backend (min_length=1). A table left with either
+ // blank passes the wizard's non-empty manifest check and only fails at create time with a
+ // manifest-path error, so warn here where the fields are.
+ const nameMissing = !table.name.trim()
+ const pathMissing = !table.path.trim()
return (
<div className="rounded border border-border p-3 space-y-3">
<div className="flex items-center justify-between">
@@ -582,6 +587,19 @@ function TableCard({
/>
</LemonField.Pure>
</div>
+ {/* Persistently mounted so screen readers announce the warnings as they appear — a
+ region that mounts already populated is skipped by several readers. empty:hidden
+ keeps it from adding spacing when both fields are filled. */}
+ <div aria-live="polite" className="empty:hidden space-y-2">
+ {nameMissing && (
+ <p className="m-0 text-xs text-danger">
+ Enter a table name. Creating the source fails without one.
+ </p>
+ )}
+ {pathMissing && (
+ <p className="m-0 text-xs text-danger">Enter a path. Creating the source fails without one.</p>
+ )}
+ </div>
<LemonField.Pure label="Records JSONPath">
<LemonInput
placeholder="data"