fix(webui): keep prompt rail out of narrow chat columns

This commit is contained in:
chengyongru
2026-07-08 12:16:47 +08:00
committed by Xubin Ren
parent 65d32ffd6c
commit 4333d6f103
3 changed files with 148 additions and 6 deletions
@@ -122,6 +122,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
const { t } = useTranslation();
const scrollRef = useRef<HTMLDivElement>(null);
const contentRef = useRef<HTMLDivElement>(null);
const messageColumnRef = useRef<HTMLDivElement>(null);
const composerDockRef = useRef<HTMLDivElement>(null);
const bottomRef = useRef<HTMLDivElement>(null);
const lastConversationKeyRef = useRef<string | null>(conversationKey);
@@ -519,7 +520,11 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
data-testid="thread-message-region"
className="flex min-h-0 flex-1 flex-col justify-start px-3 pb-4 pt-4 sm:px-4"
>
<div className="mx-auto w-full max-w-[49.5rem]">
<div
ref={messageColumnRef}
data-testid="thread-message-column"
className="mx-auto w-full max-w-[49.5rem]"
>
<ThreadMessages
messages={visibleMessages}
isStreaming={isStreaming}
@@ -567,6 +572,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
<PromptRail
messages={visibleMessages}
scrollRef={scrollRef}
contentRef={messageColumnRef}
bottomOffset={scrollButtonBottom}
/>
) : null}