fix: Prevent agents page from scrolling — lock layout to viewport
Body: height 100vh + overflow hidden instead of min-height 100vh, so the browser never shows a scrollbar on html/body. AppLayout: h-screen flex column with shrink-0 header and flex-1 min-h-0 overflow-auto main. Pages like initiatives scroll within main; agents page uses h-full with internal panel scrollers.
This commit is contained in:
@@ -57,7 +57,8 @@
|
||||
@apply bg-background text-foreground;
|
||||
margin: 0;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ const navItems = [
|
||||
|
||||
export function AppLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="min-h-screen bg-background">
|
||||
<div className="flex h-screen flex-col bg-background">
|
||||
{/* Header */}
|
||||
<header className="sticky top-0 z-50 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<header className="shrink-0 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<div className="mx-auto flex h-14 max-w-7xl items-center justify-between px-6">
|
||||
<Link to="/initiatives" className="text-lg font-bold tracking-tight">
|
||||
Codewalk District
|
||||
@@ -35,7 +35,7 @@ export function AppLayout({ children }: { children: React.ReactNode }) {
|
||||
</header>
|
||||
|
||||
{/* Page content */}
|
||||
<main className="mx-auto max-w-7xl px-6 py-6">
|
||||
<main className="mx-auto flex-1 min-h-0 w-full max-w-7xl overflow-auto px-6 py-6">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -89,10 +89,7 @@ function AgentsPage() {
|
||||
// Loading state
|
||||
if (agentsQuery.isLoading) {
|
||||
return (
|
||||
<div
|
||||
style={{ height: "calc(100vh - 7rem)" }}
|
||||
className="flex flex-col gap-4"
|
||||
>
|
||||
<div className="flex h-full flex-col gap-4">
|
||||
<div className="flex items-center justify-between shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<Skeleton className="h-6 w-20" />
|
||||
@@ -179,10 +176,7 @@ function AgentsPage() {
|
||||
];
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{ height: "calc(100vh - 7rem)" }}
|
||||
className="flex flex-col gap-4"
|
||||
>
|
||||
<div className="flex h-full flex-col gap-4">
|
||||
{/* Header + Filters */}
|
||||
<div className="shrink-0 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
|
||||
Reference in New Issue
Block a user