From 834da8c954401e727689efda6ec129f94607543b Mon Sep 17 00:00:00 2001
From: neon <18559658+neonsolstice@users.noreply.github.com>
Date: Sun, 25 Oct 2026 21:24:18 +0000
Subject: [PATCH] fix(client): keep the sidebar dock inside a narrow sidebar
The dock's six 32px controls need 13.25rem, but the sidebar can be dragged
down to 224px, so the language and settings buttons spilled past its edge.
Below that width the buttons now shrink to 28px with a 2px gap. The spacer
that added a stray gap is replaced by a right-aligned group; the rail and
phone sheet are unchanged.
Closes #1873
---
client/src/components/sidebar/SidebarDock.vue | 173 +++++++++---------
.../components/NotificationSheet.vue | 2 +-
2 files changed, 91 insertions(+), 84 deletions(-)
diff --git a/client/src/components/sidebar/SidebarDock.vue b/client/src/components/sidebar/SidebarDock.vue
index f328c0cdb..531df76c0 100644
--- a/client/src/components/sidebar/SidebarDock.vue
+++ b/client/src/components/sidebar/SidebarDock.vue
@@ -42,11 +42,16 @@ const themeStore = useThemeStore()
const iconRadiusClass = computed(() => (themeStore.radius === 'sharp' ? 'rounded-none' : 'rounded-full'))
const controlClass = computed(() => [
- 'h-8 w-8 border border-(--shell-accent-line) text-foreground transition-colors duration-150 hover:bg-(--shell-accent-wash)',
+ 'size-(--dock-control) border border-(--shell-accent-line) text-foreground transition-colors duration-150 hover:bg-(--shell-accent-wash)',
iconRadiusClass.value,
])
+/** The full set of controls needs 13.25rem, and the sidebar can be dragged narrower than that, so the dock tightens its buttons instead of spilling out. */
+const rowClass = computed(() => [
+ 'flex items-center gap-(--dock-gap) [--dock-control:2rem] [--dock-gap:0.25rem] group-data-[collapsible=icon]:flex-col group-data-[collapsible=icon]:gap-1.5',
+ !props.isRail && '@max-[13.25rem]:[--dock-control:1.75rem] @max-[13.25rem]:[--dock-gap:0.125rem]',
+])
const avatarClass = computed(() => [
- 'flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden border border-(--shell-accent-line) bg-(--shell-accent-tint) transition-colors duration-150 hover:bg-(--shell-accent-wash) focus:outline-none focus-visible:ring-2 focus-visible:ring-ring',
+ 'flex size-(--dock-control) shrink-0 items-center justify-center overflow-hidden border border-(--shell-accent-line) bg-(--shell-accent-tint) transition-colors duration-150 hover:bg-(--shell-accent-wash) focus:outline-none focus-visible:ring-2 focus-visible:ring-ring',
iconRadiusClass.value,
])
@@ -94,96 +99,98 @@ function handleLogout() {