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(apm): stack the logs and tracing facet rail in a narrow scene (#120750)

Daniel Visca8da20971273f
diff --git a/frontend/src/lib/components/FacetRail/FacetRail.tsx b/frontend/src/lib/components/FacetRail/FacetRail.tsx
index 5df4ce661797..587d1f249790 100644
--- a/frontend/src/lib/components/FacetRail/FacetRail.tsx
+++ b/frontend/src/lib/components/FacetRail/FacetRail.tsx
@@ -77,7 +77,8 @@ export function FacetRail<T extends FacetGroupItem>({
return (
<div
ref={railRef}
- className="relative flex flex-col shrink-0 border rounded bg-surface-primary overflow-hidden"
+ // In a narrow host the rail stacks above the results, so the full width replaces the dragged width.
+ className="relative flex flex-col shrink-0 border rounded bg-surface-primary overflow-hidden @max-[48rem]/facet-rail-host:!w-full @max-[48rem]/facet-rail-host:!max-w-full @max-[48rem]/facet-rail-host:max-h-48"
// The width is the user's alone: a fixed min (not min-content) so a long facet value
// can never force the rail wider — values truncate to fit instead.
// eslint-disable-next-line react/forbid-dom-props
@@ -120,7 +121,13 @@ export function FacetRail<T extends FacetGroupItem>({
</div>
))}
</div>
- <Resizer {...resizerLogicProps} visible={false} offset="0.25rem" handleClassName="rounded my-1" />
+ <Resizer
+ {...resizerLogicProps}
+ visible={false}
+ offset="0.25rem"
+ className="@max-[48rem]/facet-rail-host:hidden"
+ handleClassName="rounded my-1"
+ />
</div>
)
}
diff --git a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
index 623f73b175a9..718c51518f56 100644
--- a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
+++ b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
@@ -419,7 +419,7 @@ function LogsViewerContent({
// Three-tier layout: query bar (ask a question) above the sparkline, the sparkline, then a
// row of [facet rail | display bar (operate on the data) + the log lists].
return (
- <div className="flex flex-col gap-2 h-full" data-attr="logs-viewer">
+ <div className="@container/facet-rail-host flex flex-col gap-2 h-full" data-attr="logs-viewer">
<LogsQueryBar
showSavedViewsButton={showSavedViewsButton}
showFullScreenButton={showFullScreenButton}
@@ -427,9 +427,9 @@ function LogsViewerContent({
scope={scope}
/>
{sparklineSection}
- <div className="flex flex-row gap-2 flex-1 min-h-0">
+ <div className="flex flex-row gap-2 flex-1 min-h-0 @max-[48rem]/facet-rail-host:flex-col">
{!facetRailCollapsed && <LogsFacetRail id={id} />}
- <div className="flex flex-col gap-2 flex-1 min-w-0">
+ <div className="flex flex-col gap-2 flex-1 min-w-0 min-h-0">
{resultsColumn(<LogsDisplayBar {...displayBarProps} showFacetRailToggle />)}
</div>
</div>
diff --git a/products/tracing/frontend/TracingScene.tsx b/products/tracing/frontend/TracingScene.tsx
index 624c4041eeb6..603c0ea4fc4f 100644
--- a/products/tracing/frontend/TracingScene.tsx
+++ b/products/tracing/frontend/TracingScene.tsx
@@ -226,7 +226,7 @@ function TracingSceneContents(): JSX.Element {
: undefined
return (
- <SceneContent className="h-[calc(var(--scene-layout-rect-height,_100vh)_-_1rem)]">
+ <SceneContent className="@container/facet-rail-host h-[calc(var(--scene-layout-rect-height,_100vh)_-_1rem)]">
<SceneTitleSection
name="Tracing"
description="Monitor and analyze distributed traces to understand service performance and debug issues."
@@ -308,7 +308,7 @@ function TracingSceneContents(): JSX.Element {
compareActive ? 'The heatmap is unavailable while comparing time windows' : null
}
/>
- <div className="flex flex-row gap-2 flex-1 min-h-0">
+ <div className="flex flex-row gap-2 flex-1 min-h-0 @max-[48rem]/facet-rail-host:flex-col">
{facetRailEnabled && !facetRailCollapsed && <TracingFacetRail />}
<div className="flex flex-col gap-2 flex-1 min-w-0 min-h-0">
<TracingDisplayBar />