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.

feat(experiments): show conclusion comment in a bordered panel (#103680)

Juraj Majerik17a27588b77b
diff --git a/frontend/src/scenes/experiments/ExperimentView/Info.tsx b/frontend/src/scenes/experiments/ExperimentView/Info.tsx
index e1a40fdc4ab0..8f4a7b0c5783 100644
--- a/frontend/src/scenes/experiments/ExperimentView/Info.tsx
+++ b/frontend/src/scenes/experiments/ExperimentView/Info.tsx
@@ -2,7 +2,7 @@ import clsx from 'clsx'
import { useActions, useValues } from 'kea'
import { IconPencil, IconWarning } from '@posthog/icons'
-import { LemonButton, LemonTag, Link, ProfilePicture, Tooltip } from '@posthog/lemon-ui'
+import { LemonButton, LemonCard, LemonTag, Link, ProfilePicture, Tooltip } from '@posthog/lemon-ui'
import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'
import { IconOpenInNew } from 'lib/lemon-ui/icons'
@@ -234,7 +234,27 @@ export function Info(): JSX.Element {
</div>
</div>
{experiment.conclusion && experiment.end_date && experiment.conclusion_comment && (
- <div className="mt-2 max-w-[600px] text-secondary">{experiment.conclusion_comment}</div>
+ <LemonCard
+ hoverEffect={false}
+ className="mt-2 bg-[var(--color-bg-table)] px-3 py-2.5"
+ data-attr="experiment-conclusion-comment"
+ >
+ <div className="flex items-center gap-2">
+ <span className="metric-cell-header font-bold">Conclusion</span>
+ <div
+ className={clsx(
+ 'w-2 h-2 rounded-full shrink-0',
+ CONCLUSION_DISPLAY_CONFIG[experiment.conclusion]?.color || ''
+ )}
+ />
+ <span className="metric-cell font-semibold">
+ {CONCLUSION_DISPLAY_CONFIG[experiment.conclusion]?.title || experiment.conclusion}
+ </span>
+ </div>
+ <p className="metric-cell font-normal m-0 mt-1 leading-relaxed whitespace-pre-wrap break-words">
+ {experiment.conclusion_comment}
+ </p>
+ </LemonCard>
)}
</>
)