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.

fix(error-tracking): unify issue scene skeletons (#80399)

Hugues Pouillot1df072db24d9
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 6aac99d5f812..58ffc0e42606 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -5918,10 +5918,14 @@ snapshots:
hash: v1.k794b7964.effa172f53e0be752b64baf59ec6eb6d8d1394084844090bc09e7ef90a7bad06.Ez9jT5d8PoIOaqzCrvVXd1-PgMzu_wVuE69ziQkNYEA
scenes-app-errortracking--group-page--light:
hash: v1.k794b7964.ec5dcd889de8bf9fff7fe365a739272b442202e9e16287424f1fbbcfb9ba66f5.73VkDZwxaOr8lS6XVTl-77-nkJnWYud2zj9tfDIH0QA
+ scenes-app-errortracking--group-page-loading--dark:
+ hash: v1.k794b7964.9039f3f13e03d9546145b8158c0dc2343a2f0d689b0e1886999a730844326678.VhSeZB_vduqN8mmG2pLlYqYuz5xvItxvmOyAws6IdAQ
+ scenes-app-errortracking--group-page-loading--light:
+ hash: v1.k794b7964.1842e7909e950d59be4d3302ae9e6ada8e9860a79d116dd4a645a7ac5958eda9.w-1LVrCGpRQ6TINTHvufsTWDsGfLe1M_LJ9W5ZYzj7E
scenes-app-errortracking--group-page-with-self-driving--dark:
- hash: v1.k794b7964.95abde46e14e06256c141eb15aac3c3db588f720db2c7515461a71bcd16f571d.r6tURZmk4glz5LGEfYDPNVqo6NC0SNya16D8kNGnY7A
+ hash: v1.k794b7964.91621c05d1d7cd3e7199addfb39c61e7bade523fed3c2fda0a3cf54c1b9e9309.snphNnQjReEqqnodEXJsljN0iTO0j2r-ev3-aEdW0bE
scenes-app-errortracking--group-page-with-self-driving--light:
- hash: v1.k794b7964.6f40e8d5a1f3730b7842b30e4471b9cbd6123de32ed5edb9197a0bcc78f72bc2.Wg52Oi9DhUX2bPxOyYR5DJynIvhUxhldJveDE2-HmF0
+ hash: v1.k794b7964.6f92e665bb93faf3c56a0c3ce2b539f7af479198acf4fe860880227049ed4173.rBYaujVCRGRAkcFatI2HJdBGNXDXZtAtwDWtdGShtXk
scenes-app-errortracking--list-page--dark:
hash: v1.k794b7964.f474d0d6caf49e7b9a4cfd469546ab9de031039030fb9da704293bc40d87e69a.WxsvGwytEdwdnq8_Ywy_dgGBBYoSYCX9hX72AB42bgs
scenes-app-errortracking--list-page--light:
diff --git a/frontend/src/lib/components/Errors/Exception/CollapsibleExceptionHeader.tsx b/frontend/src/lib/components/Errors/Exception/CollapsibleExceptionHeader.tsx
index bba613fa8ba9..003b75af6c7c 100644
--- a/frontend/src/lib/components/Errors/Exception/CollapsibleExceptionHeader.tsx
+++ b/frontend/src/lib/components/Errors/Exception/CollapsibleExceptionHeader.tsx
@@ -1,7 +1,8 @@
import { useEffect, useMemo, useRef, useState } from 'react'
-import { LemonButton, LemonSkeleton, Tooltip } from '@posthog/lemon-ui'
+import { LemonButton, Tooltip } from '@posthog/lemon-ui'
+import { Skeleton } from 'lib/ui/quill'
import { cn } from 'lib/utils/css-classes'
import { RuntimeIcon } from 'products/error_tracking/frontend/components/RuntimeIcon'
@@ -52,7 +53,9 @@ export function CollapsibleExceptionHeader({
<div className="flex gap-2 items-center justify-between min-w-0">
<div className="flex gap-2 items-center min-w-0">
{loading ? (
- <LemonSkeleton className="w-[25%] h-2" />
+ <Skeleton className="h-2 w-[25%]">
+ <span>Loading…</span>
+ </Skeleton>
) : (
<>
{runtime && <RuntimeIcon runtime={runtime} className="ml-1 shrink-0" />}
@@ -101,7 +104,13 @@ export function CollapsibleExceptionHeader({
'cursor-pointer': !truncate && isClamped,
})}
>
- {loading ? <LemonSkeleton className="w-[50%] h-2" /> : value}
+ {loading ? (
+ <Skeleton className="h-2 w-[50%]">
+ <span>Loading…</span>
+ </Skeleton>
+ ) : (
+ value
+ )}
</div>
{!truncate && isClamped && (
<LemonButton
diff --git a/frontend/src/lib/components/Errors/ExceptionList/LoadingExceptionList.tsx b/frontend/src/lib/components/Errors/ExceptionList/LoadingExceptionList.tsx
index 4ab38430f715..344c107f51b2 100644
--- a/frontend/src/lib/components/Errors/ExceptionList/LoadingExceptionList.tsx
+++ b/frontend/src/lib/components/Errors/ExceptionList/LoadingExceptionList.tsx
@@ -1,12 +1,15 @@
-import { LemonSkeleton } from '@posthog/lemon-ui'
-
+import { Skeleton } from 'lib/ui/quill'
import { cn } from 'lib/utils/css-classes'
export function LoadingExceptionList({ className }: { className?: string }): JSX.Element {
return (
<div className={cn('flex flex-col gap-y-2', className)}>
- <LemonSkeleton className="h-5 w-1/2" />
- <LemonSkeleton className="h-4 w-full" />
+ <Skeleton className="h-5 w-1/2">
+ <span>Loading…</span>
+ </Skeleton>
+ <Skeleton className="h-4 w-full">
+ <span>Loading…</span>
+ </Skeleton>
</div>
)
}
diff --git a/products/error_tracking/frontend/ErrorTracking.stories.tsx b/products/error_tracking/frontend/ErrorTracking.stories.tsx
index ad4d9b1a22ea..fc35fc5186b4 100644
--- a/products/error_tracking/frontend/ErrorTracking.stories.tsx
+++ b/products/error_tracking/frontend/ErrorTracking.stories.tsx
@@ -247,13 +247,31 @@ export const GroupPage: Story = {
parameters: { pageUrl: urls.errorTrackingIssue(ISSUE_ID) },
}
+export const GroupPageLoading: Story = {
+ name: 'Issue scene loading',
+ parameters: {
+ pageUrl: urls.errorTrackingIssue(ISSUE_ID),
+ testOptions: { waitForLoadersToDisappear: false },
+ },
+ decorators: [
+ mswDecorator({
+ post: {
+ '/api/environments/:team_id/query/:kind/': () => new Promise<never>(() => {}),
+ },
+ }),
+ ],
+}
+
// Self-driving investigated this issue, so its section renders in the right pane above the exception
// card. This is the only coverage of the placement: the section's own story fabricates a pane around
// it, so it cannot show that the two header strips line up, that the section paints the background the
// pane leaves unpainted, or that a single border separates the two.
export const GroupPageWithSelfDriving: Story = {
name: 'Issue scene with self-driving',
- parameters: { pageUrl: urls.errorTrackingIssue(ISSUE_ID) },
+ parameters: {
+ pageUrl: urls.errorTrackingIssue(ISSUE_ID),
+ testOptions: { waitForLoadersToDisappear: false },
+ },
decorators: [
mswDecorator({
get: {
diff --git a/products/error_tracking/frontend/components/Breakdowns/BreakdownsTileButton.tsx b/products/error_tracking/frontend/components/Breakdowns/BreakdownsTileButton.tsx
index 39dc3eb41029..958f0d559210 100644
--- a/products/error_tracking/frontend/components/Breakdowns/BreakdownsTileButton.tsx
+++ b/products/error_tracking/frontend/components/Breakdowns/BreakdownsTileButton.tsx
@@ -1,8 +1,9 @@
import { useActions, useValues } from 'kea'
import posthog from 'posthog-js'
-import { LemonSkeleton, Tooltip } from '@posthog/lemon-ui'
+import { Tooltip } from '@posthog/lemon-ui'
+import { Skeleton } from 'lib/ui/quill'
import { cn } from 'lib/utils/css-classes'
import { BREAKDOWN_NULL_STRING_LABEL } from 'scenes/insights/utils'
@@ -68,7 +69,9 @@ function BreakdownPreview({ title, property }: { title: string; property: string
</Tooltip>
) : responseLoading ? (
<div className="h-4 flex items-center justify-center">
- <LemonSkeleton />
+ <Skeleton className="h-4 w-full">
+ <span>Loading…</span>
+ </Skeleton>
</div>
) : properties.length === 0 || hasOnlyNullBreakdown ? (
<div className="text-muted text-xs h-4 flex items-center justify-center">No data</div>
diff --git a/products/error_tracking/frontend/components/IssueMetadata.tsx b/products/error_tracking/frontend/components/IssueMetadata.tsx
index cecc54243946..2bd0e3f113d8 100644
--- a/products/error_tracking/frontend/components/IssueMetadata.tsx
+++ b/products/error_tracking/frontend/components/IssueMetadata.tsx
@@ -3,10 +3,11 @@ import { PropsWithChildren, UIEvent, useCallback, useMemo, useRef } from 'react'
import { match } from 'ts-pattern'
import { IconChevronRight, IconTrending } from '@posthog/icons'
-import { LemonSkeleton, Tooltip } from '@posthog/lemon-ui'
+import { Tooltip } from '@posthog/lemon-ui'
import { ErrorTrackingSpikeEvent } from 'lib/components/Errors/types'
import { dayjs } from 'lib/dayjs'
+import { Skeleton } from 'lib/ui/quill'
import { humanFriendlyLargeNumber } from 'lib/utils/numbers'
import { ErrorTrackingIssueAggregations } from '~/queries/schema/schema-general'
@@ -188,7 +189,11 @@ function renderMetric(name: string, value: number | undefined, loading: boolean,
return (
<span className="contents">
{match([loading])
- .with([true], () => <LemonSkeleton className="w-[50px] h-2" />)
+ .with([true], () => (
+ <Skeleton className="h-2 w-[50px]">
+ <span>Loading…</span>
+ </Skeleton>
+ ))
.with([false], () => (
<Tooltip title={tooltip} delayMs={0} placement="right">
<div className="flex items-center gap-1">
diff --git a/products/error_tracking/frontend/components/TimeBoundary.tsx b/products/error_tracking/frontend/components/TimeBoundary.tsx
index 3ad074d6143b..bf1e489edc2c 100644
--- a/products/error_tracking/frontend/components/TimeBoundary.tsx
+++ b/products/error_tracking/frontend/components/TimeBoundary.tsx
@@ -2,10 +2,9 @@ import { useActions, useValues } from 'kea'
import { MouseEvent, useCallback } from 'react'
import { P, match } from 'ts-pattern'
-import { LemonSkeleton } from '@posthog/lemon-ui'
-
import { TZLabel } from 'lib/components/TZLabel'
import { Dayjs } from 'lib/dayjs'
+import { Skeleton } from 'lib/ui/quill'
import { DateRange } from '~/queries/schema/schema-general'
@@ -34,7 +33,11 @@ export function TimeBoundary({ time, loading, label, updateDateRange, suffix }:
return (
<>
{match([loading, time])
- .with([true, P.any], () => <LemonSkeleton className="w-[50px] h-2" />)
+ .with([true, P.any], () => (
+ <Skeleton className="h-2 w-[50px]">
+ <span>Loading…</span>
+ </Skeleton>
+ ))
.with([false, P.nullish], () => <span className="text-xs text-muted">-</span>)
.with([false, P.any], () => (
<span