This repository has no description

fix(routing): make /dashboard a layout route so its chrome mounts with its children master

useDashboardStore throws when called outside <DashboardChrome>. The previous architecture had the root layout conditionally rendering DashboardChrome based on the current pathname, which raced with the Outlet: the new route's component was mounted under the wrong chrome during transitions, so the throw fired. Specifically: navigating from /dashboard/stream to /$user (via the 'back to streamplace' link) reproduced it reliably. resolvedLocation and the Outlet were in sync for that direction, but state.location (switching earlier) introduced a different race going the other way. Path-string chrome decisions at the root are racy no matter which router state you read. Move the dashboard chrome into a real TanStack layout route at routes/dashboard/route.tsx. The router plugin now wires all 8 dashboard children (/, /upload, /videos, /keys, /multistream, /recommendations, /stream, /webhooks) as children of DashboardRoute during routeTree regeneration. DashboardChrome is always mounted before its child routes, so DashboardStoreContext is always in scope. Drop the isDashboard branch and DASHBOARD_PREFIX constant from __root.tsx. Verified: tsc --noEmit clean, vite build clean, route tree regenerates with the right parent for every dashboard child.


+111 -95
3 changed files