// Top bar + sub-bar + router context shared across screens const RouterCtx = React.createContext(null); const useRouter = () => React.useContext(RouterCtx); const TopBar = () => { const { route, go, openPalette, query } = useRouter(); const tabs = [ { id: 'home', label: 'Recent', match: ['home', 'search', 'session'] }, { id: 'projects', label: 'Projects', match: ['projects', 'project'] }, { id: 'stats', label: 'Stats', match: ['stats'] }, { id: 'health', label: 'Health', match: ['health'] }, { id: 'settings', label: 'Settings', match: ['settings'] }, ]; const ownerScope = route.ownerScope; // set by ProjectsScreen / HomeScreen when admin uses ?owner= return (