From 6fcb6df2955502ebd23010350262638d586c399a Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Wed, 18 Mar 2026 16:51:01 +0100 Subject: [PATCH] fix: widen collapsed sidebar to 64px, prevent header flash on refresh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collapsed width 56px→64px to stop clipping site picker badge and icons. Return null while auth is loading on site pages to prevent brief flash of the public floating header before the sidebar layout renders. --- app/layout-content.tsx | 7 ++++++- components/dashboard/Sidebar.tsx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/layout-content.tsx b/app/layout-content.tsx index b40ab9b..5ac3317 100644 --- a/app/layout-content.tsx +++ b/app/layout-content.tsx @@ -95,7 +95,12 @@ function LayoutInner({ children }: { children: React.ReactNode }) { return } - // Authenticated site pages: full Dokploy-style layout (sidebar + utility bar) + // While auth is loading on a site page, render nothing to prevent flash of public header + if (auth.loading && isSitePage) { + return null + } + + // Authenticated site pages: full sidebar layout // DashboardShell inside children handles everything if (isAuthenticated && isSitePage) { return ( diff --git a/components/dashboard/Sidebar.tsx b/components/dashboard/Sidebar.tsx index 585667f..1ff4ea5 100644 --- a/components/dashboard/Sidebar.tsx +++ b/components/dashboard/Sidebar.tsx @@ -23,7 +23,7 @@ import { const SIDEBAR_KEY = 'pulse_sidebar_collapsed' const EXPANDED = 256 -const COLLAPSED = 56 +const COLLAPSED = 64 type IconWeight = 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone'