fix(webui): avoid mobile welcome composer overlap

This commit is contained in:
chengyongru
2026-07-22 15:55:09 +08:00
committed by chengyongru
parent 80085085d9
commit 4cd6eb6c38
2 changed files with 77 additions and 3 deletions
@@ -532,7 +532,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
ref={scrollRef}
className={cn(
"thread-viewport-scrollbar absolute inset-0 scroll-auto scrollbar-thin",
hasMessages && hasVerticalOverflow ? "overflow-y-auto" : "overflow-hidden",
hasVerticalOverflow ? "overflow-y-auto" : "overflow-hidden",
"[&::-webkit-scrollbar]:w-1.5",
"[&::-webkit-scrollbar-thumb]:rounded-full",
"[&::-webkit-scrollbar-thumb]:bg-muted-foreground/30",
@@ -574,8 +574,11 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
) : (
<div ref={contentRef} className="mx-auto flex min-h-full w-full max-w-[72rem] flex-col px-3 sm:px-4">
<div className="flex w-full flex-1 flex-col items-center pb-[calc(0.75rem+env(safe-area-inset-bottom))] pt-6 sm:justify-center sm:py-12">
<div className="relative flex w-full max-w-[58rem] flex-1 flex-col items-center justify-end gap-5 sm:block sm:flex-none">
<div className="pointer-events-none absolute inset-0 flex items-center justify-center sm:pointer-events-auto sm:static sm:block">
<div
data-testid="thread-welcome-layout"
className="relative grid w-full max-w-[58rem] flex-1 grid-rows-[minmax(min-content,1fr)_auto] gap-8 sm:block sm:flex-none"
>
<div className="flex min-h-0 items-center justify-center sm:absolute sm:inset-x-0 sm:bottom-[calc(100%+2rem)]">
{emptyState}
</div>
<div className="w-full">{composer}</div>