import { NavLink, Outlet, useNavigate } from 'react-router-dom'; import { Database, LogOut, Radar } from 'lucide-react'; import { useZino } from '../api/provider'; import { QUEUES, prettyRole } from '../api/config'; import { NorthlakeLockup } from '../components/NorthlakeLogo'; import { ThemeToggle } from '../components/ThemeToggle'; import { Button } from '../components/core'; /** * The chrome. * * The sidebar IS the pipeline: every entry is the record view filtered on * current_state_name, in the order a case actually moves. A person learns the * process by using the app. Awaiting Review is first because it is the only * queue that needs a human, and the one this console exists to serve. * * Nothing here is role-gated. Hiding a queue protects nothing — the workflow * re-checks RBAC on every submission — and hiding one from the person who needs * it is a worse failure than showing a button that comes back "not permitted". */ export function Shell() { const { user, logout } = useZino(); const navigate = useNavigate(); return (
{/* The only way a case is born. Nobody asks Ava a question; she decides what is worth a person's time. */} {user && (
{user.name || user.email}
{(user.roles ?? []).map(prettyRole).join(' · ') || 'No role'}
)}
); }