From 8a30ce003d89dede63faeca768832ed52ef6efb3 Mon Sep 17 00:00:00 2001 From: Matthew Valancy Date: Tue, 16 Jun 2026 16:54:29 -0700 Subject: [PATCH] feat(mobile): consolidate phone chrome + clean phone/tablet/desktop split MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standardize the phone↔desktop boundary on `md` (it was split between lg for the sidebar/hamburger and md for the view strip — the cause of leftover top chrome). Phones ( --- packages/web/src/components/Layout.tsx | 55 ++++++++----------- .../web/src/components/MobileBottomNav.tsx | 22 +++++++- packages/web/src/components/ViewManager.tsx | 8 +-- packages/web/src/pages/Workspace.tsx | 18 +++--- 4 files changed, 55 insertions(+), 48 deletions(-) diff --git a/packages/web/src/components/Layout.tsx b/packages/web/src/components/Layout.tsx index 2a580574..4990e570 100644 --- a/packages/web/src/components/Layout.tsx +++ b/packages/web/src/components/Layout.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Link, useLocation } from 'react-router-dom'; -import { Brain, Bot, BarChart3, Settings, Menu, Server, Globe, Shield, Users, Terminal } from 'lucide-react'; +import { Brain, Bot, BarChart3, Settings, Server, Globe, Shield, Users, Terminal } from 'lucide-react'; import { UserSelector } from './UserSelector'; import { GraphSelector } from './GraphSelector'; import { useAuth } from '../contexts/AuthContext'; @@ -48,41 +48,30 @@ export function Layout({ children }: LayoutProps) { {/* Static gradient background - optimized for all browsers */}
- {/* Mobile top bar: hamburger + (on the workspace) the project selector, so the - mobile header is just two rows — project selection here, view bar below. */} -
-
- - {isWorkspaceRoute ? ( + {/* Phone top bar: just the project selector on the workspace (no hamburger — + the bottom nav handles navigation). Other pages use their own header. */} + {isWorkspaceRoute && ( +
+
- ) : ( - - GraphDone - - )} +
-
+ )}
{/* Sidebar */}
{/* Logo */} -
+
GraphDone Logo {!desktopSidebarCollapsed && ( @@ -114,14 +103,14 @@ export function Layout({ children }: LayoutProps) { key={item.name} className={` flex items-center px-3 py-3 rounded-lg transition-colors group cursor-not-allowed opacity-50 relative - ${desktopSidebarCollapsed ? 'lg:justify-center lg:px-2' : ''} + ${desktopSidebarCollapsed ? 'md:justify-center md:px-2' : ''} `} title={desktopSidebarCollapsed ? `${item.name}: ${restrictionMessage}` : `${item.description} (${restrictionMessage})`} > {/* Labels show in the expanded mobile drawer; hidden in the collapsed desktop (zen) rail, which uses hover tooltips. */} -
+
{item.name}
{restrictionMessage} @@ -129,7 +118,7 @@ export function Layout({ children }: LayoutProps) {
{/* Tooltip for collapsed mode */} {desktopSidebarCollapsed && ( -
+
{item.name}
{restrictionMessage}
@@ -144,7 +133,7 @@ export function Layout({ children }: LayoutProps) { to={item.href} className={` flex items-center px-3 py-3 rounded-lg transition-colors group relative - ${desktopSidebarCollapsed ? 'lg:justify-center lg:px-2' : ''} + ${desktopSidebarCollapsed ? 'md:justify-center md:px-2' : ''} ${isActive ? 'bg-green-900/30 text-green-300 border border-green-500/30' : 'text-gray-300 hover:bg-gray-700' @@ -156,7 +145,7 @@ export function Layout({ children }: LayoutProps) { {/* Labels show in the expanded mobile drawer; hidden in the collapsed desktop (zen) rail, which uses hover tooltips. */} -
+
{item.name}
{item.description} @@ -164,7 +153,7 @@ export function Layout({ children }: LayoutProps) {
{/* Tooltip for collapsed mode */} {desktopSidebarCollapsed && ( -
+
{item.name}
{item.description}
@@ -183,7 +172,7 @@ export function Layout({ children }: LayoutProps) { {/* Guest Mode Indicator (mobile drawer + expanded desktop) */} {currentUser?.role === 'GUEST' && ( -
+
@@ -202,7 +191,7 @@ export function Layout({ children }: LayoutProps) {
{/* Status Section - Section 3 */} -
+
{!desktopSidebarCollapsed ? ( <> {/* MCP Health Indicator */} @@ -219,7 +208,7 @@ export function Layout({ children }: LayoutProps) {
{/* Console & Tools Section - Section 4 */} -
+
{!desktopSidebarCollapsed ? ( <> {/* Debug Console Toggle */} @@ -271,7 +260,7 @@ export function Layout({ children }: LayoutProps) {
{/* Footer Info Section */} -
+
{!desktopSidebarCollapsed && ( <> {currentTeam && ( @@ -297,7 +286,7 @@ export function Layout({ children }: LayoutProps) { {/* Overlay for mobile */} {sidebarOpen && (
setSidebarOpen(false)} /> )} diff --git a/packages/web/src/components/MobileBottomNav.tsx b/packages/web/src/components/MobileBottomNav.tsx index c7d03c8d..d9b2646e 100644 --- a/packages/web/src/components/MobileBottomNav.tsx +++ b/packages/web/src/components/MobileBottomNav.tsx @@ -4,7 +4,7 @@ import { useNavigate, useLocation } from 'react-router-dom'; import { CreditCard, Network, MoreHorizontal, LayoutDashboard, Table, Columns, GanttChartSquare, CalendarDays, Activity, Brain, Settings as SettingsIcon, - Shield, Server, Bot, BarChart3, + Shield, Server, Bot, BarChart3, LogOut, UserCircle, } from 'lucide-react'; import { useViewMode, ViewMode } from '../contexts/ViewModeContext'; import { useAuth } from '../contexts/AuthContext'; @@ -16,7 +16,7 @@ import { useAuth } from '../contexts/AuthContext'; */ export function MobileBottomNav() { const { viewMode, setViewMode } = useViewMode(); - const { currentUser } = useAuth(); + const { currentUser, logout } = useAuth(); const navigate = useNavigate(); const location = useLocation(); const [moreOpen, setMoreOpen] = useState(false); @@ -121,6 +121,24 @@ export function MobileBottomNav() { ))}
+ +

Account

+
+
+ +
+
{currentUser?.name || currentUser?.username || 'Account'}
+ {currentUser?.role &&
{currentUser.role}
} +
+
+ +
, document.body diff --git a/packages/web/src/components/ViewManager.tsx b/packages/web/src/components/ViewManager.tsx index b0d6208b..6d6ecc62 100644 --- a/packages/web/src/components/ViewManager.tsx +++ b/packages/web/src/components/ViewManager.tsx @@ -396,9 +396,9 @@ const ViewManager: React.FC = ({ viewMode }) => {
{/* Filter Dropdowns — 2-up grid on phones so all filters fit; inline on desktop */} -
+
{/* Type Filter */} -
+
{/* Priority Filter */} -
+
{/* Contributors Filter */} -
+