fix(desktop): count the right-sidebar toggle in the titlebar tools width

This commit is contained in:
David Metcalfe
2026-08-04 23:02:56 -07:00
committed by Teknium
parent 4e8e991d61
commit a1b24c52f7
+6 -1
View File
@@ -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)