mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 10:28:47 +02:00
Fix chat scroll: cap the shell at the viewport on /asistente
The shell revamp left SidebarInset unbounded (wrapper is min-h-svh), so Asistente's flex chain resolved to content height — the chat's internal scroller never engaged and long answers hid behind the composer. Asistente now gets h-svh + overflow-hidden on the inset; every other page keeps body scroll. Verified: inset == viewport on /asistente, body scroll intact elsewhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,11 +27,14 @@ export default function Layout() {
|
|||||||
const { privacyMode, togglePrivacy } = usePrivacy();
|
const { privacyMode, togglePrivacy } = usePrivacy();
|
||||||
const { pathname } = useLocation();
|
const { pathname } = useLocation();
|
||||||
const title = titleFor(pathname);
|
const title = titleFor(pathname);
|
||||||
|
// Asistente hosts its own scroll container (the chat), so its route caps
|
||||||
|
// the shell at the viewport; every other page keeps normal body scroll.
|
||||||
|
const fullHeight = pathname === "/asistente";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SidebarProvider>
|
<SidebarProvider>
|
||||||
<AppSidebar />
|
<AppSidebar />
|
||||||
<SidebarInset>
|
<SidebarInset className={fullHeight ? "h-svh overflow-hidden" : undefined}>
|
||||||
<header className="sticky top-0 z-40 flex h-14 shrink-0 items-center gap-2 border-b border-border bg-background/90 px-4 backdrop-blur-sm">
|
<header className="sticky top-0 z-40 flex h-14 shrink-0 items-center gap-2 border-b border-border bg-background/90 px-4 backdrop-blur-sm">
|
||||||
<SidebarTrigger className="-ml-1" />
|
<SidebarTrigger className="-ml-1" />
|
||||||
<Separator
|
<Separator
|
||||||
|
|||||||
Reference in New Issue
Block a user