fix(web): pin chat input and make session list scrollable independently

Constrain the main layout to viewport height (h-dvh) and override
SidebarProvider's min-h-svh so the height chain propagates correctly.
Change main-container overflow from auto to hidden so the outer
container never scrolls. Use absolute-positioning pattern for
session sidebar ScrollArea (matching chat messages pattern) to
ensure sessions scroll independently while the chat input stays fixed.
This commit is contained in:
Acbox
2026-03-29 01:04:17 +08:00
parent c5f1477539
commit f09ab119a4
3 changed files with 32 additions and 27 deletions
@@ -1,6 +1,6 @@
<template>
<SidebarInset class="flex flex-col overflow-hidden">
<section class="flex-1 overflow-y-auto">
<section class="flex-1 min-h-0 overflow-hidden">
<router-view v-slot="{ Component }">
<KeepAlive>
<component :is="Component" />
+2 -1
View File
@@ -1,6 +1,7 @@
<template>
<section class="flex">
<section class="flex h-dvh overflow-hidden">
<sidebar-provider
class="min-h-0 h-full"
:default-open="sidebarDefaultOpen"
>
<section class="relative">
@@ -100,8 +100,10 @@
</DropdownMenu>
</div>
<ScrollArea class="flex-1">
<div class="flex flex-col gap-1 px-1.5 overflow-hidden">
<div class="flex-1 relative min-h-0">
<div class="absolute inset-0">
<ScrollArea class="h-full">
<div class="flex flex-col gap-1 px-1.5">
<SessionItem
v-for="session in filteredSessions"
:key="session.id"
@@ -129,6 +131,8 @@
</div>
</ScrollArea>
</div>
</div>
</div>
</template>
<script setup lang="ts">