: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(error-tracking): wrap source maps banner buttons in narrow scenes (#107898)
posthog[bot]d13a0f4409d3
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 359b479666a1..00b3dbbd50fb 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -10330,6 +10330,10 @@ snapshots:hash: v1.k794b7964.ccc05c5077ab603e03162368e1ea86bfb2d435fcc4a595964a14d4885d43977b.0a5IoAWliacEzLoFqQnd4dHkiempLwJ-8EUwsvHJYNwscenes-app-errortracking--list-page-with-source-maps-banner--light:hash: v1.k794b7964.aa9baa124bfa1588fd2314af7e14fe508415cb41c3f33b0ac37fb7fba69679af.g0rhpUievSc6awbRpxB38Mr2yEvlLwNaeXe_zHlm3jM+ scenes-app-errortracking--list-page-with-source-maps-banner-narrow--dark:+ hash: v1.k794b7964.996bb2e1fe84e212085369239bda51926db8afa9c82a9970785a524a422f61ec.sx19coyKsxgrjq7Qq6cIW052JhDkEdVS8fWSmaCyOEU+ scenes-app-errortracking--list-page-with-source-maps-banner-narrow--light:+ hash: v1.k794b7964.0d639b3d461515345aa1ba3249353326dd0becf88f2994cb9c1044d6071c040f.QkMsikIvv8a3_9azW-uqFPxjsHJe8ze4VGD6Qfrky0Uscenes-app-errortracking-linkedreports--fix-proposed--dark:hash: v1.k794b7964.1b50022f8fafb4684dacd255b966bd2969f79e84d5c7c7daeb68291772a1e36d.9uyjrwufsjMCFx9c7cjsoIyabB3A4ZBnPSVUouM0RZEscenes-app-errortracking-linkedreports--fix-proposed--light:diff --git a/products/error_tracking/frontend/ErrorTracking.stories.tsx b/products/error_tracking/frontend/ErrorTracking.stories.tsxindex 5e52a087917c..8c51f8253818 100644--- a/products/error_tracking/frontend/ErrorTracking.stories.tsx+++ b/products/error_tracking/frontend/ErrorTracking.stories.tsx@@ -691,6 +691,13 @@ export const ListPageWithSourceMapsBanner: Story = {}),],}++// A narrow window wraps the banner buttons below the text instead of squeezing the text+export const ListPageWithSourceMapsBannerNarrow: Story = {+ ...ListPageWithSourceMapsBanner,+ parameters: { testOptions: { viewport: { width: 760, height: 1000 } } },+}+// Autocapture must be on for the issue list to render instead of the full setup prompt,// and it comes from the bootstrap app context, so an msw override isn't enoughfunction IssueScenePreviewStory({diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/issues/SourceMapsBanner.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/issues/SourceMapsBanner.tsxindex c4ef1e5b8dcf..92dfa51cf82b 100644--- a/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/issues/SourceMapsBanner.tsx+++ b/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/issues/SourceMapsBanner.tsx@@ -49,31 +49,37 @@ function SourceMapsBannerContent({ percent, lookbackHours }: { percent: number;return (<><div className="mb-2">- <div className="rounded-lg border border-border bg-bg-light pl-3 pr-4 py-3 mt-2">- <div className="flex items-center gap-4">+ <div className="@container rounded-lg border border-border bg-bg-light pl-3 pr-4 py-3 mt-2">+ <div className="flex flex-wrap items-center gap-x-4 gap-y-2">{/* The hog is absolutely positioned so it doesn't drive the card height —it overflows the card edges slightly by design. */}- <div className="relative hidden sm:block shrink-0 self-stretch w-20">+ <div className="relative hidden @2xl:block shrink-0 self-stretch w-20"><div className="absolute inset-x-0 top-1/2 -translate-y-1/2 pointer-events-none"><div className="absolute -inset-2 bg-[radial-gradient(circle,rgba(43,111,244,0.18),transparent_70%)]" /><WizardHog className="relative w-20 h-20 -rotate-3" /></div></div>- <div className="flex-1 min-w-0">+ <div className="flex-1 basis-80 min-w-0"><div className="font-semibold">{percent}% of your stack traces aren't readable</div><div className="text-sm text-secondary">Let the wizard set up automatic uploads in your project.</div></div>- <LemonButton type="tertiary" size="small" to={SOURCE_MAPS_DOCS_URL} targetBlank>- Read docs- </LemonButton>- <LemonButton type="secondary" icon={<IconMagicWand />} onClick={() => openModal('issues_list')}>- <span className="rainbow-text rainbow-text-animating font-semibold">- Fix with AI wizard- </span>- </LemonButton>- <LemonButton size="xsmall" icon={<IconX />} onClick={dismiss} aria-label="Dismiss banner" />+ <div className="flex min-w-0 max-w-full flex-wrap items-center justify-end gap-4 ml-auto">+ <LemonButton type="tertiary" size="small" to={SOURCE_MAPS_DOCS_URL} targetBlank>+ Read docs+ </LemonButton>+ <LemonButton+ type="secondary"+ icon={<IconMagicWand />}+ onClick={() => openModal('issues_list')}+ >+ <span className="rainbow-text rainbow-text-animating font-semibold">+ Fix with AI wizard+ </span>+ </LemonButton>+ <LemonButton size="xsmall" icon={<IconX />} onClick={dismiss} aria-label="Dismiss banner" />+ </div></div></div></div>diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/SourceMapsRecommendationCard.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/SourceMapsRecommendationCard.tsxindex ad63821f64db..44a9f53c0914 100644--- a/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/SourceMapsRecommendationCard.tsx+++ b/products/error_tracking/frontend/scenes/ErrorTrackingScene/tabs/recommendations/SourceMapsRecommendationCard.tsx@@ -41,7 +41,7 @@ export function SourceMapsRecommendationCard({of frames were unresolved in the last {lookback_hours} hours</div></div>- <div className="flex justify-center gap-2 mt-2">+ <div className="flex flex-wrap justify-center gap-2 mt-2"><LemonButtontype="tertiary"to={SOURCE_MAPS_DOCS_URL}