From 0080a1a941f83814f6c67143f59267dd4c56523b Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 9 Aug 2026 09:34:59 +0000 Subject: [PATCH] fix(desktop): centre the brand and project tiles on the collapsed icon rail --- packages/desktop/src/components/ui/app-shell.tsx | 9 +++++++-- .../desktop/src/renderer/routes/project-switcher.tsx | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/desktop/src/components/ui/app-shell.tsx b/packages/desktop/src/components/ui/app-shell.tsx index f994dcb..af3d965 100644 --- a/packages/desktop/src/components/ui/app-shell.tsx +++ b/packages/desktop/src/components/ui/app-shell.tsx @@ -373,12 +373,17 @@ function AccountMenu({ account, renderLink }: { account: AppAccount; renderLink? function Brand({ brand, renderLink }: { brand: AppShellBrand; renderLink?: AppLinkRenderer }) { const content = ( <> + {/* Collapsed, the button keeps its 8px padding but the tile is the full + 32px rail width, so it hangs off to the right; pulling it back by the + padding puts it on the same centre line as the nav icons. */} {brand.logo && ( -
+
{brand.logo}
)} -
+ {/* Collapsed to the icon rail there is only room for the logo tile; leaving + the text in the flex row pushes the tile off the rail's centre line. */} +
{brand.name} diff --git a/packages/desktop/src/renderer/routes/project-switcher.tsx b/packages/desktop/src/renderer/routes/project-switcher.tsx index 4b371eb..80070b9 100644 --- a/packages/desktop/src/renderer/routes/project-switcher.tsx +++ b/packages/desktop/src/renderer/routes/project-switcher.tsx @@ -37,16 +37,20 @@ export function ProjectSwitcher({ projects, current, onSelect, onManage }: Proje /> } > -
+ {/* Pulled back by the button's collapsed padding so the tile lands on the + same centre line as the nav icons below it. */} +
-
+ {/* Collapsed, only the tile fits: keeping the label and chevron in the + flex row would shove the icon off the rail's centre line. */} +
Project {current ?? 'None yet'}
- + Switch project