: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
feat(posthog-ai): show reply actions under each answer on phones (#111551)
Shy Alter2fdd44dae32a
diff --git a/products/posthog_ai/frontend/components/quill/QuillFooterButton.tsx b/products/posthog_ai/frontend/components/quill/QuillFooterButton.tsxindex 57e269125a72..e44faffbd9a1 100644--- a/products/posthog_ai/frontend/components/quill/QuillFooterButton.tsx+++ b/products/posthog_ai/frontend/components/quill/QuillFooterButton.tsx@@ -1,3 +1,4 @@+import { useValues } from 'kea'import { type ReactNode, useEffect, useRef, useState } from 'react'import { IconCheck, IconCopy } from '@posthog/icons'@@ -5,6 +6,8 @@ import { Button, Tooltip, TooltipContent, TooltipTrigger } from '@posthog/quill-import { copyToClipboard } from 'lib/utils/copyToClipboard'+import { todayShellLogic } from '~/layout/today/todayShellLogic'+/*** Icon affordance for message and turn footers. Stays muted whether idle or active: the icon carries* the state, so the row never lights up in a colour the thread doesn't use elsewhere.@@ -22,6 +25,7 @@ export function QuillFooterButton({dataAttr?: stringchildren: ReactNode}): JSX.Element {+ const { todayRailEnabled, phoneLayout } = useValues(todayShellLogic)return (<Tooltip><TooltipTrigger@@ -29,7 +33,7 @@ export function QuillFooterButton({render={<Buttonvariant="default"- size="icon-xs"+ size={todayRailEnabled && phoneLayout ? 'icon-sm' : 'icon-xs'}aria-label={label}onClick={onClick}data-attr={dataAttr}diff --git a/products/posthog_ai/frontend/components/quill/QuillTurnFeedbackActions.tsx b/products/posthog_ai/frontend/components/quill/QuillTurnFeedbackActions.tsxindex b3cdc90ce84d..4fa0faf4491c 100644--- a/products/posthog_ai/frontend/components/quill/QuillTurnFeedbackActions.tsx+++ b/products/posthog_ai/frontend/components/quill/QuillTurnFeedbackActions.tsx@@ -1,3 +1,4 @@+import { useValues } from 'kea'import { useContext, useId } from 'react'import { IconThumbsDown, IconThumbsDownFilled, IconThumbsUp, IconThumbsUpFilled, IconX } from '@posthog/icons'@@ -5,6 +6,8 @@ import { Button, ChatMessageFooter, Input, Text, cn } from '@posthog/quill-primiimport { stripMarkdown } from 'lib/utils/markdown'+import { todayShellLogic } from '~/layout/today/todayShellLogic'+import type { TurnFeedbackActionsProps } from '../turnFeedbackTypes'import { TurnRevealContext } from '../TurnRevealContext'import { useTurnRating } from '../useTurnRating'@@ -21,6 +24,7 @@ export function QuillTurnFeedbackActions({timestamp,}: TurnFeedbackActionsProps): JSX.Element {const turnHovered = useContext(TurnRevealContext)+ const { todayRailEnabled, phoneLayout } = useValues(todayShellLogic)const { rating, submitRating, feedback, setFeedback, feedbackInputStatus, closeFeedback, submitFeedback } =useTurnRating({ sessionId, turnIndex, run, traceId })const feedbackPromptId = useId()@@ -28,7 +32,10 @@ export function QuillTurnFeedbackActions({return (<div className="flex flex-col gap-2"><ChatMessageFooter- className={cn('min-h-5 items-center gap-1 ps-0', footerRevealClass(!!rating || turnHovered))}+ className={cn(+ 'min-h-5 items-center gap-1 ps-0',+ footerRevealClass(!!rating || turnHovered || (todayRailEnabled && phoneLayout))+ )}>{timestamp !== undefined && <QuillFooterTimestamp time={timestamp} />}{turnText && (