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(insights): respect hidden descriptions in exports (#99336)

Matt Pua8a3d8c27d35e
diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.test.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.test.tsx
index 748186978c4f..961f2f26d4a9 100644
--- a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.test.tsx
+++ b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.test.tsx
@@ -72,11 +72,11 @@ describe('InsightMeta', () => {
})
})
- it('always shows description in non-compact mode regardless of showDescription', () => {
+ it('hides description in non-compact mode when showDescription is false', () => {
const { container } = render(
<InsightMetaContent title="Test" description={description} compact={false} showDescription={false} />
)
- expect(container.querySelector('.CardMeta__description')).toBeInTheDocument()
+ expect(container.querySelector('.CardMeta__description')).toBeNull()
})
describe('tile.show_description default-to-show mapping', () => {
diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx
index bbdcb97d1424..14c3c3b2bc00 100644
--- a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx
+++ b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx
@@ -843,7 +843,7 @@ export function InsightMetaContent({
return (
<>
{titleEl}
- {(!compact || showDescription) && !!description && (
+ {showDescription !== false && !!description && (
<LemonMarkdown className="CardMeta__description" lowKeyHeadings>
{description}
</LemonMarkdown>