From a8f27c427021907c9e5009568b3e6f84fac24734 Mon Sep 17 00:00:00 2001 From: North Wang Date: Mon, 24 Aug 2026 12:22:05 +0800 Subject: [PATCH] fix(client): align collapsed toggle cluster with the DSH session header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Open state keeps riding the panel's 34px tab strip (top: 3), unchanged. - Collapsed, the cluster floats over DSH's session header, whose controls (title, "Session log" capsule) are vertically centered at 28px on both desktop and narrow viewports; top: 3 left the 28px buttons ~11px too high — re-center them at 14px. - body[data-dsh-sidebar-collapsed] only exists while the right panel is closed, so the tab-strip alignment is untouched; with position compatibility active, compose the caption strip (strip + 14). --- src/client/sidebar.module.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/client/sidebar.module.css b/src/client/sidebar.module.css index 9d06be8..beda759 100644 --- a/src/client/sidebar.module.css +++ b/src/client/sidebar.module.css @@ -489,6 +489,25 @@ body[data-dsh-sidebar-dragging] .bottomPanel { padding-top: var(--dsh-title-bar-strip, 40px); } +/* ── Collapsed cluster alignment with the DSH web session header ───────── */ + +/* While the right panel is open, the cluster rides the panel's 34px tab + strip (28px buttons at top: 3). Collapsed, it floats over DSH's own + session header instead — whose controls (title, "Session log" capsule) + are vertically centered at 28px on both desktop and narrow viewports. + top: 3 then strands the cluster ~11px above that row; re-center the + 28px buttons at 14px. The attribute disappears while the panel is open, + so the tab-strip alignment above is untouched. With position + compatibility active the DSH header sits below the caption strip, hence + strip + 14. */ +:global(body[data-dsh-sidebar-collapsed]) .toggleCluster { + top: calc(14px + env(safe-area-inset-top)); +} + +:global(body[data-dsh-sidebar-collapsed][data-dsh-title-bar-compat]) .toggleCluster { + top: calc(var(--dsh-title-bar-strip, 40px) + 14px); +} + /* The shared corner (both panels open): the intersection of the right panel's left edge and the bottom panel's top edge. Horizontal drags resize the width, vertical drags the height — the two panels drag