From 13cec0146d98d21720b6a4877eaf95559975076f Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Sun, 4 Oct 2026 00:42:43 +0800 Subject: [PATCH] fix(webui): enlarge preview controls on touch devices --- docs/webui.md | 5 +++++ webui/src/components/ImageLightbox.tsx | 2 +- webui/src/components/PreviewPane.tsx | 10 +++++----- webui/src/globals.css | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/webui.md b/docs/webui.md index 392538836..65718519c 100644 --- a/docs/webui.md +++ b/docs/webui.md @@ -198,6 +198,11 @@ magnified area; normal fitting resumes when you return to the default zoom. Non-touch desktop and native-host layout remain unchanged. +On touch devices, preview tab controls and +the full-screen image viewer's close button use larger touch areas without +enlarging the icons. Preview tabs remain horizontally scrollable when space is +limited. + Open the context indicator beside the composer model badge to see how much of the model's context window is in use. The **Recent rounds** chart shows input tokens for each logical model round, including tool-call rounds. Hover or focus diff --git a/webui/src/components/ImageLightbox.tsx b/webui/src/components/ImageLightbox.tsx index 7e497501a..c6078ff94 100644 --- a/webui/src/components/ImageLightbox.tsx +++ b/webui/src/components/ImageLightbox.tsx @@ -142,7 +142,7 @@ export function ImageLightbox({ -
+
+ className={cn(SIDEBAR_SELECTION_ITEM_CLASS, "group flex min-h-8 max-w-56 shrink-0 items-center rounded-compact", selected ? "text-foreground" : "text-muted-foreground hover:bg-muted/50 hover:text-foreground")}>
; diff --git a/webui/src/globals.css b/webui/src/globals.css index d3055cd89..5d689dc43 100644 --- a/webui/src/globals.css +++ b/webui/src/globals.css @@ -878,6 +878,10 @@ min-width: 2.75rem; min-height: 2.75rem; } + + .touch-target.preview-tab-close { + opacity: 1; + } } /* On phones, actions follow the message instead of taking a separate gutter. */