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(workflows): limit the workflow header description to two lines (#120542)

Daniel Marchuk3e2a39fdcb9b
diff --git a/frontend/src/layout/scenes/components/SceneDescription.tsx b/frontend/src/layout/scenes/components/SceneDescription.tsx
index 6d12aff9e136..9518591a7e4b 100644
--- a/frontend/src/layout/scenes/components/SceneDescription.tsx
+++ b/frontend/src/layout/scenes/components/SceneDescription.tsx
@@ -20,6 +20,8 @@ type SceneDescriptionProps = {
renameDebounceMs?: number
saveOnBlur?: boolean
maxLength?: number
+ /** Shows at most two lines until the user clicks to edit. */
+ clamp?: boolean
/** When true, description field is read-only (title AI control may be generating body copy too). */
isGeneratingMetadata?: boolean
}
@@ -34,6 +36,7 @@ export function SceneDescription({
renameDebounceMs = 100,
saveOnBlur = false,
maxLength,
+ clamp = false,
isGeneratingMetadata = false,
}: SceneDescriptionProps): JSX.Element | null {
const [description, setDescription] = useState(initialDescription)
@@ -146,7 +149,7 @@ export function SceneDescription({
autoHeight
size="base"
>
- <LemonMarkdown lowKeyHeadings>
+ <LemonMarkdown lowKeyHeadings className={clamp ? 'line-clamp-2 min-w-0' : undefined}>
{description || (canEdit ? 'Enter description (optional)' : 'No description')}
</LemonMarkdown>
{canEdit && !forceEdit && <IconPencil />}
diff --git a/products/workflows/frontend/Workflows/WorkflowHeaderBar.tsx b/products/workflows/frontend/Workflows/WorkflowHeaderBar.tsx
index 2739e38f3e9a..83e8e8d9f7b1 100644
--- a/products/workflows/frontend/Workflows/WorkflowHeaderBar.tsx
+++ b/products/workflows/frontend/Workflows/WorkflowHeaderBar.tsx
@@ -93,6 +93,7 @@ export function WorkflowHeaderBar({ commands, ...props }: WorkflowHeaderBarProps
description={workflow?.description}
onChange={(description) => setWorkflowValue('description', description)}
canEdit
+ clamp
renameDebounceMs={200}
/>
</div>