: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
chore: change card styling (#64420)
Fernando Gomes0083e2f5c747
diff --git a/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene.tsx b/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene.tsxindex 633664b76a06..904f60b3e229 100644--- a/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene.tsx+++ b/products/ai_observability/frontend/playground/AIObservabilityPlaygroundScene.tsx@@ -852,6 +852,19 @@ function ToolsButton({ promptId }: { promptId: string }): JSX.Element {)}+function getRoleDotClass(role: string): string {+ switch (role) {+ case 'user':+ return 'bg-[var(--color-blue-500)]'+ case 'assistant':+ return 'bg-[var(--color-green-500)]'+ case 'system':+ return 'bg-[var(--color-purple-500)]'+ default:+ return 'bg-muted'+ }+}+function SystemMessageDisplay({ promptId }: { promptId: string }): JSX.Element {const prompt = usePromptConfig(promptId)const { promptConfigs, editModal, collapsedSections, linkedSource } = useValues(llmPlaygroundPromptsLogic)@@ -885,7 +898,7 @@ function SystemMessageDisplay({ promptId }: { promptId: string }): JSX.Element {return (<>- <div className="border rounded p-4 py-2 relative group border-l-4 border-l-[var(--color-purple-500)]">+ <div className="border rounded p-4 py-2 relative group"><div className="absolute top-2 right-2 flex items-center gap-1"><PlaygroundSaveMenu prompt={prompt} /><LemonDivider vertical className="h-5 mx-0.5" />@@ -925,7 +938,8 @@ function SystemMessageDisplay({ promptId }: { promptId: string }): JSX.Element {onClick={() => toggleCollapsed(`system:${promptId}`)}><CollapsibleChevron collapsed={collapsed} />- <LemonTag type="completion" size="small">+ <span className={`w-2 h-2 rounded-full shrink-0 ${getRoleDotClass('system')}`} />+ <LemonTag type="default" size="small">System</LemonTag>{linkedContextLabel ? (@@ -1018,38 +1032,12 @@ function MessageDisplay({{ label: 'Assistant', value: 'assistant' },]- const getRoleBorderClass = (role: MessageRole): string => {- switch (role) {- case 'user':- return 'border-l-4 border-l-[var(--color-blue-500)]'- case 'assistant':- return 'border-l-4 border-l-[var(--color-green-500)]'- case 'system':- return 'border-l-4 border-l-[var(--color-purple-500)]'- default:- return ''- }- }-- const getRoleDotClass = (role: MessageRole): string => {- switch (role) {- case 'user':- return 'bg-[var(--color-blue-500)]'- case 'assistant':- return 'bg-[var(--color-green-500)]'- case 'system':- return 'bg-[var(--color-purple-500)]'- default:- return 'bg-muted'- }- }-const trimmedContent = message.content.trim()const useJsonEditor = trimmedContent.startsWith('{') || trimmedContent.startsWith('[')return (<>- <div className={`border rounded p-4 py-2 relative group ${getRoleBorderClass(message.role)}`}>+ <div className="border rounded p-4 py-2 relative group"><div className="absolute top-4 right-4 flex items-center gap-1"><LemonButtonsize="small"