: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(posthog-ai): wrap long separator labels in the quill thread (#111341)
Shy Alterbbebd083f151
diff --git a/products/posthog_ai/frontend/components/quill/QuillSeparatorRow.tsx b/products/posthog_ai/frontend/components/quill/QuillSeparatorRow.tsxindex b37a3bd280e6..529a1980fdba 100644--- a/products/posthog_ai/frontend/components/quill/QuillSeparatorRow.tsx+++ b/products/posthog_ai/frontend/components/quill/QuillSeparatorRow.tsx@@ -42,9 +42,12 @@ function separatorLabel(item: ThreadItem, live: boolean): { label: string; runniconst parts = ['Conversation compacted',item.trigger,- typeof item.preTokens === 'number' ? `~${humanFriendlyNumber(item.preTokens)} tokens summarized` : null,+ typeof item.preTokens === 'number'+ ? `~${humanFriendlyNumber(item.preTokens)}\u00a0tokens summarized`+ : null,]- return { label: parts.filter(Boolean).join(' · '), running: false }+ // The non-breaking space keeps each dot on the line it follows when the label wraps.+ return { label: parts.filter(Boolean).join('\u00a0· '), running: false }}if (item.type === 'conversation_cleared') {return { label: 'Conversation cleared', running: false }@@ -56,8 +59,13 @@ function separatorLabel(item: ThreadItem, live: boolean): { label: string; runniexport function QuillSeparatorRow({ item, live }: { item: ThreadItem; live: boolean }): JSX.Element {const { label, running } = separatorLabel(item, live)return (- <ChatMarker variant="separator" status={running ? 'running' : undefined}>- <ChatMarkerContent>{label}</ChatMarkerContent>+ // A long label wraps between the rules instead of running past the edge of a narrow thread.+ <ChatMarker+ variant="separator"+ status={running ? 'running' : undefined}+ className="before:min-w-4 after:min-w-4"+ >+ <ChatMarkerContent className="max-w-[80%] shrink">{label}</ChatMarkerContent></ChatMarker>)}