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(onboarding): keep the install step title on one line as events arrive (#83119)

Matt Brookera65ff0e72449
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx b/frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx
index dd38b80814de..4efcc15b690e 100644
--- a/frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx
+++ b/frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx
@@ -91,11 +91,13 @@ export const OnboardingStep = ({
<OnboardingBreadcrumbs />
<div className="flex flex-col sm:flex-row sm:justify-between sm:items-center items-start gap-2 mt-3 px-4 sm:px-0">
{!hideTitle && (
- <h1 className={clsx('font-bold m-0 px-0 sm:px-2', fullWidth && 'text-center')}>
+ <h1 className={clsx('font-bold m-0 px-0 sm:px-2 sm:shrink-0', fullWidth && 'text-center')}>
{title || stepKeyToTitle(stepKey)}
</h1>
)}
- {actions && <div className="flex flex-row flex-wrap sm:flex-nowrap gap-2">{actions}</div>}
+ {actions && (
+ <div className="flex flex-row flex-wrap sm:flex-nowrap gap-2 min-w-0">{actions}</div>
+ )}
</div>
</div>
</div>
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
index b9d9c4edce1c..8cf96929f121 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
+++ b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
@@ -134,7 +134,7 @@ export function MobileInstallHandoff({
showContinue={false}
showSkip={!installationComplete}
actions={
- <div className="pr-2">
+ <div className="pr-2 min-w-0">
<RealtimeCheckIndicator
teamPropertyToVerify={teamPropertyToVerify}
listeningForName={listeningForName}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
index dd6c2f5ef0b1..ce12972b5ac0 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
+++ b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
@@ -165,7 +165,7 @@ function WizardInstallShell({
continueDisabledReason={continueDisabledReason}
showSkip={showSkip}
actions={
- <div className="pr-2">
+ <div className="pr-2 min-w-0">
<RealtimeCheckIndicator
teamPropertyToVerify={teamPropertyToVerify}
listeningForName={listeningForName}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx
index f0d0cc2171c9..7b5712d8d858 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx
+++ b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx
@@ -206,7 +206,7 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstal
showSkip={showSkipAtBottom}
actions={
hideInstallationCheck ? undefined : (
- <div className="pr-2">
+ <div className="pr-2 min-w-0">
<RealtimeCheckIndicator
teamPropertyToVerify={teamPropertyToVerify}
listeningForName={listeningForName}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingLiveEvents.tsx b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingLiveEvents.tsx
index 29155e8ea17a..bac8a61dd394 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingLiveEvents.tsx
+++ b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingLiveEvents.tsx
@@ -1,61 +1,48 @@
-import clsx from 'clsx'
import { useValues } from 'kea'
import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo'
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { TZLabel } from 'lib/components/TZLabel'
-import { LemonTable, LemonTableColumns } from 'lib/lemon-ui/LemonTable'
import { liveEventsLogic } from 'scenes/activity/live/liveEventsLogic'
-import type { LiveEvent } from '~/types'
-
-const columns: LemonTableColumns<LiveEvent> = [
- {
- title: 'Event',
- key: 'event',
- className: 'max-w-52',
- render: function Render(_, event: LiveEvent) {
- return (
- <span className="flex items-center gap-x-2">
- <span className="relative flex h-2.5 w-2.5">
- <span
- className={clsx('absolute inline-flex h-full w-full rounded-full bg-success animate-ping')}
- // eslint-disable-next-line react/forbid-dom-props
- style={{ opacity: 0.75 }}
- />
- <span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-success" />
- </span>
- <PropertyKeyInfo value={event.event} type={TaxonomicFilterGroupType.Events} />
- </span>
- )
- },
- },
- {
- title: 'Time',
- key: 'timestamp',
- className: 'max-w-80',
- render: function Render(_, event: LiveEvent) {
- return <TZLabel time={event.timestamp} />
- },
- },
-]
-
+/**
+ * Latest live event, shown beside the install step's verification state.
+ *
+ * The width is fixed and the event name truncates: this chip shares a flex row with the step
+ * title, so a content-sized chip re-wrapped the title between one and two lines every time an
+ * event with a longer name arrived.
+ *
+ * `data-attr` keeps the `table` suffix from the LemonTable this replaced, because data-attr values
+ * are wire strings that dashboards and tests can depend on.
+ */
export function OnboardingLiveEvents(): JSX.Element | null {
const { events } = useValues(liveEventsLogic)
+ const latestEvent = events[0]
- if (events.length === 0) {
+ if (!latestEvent) {
return null
}
return (
- <LemonTable
- columns={columns}
+ <div
+ className="flex items-center gap-2 w-72 max-w-full min-w-0 px-2 py-1 border rounded bg-surface-primary"
data-attr="onboarding-live-events-table"
- rowKey="uuid"
- showHeader={false}
- dataSource={events.slice(0, 1)}
- useURLForSorting={false}
- nouns={['event', 'events']}
- />
+ title={latestEvent.event}
+ >
+ <span className="relative flex h-2.5 w-2.5 shrink-0">
+ <span
+ className="absolute inline-flex h-full w-full rounded-full bg-success animate-ping"
+ // eslint-disable-next-line react/forbid-dom-props
+ style={{ opacity: 0.75 }}
+ />
+ <span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-success" />
+ </span>
+ <PropertyKeyInfo
+ value={latestEvent.event}
+ type={TaxonomicFilterGroupType.Events}
+ className="text-sm min-w-0"
+ />
+ <TZLabel time={latestEvent.timestamp} className="ml-auto shrink-0 text-xs text-muted" />
+ </div>
)
}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/RealtimeCheckIndicator.tsx b/frontend/src/scenes/onboarding/legacy/sdks/RealtimeCheckIndicator.tsx
index ba79200e8959..d092bd856b2d 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/RealtimeCheckIndicator.tsx
+++ b/frontend/src/scenes/onboarding/legacy/sdks/RealtimeCheckIndicator.tsx
@@ -34,12 +34,12 @@ export function RealtimeCheckIndicator({
}, [installationComplete])
return (
- <div className="flex items-center gap-3">
+ <div className="flex items-center gap-3 min-w-0">
{installationComplete ? (
- <div className="flex flex-row gap-2">
- <div className="flex items-center gap-2 px-2 py-1 font-medium">
+ <div className="flex flex-row items-center gap-2 min-w-0">
+ <div className="flex items-center gap-2 px-2 py-1 font-medium shrink-0">
<IconCheck className="text-success" />
- <span className="text-success text-sm">Installation complete</span>
+ <span className="text-success text-sm whitespace-nowrap">Installation complete</span>
</div>
<OnboardingLiveEvents />
</div>
diff --git a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx b/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx
index 92c04a3a5558..296cfb27e7f0 100644
--- a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx
+++ b/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx
@@ -221,7 +221,7 @@ export function SelfDrivingOnboardingFlow(): JSX.Element {
/>
))}
</div>
- <div className="shrink-0 flex justify-end">
+ <div className="min-w-0 flex justify-end">
{/* On the install step, live verification: flips when the team's first event
lands, whichever install path produced it. Past the install step, the run
keeps a quiet presence up here; on the install step itself the tracker