import { Outlet } from "react-router-dom"; import { useIsFetching } from "@tanstack/react-query"; import { cn } from "@/lib/utils"; import { Sidebar } from "./Sidebar"; import { SkipLink } from "@/components/ui/skip-link"; import { SearchBar } from "./SearchBar"; /** * App shell. Three columns: * - Sidebar (240px, fixed) * - Top bar (sticky, lightweight utility row) * - Outlet (page content, max-w-[1400px] centered) * * The hairline scan element at the very top of the viewport is a 1px * line that slides an accent bar across the entire width whenever * the React Query layer has an in-flight request. The intent is to * surface "we're doing something" without a spinner — a moving line * reads as a sensor sweep, not a loading state. */ export function Layout() { const isFetching = useIsFetching(); const showScan = isFetching > 0; return (
{/* Ambient page halo — a soft, fixed radial that creates a subtle lighter zone behind the page content (centered just below the top bar). Pure decoration; pointer-events disabled so it never intercepts clicks. Two layered radials: a neutral softbox centered above the page header, and a cool accent in the upper-right that mirrors the body::before composition. The halo sits behind everything else (z-0 inside the z-10 root). */}
{/* Tailing pill on the left edge of the top bar — a tiny global "system is alive" indicator. It lights up whenever any query is in flight, complementing the hairline scan. */}
{showScan ? "Working" : "Idle"}
); }