From f611c880f9910e48c3b20f8f1333257d02cc4c87 Mon Sep 17 00:00:00 2001 From: chengyongru <61816729+chengyongru@users.noreply.github.com> Date: Mon, 14 Sep 2026 15:25:13 +0800 Subject: [PATCH] fix(webui): adapt chat toolbar to available width (#5760) * fix(webui): float chat controls above the transcript * fix(webui): keep floating controls compact and flat * fix(webui): adapt toolbar placement to conversation width * refactor(webui): simplify responsive toolbar styles --- webui/src/components/thread/ThreadHeader.tsx | 23 +++++++++++----- webui/src/components/thread/ThreadShell.tsx | 6 ++++- .../src/components/thread/ThreadViewport.tsx | 17 ++++++------ .../components/workbench/PaneWorkbench.tsx | 8 ++++-- webui/src/globals.css | 11 ++++++++ webui/src/tests/thread-viewport.test.tsx | 26 ++++++++++++++----- 6 files changed, 67 insertions(+), 24 deletions(-) diff --git a/webui/src/components/thread/ThreadHeader.tsx b/webui/src/components/thread/ThreadHeader.tsx index ba1cf4dab..18f13f565 100644 --- a/webui/src/components/thread/ThreadHeader.tsx +++ b/webui/src/components/thread/ThreadHeader.tsx @@ -13,6 +13,12 @@ import { import { cn } from "@/lib/utils"; import type { SessionHandle } from "@/lib/types"; +const controlsClassName = cn( + "pointer-events-auto flex items-center gap-0.5 rounded-compact bg-background p-px empty:hidden", + "[&_button]:h-7 [&_button]:w-7 [&_button>svg]:h-3.5 [&_button>svg]:w-3.5", + "forced-colors:bg-[Canvas] forced-colors:outline forced-colors:outline-1 forced-colors:outline-[ButtonText]", +); + interface ThreadHeaderProps { title: string; handle?: SessionHandle | null; @@ -56,11 +62,18 @@ export function ThreadHeader({
-
+
{!hideSidebarToggle ? (