From a1b24c52f7311c822bd19b14930dbc2bcee07b1c Mon Sep 17 00:00:00 2001 From: David Metcalfe <80915+DavidMetcalfe@users.noreply.github.com> Date: Tue, 4 Aug 2026 23:02:56 -0700 Subject: [PATCH] fix(desktop): count the right-sidebar toggle in the titlebar tools width --- apps/desktop/src/app/contrib/wiring.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/app/contrib/wiring.tsx b/apps/desktop/src/app/contrib/wiring.tsx index ab5ecaafa4..d2a6ead87a 100644 --- a/apps/desktop/src/app/contrib/wiring.tsx +++ b/apps/desktop/src/app/contrib/wiring.tsx @@ -999,7 +999,12 @@ export function ContribWiring({ children }: { children: ReactNode }) { // Pane-registered tools (preview's monitor/devtools cluster) anchor flush // against the static system cluster — in the tree layout the titlebar band // sits ABOVE the grid, so AppShell's pane-width anchoring doesn't apply. - const SYSTEM_TOOL_COUNT = 4 + // Count every button the static cluster actually renders: four systemTools + // (layout, haptics, keybinds, settings) PLUS the always-present + // right-sidebar toggle (see titlebar-controls.tsx). A shared width that + // under-counts leaves the find bar, the titlebar header padding, and the + // pane-cluster anchor overlapping the fifth button. + const SYSTEM_TOOL_COUNT = 5 const paneToolCount = rightTitlebarTools.filter(tool => !tool.hidden).length const systemToolsWidth = titlebarToolsWidthCss(SYSTEM_TOOL_COUNT)