: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): match the quill composer loading skeleton to the composer (#123827)
Shy Alterb395d422f072
diff --git a/products/posthog_ai/frontend/api/composer.ts b/products/posthog_ai/frontend/api/composer.tsindex a35b68088d82..faf5e94be113 100644--- a/products/posthog_ai/frontend/api/composer.ts+++ b/products/posthog_ai/frontend/api/composer.ts@@ -19,3 +19,4 @@ export type {export { QuillComposerLayout } from '../components/quill/QuillComposerLayout'export type { QuillComposerLayoutProps } from '../components/quill/QuillComposerLayout'export { QuillComposerSendButton } from '../components/quill/QuillComposerSendButton'+export { QuillTaskComposerSkeleton } from '../components/quill/QuillTaskComposerSkeleton'diff --git a/products/posthog_ai/frontend/components/quill/QuillTaskComposerSkeleton.tsx b/products/posthog_ai/frontend/components/quill/QuillTaskComposerSkeleton.tsxnew file mode 100644index 000000000000..6704b0906791--- /dev/null+++ b/products/posthog_ai/frontend/components/quill/QuillTaskComposerSkeleton.tsx@@ -0,0 +1,20 @@+import { Skeleton } from '@posthog/quill-primitives'++export function QuillTaskComposerSkeleton(): JSX.Element {+ return (+ <div data-quill aria-hidden className="flex flex-col rounded-sm border border-[var(--input)] bg-[var(--card)]">+ <div className="flex min-h-10 items-center px-2.5">+ <Skeleton className="h-3.5 w-48 rounded-sm" />+ </div>+ <div className="flex h-8 items-center gap-1 pr-1 pb-1 pl-1.5">+ <Skeleton className="mx-1 size-4 rounded-sm" />+ <Skeleton className="ml-2 h-3.5 w-28 rounded-sm" />+ <Skeleton className="ml-3 h-3.5 w-32 rounded-sm" />+ <div className="ml-auto flex items-center gap-2">+ <Skeleton className="h-3.5 w-24 rounded-sm" />+ <Skeleton className="size-7 rounded-sm" />+ </div>+ </div>+ </div>+ )+}diff --git a/products/posthog_ai/frontend/scenes/TaskTracker/components/QuillTaskComposerSkeleton.tsx b/products/posthog_ai/frontend/scenes/TaskTracker/components/QuillTaskComposerSkeleton.tsxdeleted file mode 100644index 53720f3ea2a0..000000000000--- a/products/posthog_ai/frontend/scenes/TaskTracker/components/QuillTaskComposerSkeleton.tsx+++ /dev/null@@ -1,16 +0,0 @@-import { Skeleton } from '@posthog/quill-primitives'--export function QuillTaskComposerSkeleton(): JSX.Element {- return (- <div data-quill aria-hidden className="flex flex-col gap-1">- <div className="rounded-sm border border-border">- <Skeleton className="h-16 w-full" />- </div>- <div className="flex h-6 items-center gap-1 px-1">- <Skeleton className="size-6" />- <Skeleton className="h-4 w-24" />- <Skeleton className="h-4 w-32" />- </div>- </div>- )-}diff --git a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunChat.tsx b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunChat.tsxindex 8eddd2f26fc6..a7849d88cc67 100644--- a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunChat.tsx+++ b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunChat.tsx@@ -10,6 +10,7 @@ import { runInteractionLogic, type RunInteractionLogicProps } from 'products/pos// flash. The inbox embeds keep the lazy `ReadonlyRunSurface`.import { RunSurface } from 'products/posthog_ai/frontend/api/runSurface'+import { QuillTaskComposerSkeleton } from '../../../components/quill/QuillTaskComposerSkeleton'import { RunEscapeBoundary, type RunEscapeBoundaryProps } from '../../../components/RunEscapeBoundary'import { useForegroundStream } from '../../../hooks/useForegroundStream'import { useThreadSkin } from '../../../hooks/useThreadSkin'@@ -18,7 +19,6 @@ import { runCancellationLogic } from '../../../logics/runCancellationLogic'import type { RunContinuationHandoff } from '../../../logics/runInteractionLogic'import type { AttachedContextItem } from '../../../types/contextTypes'import { taskDetailSceneLogic } from '../taskDetailSceneLogic'-import { QuillTaskComposerSkeleton } from './QuillTaskComposerSkeleton'import { TaskRunComposer } from './TaskRunComposer'export interface TaskRunChatProps {diff --git a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunLoadingSkeleton.tsx b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunLoadingSkeleton.tsxindex f4f28cc4ec20..a3a91cb3f62b 100644--- a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunLoadingSkeleton.tsx+++ b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunLoadingSkeleton.tsx@@ -1,9 +1,9 @@import { useState } from 'react'import { QuillRunSurfaceInputs } from '../../../components/quill/QuillRunSurfaceInputs'+import { QuillTaskComposerSkeleton } from '../../../components/quill/QuillTaskComposerSkeleton'import { RunLogSkeleton } from '../../../components/RunLogSkeleton'import { useThreadSkin } from '../../../hooks/useThreadSkin'-import { QuillTaskComposerSkeleton } from './QuillTaskComposerSkeleton'export function TaskRunLoadingSkeleton(): JSX.Element {const skin = useThreadSkin()diff --git a/products/tasks/frontend/spaces/NewSessionScene.tsx b/products/tasks/frontend/spaces/NewSessionScene.tsxindex 55709b2f4f33..cafe18a0be64 100644--- a/products/tasks/frontend/spaces/NewSessionScene.tsx+++ b/products/tasks/frontend/spaces/NewSessionScene.tsx@@ -8,11 +8,12 @@ import { SceneExport } from 'scenes/sceneTypes'import { SceneContent } from '~/layout/scenes/components/SceneContent'+import { QuillTaskComposerSkeleton } from 'products/posthog_ai/frontend/api/composer'+import { newSessionSceneLogic } from './newSessionSceneLogic'import { NewSessionSuggestions } from './NewSessionSuggestions'import { newSessionSuggestionsLogic } from './newSessionSuggestionsLogic'import { SpaceTaskComposer } from './SpaceTaskComposer'-import { SpaceTaskComposerSkeleton } from './SpaceTaskComposerSkeleton'export const scene: SceneExport = {component: NewSessionScene,@@ -60,7 +61,7 @@ export function NewSessionScene(): JSX.Element {<><h1 className="sr-only">Start a new session</h1>{resolving ? (- <SpaceTaskComposerSkeleton />+ <QuillTaskComposerSkeleton />) : (space && (// Each space gets its own composer, so it starts on that space's repository.diff --git a/products/tasks/frontend/spaces/SpaceTaskComposer.tsx b/products/tasks/frontend/spaces/SpaceTaskComposer.tsxindex ae76ab04f533..5d55b313f819 100644--- a/products/tasks/frontend/spaces/SpaceTaskComposer.tsx+++ b/products/tasks/frontend/spaces/SpaceTaskComposer.tsx@@ -1,8 +1,8 @@+import { QuillTaskComposerSkeleton } from 'products/posthog_ai/frontend/api/composer'import { type ComposerPrefillRequest, EmbeddedTaskComposer } from 'products/posthog_ai/frontend/api/runner'import { ChannelDTOApi } from '../generated/api.schemas'import { SpaceComposerRepositoryConfig } from './spaceSceneLogic'-import { SpaceTaskComposerSkeleton } from './SpaceTaskComposerSkeleton'const SPACE_COMPOSER_OVERRIDE = {placeholder: 'What do you want to ship?',@@ -40,7 +40,7 @@ export function SpaceTaskComposer({focusRequest={focusRequest}autoFocus={false}prefillRequest={prefillRequest}- fallback={<SpaceTaskComposerSkeleton />}+ fallback={<QuillTaskComposerSkeleton />}/>)}diff --git a/products/tasks/frontend/spaces/SpaceTaskComposerSkeleton.tsx b/products/tasks/frontend/spaces/SpaceTaskComposerSkeleton.tsxdeleted file mode 100644index 83644d7cec33..000000000000--- a/products/tasks/frontend/spaces/SpaceTaskComposerSkeleton.tsx+++ /dev/null@@ -1,20 +0,0 @@-import { Skeleton } from '@posthog/quill'--/** The repository picker, the input and the control row at their loaded sizes, so the page does not jump when the composer chunk lands. */-export function SpaceTaskComposerSkeleton(): JSX.Element {- return (- <div aria-hidden className="flex flex-col gap-2">- <Skeleton className="h-7 w-36" />- <div className="flex flex-col gap-1">- <div className="rounded-sm border border-border">- <Skeleton className="h-16 w-full" />- </div>- <div className="flex h-6 items-center gap-1 px-1">- <Skeleton className="size-6" />- <Skeleton className="h-4 w-24" />- <Skeleton className="h-4 w-32" />- </div>- </div>- </div>- )-}