refactor: fix scroll to last user query ux

- Updated DashboardClientLayout to improve child component overflow handling.
- Refactored NewChatPage to streamline the layout and integrate ChatHeader directly within the Thread component.
- Added optional header prop to Thread component for better customization.
- Cleaned up ChatHeader by removing unnecessary wrapper for improved design.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-23 18:49:37 -08:00
parent 0a458dde2f
commit 40e982d541
4 changed files with 18 additions and 119 deletions

View file

@ -265,7 +265,7 @@ export function DashboardClientLayout({
</div>
</div>
</header>
<div className="grow flex-1 overflow-auto min-h-[calc(100vh-64px)]">{children}</div>
<div className="flex-1 overflow-hidden">{children}</div>
</main>
</SidebarInset>
</SidebarProvider>

View file

@ -626,11 +626,11 @@ export default function NewChatPage() {
<LinkPreviewToolUI />
<DisplayImageToolUI />
<ScrapeWebpageToolUI />
<div className="flex flex-col h-[calc(100vh-64px)] max-h-[calc(100vh-64px)] overflow-hidden">
<ChatHeader searchSpaceId={searchSpaceId} />
<div className="flex-1 min-h-0 overflow-hidden">
<Thread messageThinkingSteps={messageThinkingSteps} />
</div>
<div className="flex flex-col h-[calc(100vh-64px)] overflow-hidden">
<Thread
messageThinkingSteps={messageThinkingSteps}
header={<ChatHeader searchSpaceId={searchSpaceId} />}
/>
</div>
</AssistantRuntimeProvider>
);