Skip to content

The agent that grows with you

fix(desktop): count the right-sidebar toggle in the controller's titlebar slot too

David Metcalfe16a1ad6ef483
diff --git a/apps/desktop/src/app/contrib/controller.tsx b/apps/desktop/src/app/contrib/controller.tsx
index a3be11e558d..88b8ae7513b 100644
--- a/apps/desktop/src/app/contrib/controller.tsx
+++ b/apps/desktop/src/app/contrib/controller.tsx
@@ -776,7 +776,10 @@ export function ContribController() {
className="pointer-events-auto absolute z-10 flex w-max items-center gap-2 [-webkit-app-region:no-drag]"
style={{
right:
- 'max(calc(var(--workspace-right, 0px) + 0.5rem), calc(var(--titlebar-tools-right, 0.75rem) + 4 * var(--titlebar-control-size, 24px) + 0.5rem))'
+ // Five static cluster buttons: four systemTools plus the
+ // always-present right-sidebar toggle (titlebar-controls.tsx).
+ // Keep in sync with wiring.tsx's SYSTEM_TOOL_COUNT.
+ 'max(calc(var(--workspace-right, 0px) + 0.5rem), calc(var(--titlebar-tools-right, 0.75rem) + 5 * var(--titlebar-control-size, 24px) + 0.5rem))'
}}
/>
</div>