+ )}
+ >
+ );
+}
diff --git a/apps/console/src/context/NavigationContext.tsx b/apps/console/src/context/NavigationContext.tsx
new file mode 100644
index 000000000..c0f3c82a1
--- /dev/null
+++ b/apps/console/src/context/NavigationContext.tsx
@@ -0,0 +1,62 @@
+/**
+ * NavigationContext
+ *
+ * Provides global navigation state for the unified sidebar.
+ * Tracks whether the user is in "Home" context (workspace view) or "App" context (specific app).
+ * Used to determine which navigation menu to display in the UnifiedSidebar.
+ *
+ * @module
+ */
+
+import { createContext, useContext, useState, useMemo, type ReactNode } from 'react';
+
+export type NavigationContextType = 'home' | 'app';
+
+interface NavigationContextValue {
+ /** Current navigation context (home or app) */
+ context: NavigationContextType;
+ /** Set the navigation context */
+ setContext: (context: NavigationContextType) => void;
+ /** Current app name when in app context */
+ currentAppName?: string;
+ /** Set the current app name */
+ setCurrentAppName: (appName?: string) => void;
+}
+
+const NavigationContext = createContext(undefined);
+
+interface NavigationProviderProps {
+ children: ReactNode;
+}
+
+export function NavigationProvider({ children }: NavigationProviderProps) {
+ const [context, setContext] = useState('home');
+ const [currentAppName, setCurrentAppName] = useState();
+
+ const value = useMemo(
+ () => ({
+ context,
+ setContext,
+ currentAppName,
+ setCurrentAppName,
+ }),
+ [context, currentAppName]
+ );
+
+ return (
+
+ {children}
+
+ );
+}
+
+/**
+ * Hook to access navigation context
+ */
+export function useNavigationContext(): NavigationContextValue {
+ const context = useContext(NavigationContext);
+ if (!context) {
+ throw new Error('useNavigationContext must be used within a NavigationProvider');
+ }
+ return context;
+}
diff --git a/apps/console/src/pages/home/HomeLayout.tsx b/apps/console/src/pages/home/HomeLayout.tsx
index 77770ac32..4eceeed0a 100644
--- a/apps/console/src/pages/home/HomeLayout.tsx
+++ b/apps/console/src/pages/home/HomeLayout.tsx
@@ -1,117 +1,53 @@
/**
* HomeLayout
*
- * Lightweight layout shell for the Home Dashboard (`/home`).
- * Provides a consistent navigation frame (header bar with Home branding
- * and user menu) so the page is not rendered "bare" and can be extended
- * in the future with notifications, global guide, or unified theming.
+ * Unified Home Dashboard layout with persistent sidebar.
+ * Uses AppShell + UnifiedSidebar for Airtable-style contextual navigation.
+ * The sidebar displays Home-context navigation (workspace-level items).
*
* @module
*/
-import React from 'react';
-import { useNavigate } from 'react-router-dom';
-import { useObjectTranslation } from '@object-ui/i18n';
-import { useAuth, getUserInitials } from '@object-ui/auth';
-import {
- Button,
- DropdownMenu,
- DropdownMenuTrigger,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuGroup,
- Avatar,
- AvatarImage,
- AvatarFallback,
-} from '@object-ui/components';
-import { Settings, LogOut, User, Home } from 'lucide-react';
+import React, { useEffect } from 'react';
+import { AppShell } from '@object-ui/layout';
+import { UnifiedSidebar } from '../../components/UnifiedSidebar';
+import { AppHeader } from '../../components/AppHeader';
+import { useNavigationContext } from '../../context/NavigationContext';
+import { useResponsiveSidebar } from '../../hooks/useResponsiveSidebar';
interface HomeLayoutProps {
children: React.ReactNode;
}
-export function HomeLayout({ children }: HomeLayoutProps) {
- const navigate = useNavigate();
- const { t } = useObjectTranslation();
- const { user, signOut } = useAuth();
-
- return (
-
- {/* Top Navigation Bar */}
-
-
- {/* Left — Branding / Home link */}
-
+/** Inner component that can access SidebarProvider context */
+function HomeLayoutInner({ children }: { children: React.ReactNode }) {
+ useResponsiveSidebar();
+ return <>{children}>;
+}
- {/* Right — Settings + User Menu */}
-
-
+export function HomeLayout({ children }: HomeLayoutProps) {
+ const { setContext } = useNavigationContext();
- {/* User Menu Dropdown */}
-
-
-
-
-
-
-