: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(desktop): keep sidebar overlay below nav rail (#88093)
Peter Kirkhamb5efb42a704d
diff --git a/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsxindex ca70aba6443a..896d0c0b357d 100644--- a/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx@@ -90,6 +90,12 @@ import { useCurrentChannelStore } from "@posthog/ui/features/canvas/stores/curreimport { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";import { NavRail } from "./NavRail";+it("stays above floating sidebar layers", () => {+ render(<NavRail />);++ expect(screen.getByTestId("nav-rail")).toHaveClass("z-[60]");+});+/*** Seed where each destination was, as the ACTIVE TAB remembers it. Rail memory* lives on the tab rather than the window, so a pick in one tab can neverdiff --git a/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx b/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsxindex 92b8495af6e0..6895aaaff2e7 100644--- a/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx@@ -233,7 +233,8 @@ export function NavRail() {// state, so isolated providers never share it.<TooltipProvider delay={400}><div- className="flex h-full shrink-0 flex-col items-center gap-1.5 bg-chrome py-2"+ data-testid="nav-rail"+ className="relative z-[60] flex h-full shrink-0 flex-col items-center gap-1.5 bg-chrome py-2"style={{ width: NAV_RAIL_WIDTH }}>{destinations.map((destination) => {diff --git a/products/desktop/packages/ui/src/router/routes/__root.tsx b/products/desktop/packages/ui/src/router/routes/__root.tsxindex 30badd2a723b..3fce14d6cedb 100644--- a/products/desktop/packages/ui/src/router/routes/__root.tsx+++ b/products/desktop/packages/ui/src/router/routes/__root.tsx@@ -48,6 +48,7 @@ import { useIntegrations } from "@posthog/ui/features/integrations/useIntegratioimport { useLoopDeepLink } from "@posthog/ui/features/loops/hooks/useLoopDeepLink";import { useScoutDeepLink } from "@posthog/ui/features/scouts/hooks/useScoutDeepLink";import { useSetupDiscovery } from "@posthog/ui/features/setup/useSetupDiscovery";+import { NAV_RAIL_WIDTH } from "@posthog/ui/features/sidebar/constants";import {beginSidebarPeek,cancelSidebarPeek,@@ -442,6 +443,7 @@ function RootLayout() {{!sidebarOpen && (<Boxaria-hidden+ style={{ left: channelsLayout ? NAV_RAIL_WIDTH : 0 }}// The radix preset replaces Tailwind's palette, so plain// `bg-black/*` doesn't exist — use the radix black-alpha scale// (--black-a2 = 10%, --black-a5 = 30%).