Skip to content

Commit 2d503df

Browse files
mvalancyclaude
andauthored
Mobile: condense the workspace header to 2 rows (project selector + view bar) (#79)
The phone header was three bands (hamburger/logo, title+selector, view tabs). Collapse to two: the global mobile top bar now carries the project selector on the workspace route (row 1 = ☰ + selector), and the workspace's own left section (the "Graph Viewer / version / team" + selector block) is desktop-only, leaving just the view bar as row 2. - Layout.tsx: mobile top bar shows the GraphSelector on / and /workspace (hamburger + selector); other routes keep the GraphDone wordmark. - Workspace.tsx: the top-bar left section is `hidden lg:block` (desktop keeps the full three-section bar; the mobile selector lives in the global bar). Mobile spec still green; web typecheck clean. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d37af82 commit 2d503df

2 files changed

Lines changed: 23 additions & 14 deletions

File tree

packages/web/src/components/Layout.tsx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export function Layout({ children }: LayoutProps) {
1919
const [showFloatingConsole, setShowFloatingConsole] = React.useState(false);
2020
const desktopSidebarCollapsed = true; // Zen mode permanently on
2121
const { currentTeam, currentUser } = useAuth();
22+
// On the workspace, the mobile top bar carries the project selector (row 1 of a
23+
// 2-row mobile header: project selection, then the view bar in the page below).
24+
const isWorkspaceRoute = location.pathname === '/' || location.pathname === '/workspace';
2225

2326
const navigation = [
2427
{ name: 'Workspace', href: '/', icon: Globe, description: 'Main work' },
@@ -44,21 +47,26 @@ export function Layout({ children }: LayoutProps) {
4447
{/* Static gradient background - optimized for all browsers */}
4548
<div className="lagoon-caustics"></div>
4649

47-
{/* Mobile menu button */}
50+
{/* Mobile top bar: hamburger + (on the workspace) the project selector, so the
51+
mobile header is just two rows — project selection here, view bar below. */}
4852
<div className="lg:hidden relative z-30 pt-safe">
49-
<div className="flex items-center justify-between bg-gray-800/90 backdrop-blur-sm px-4 py-2 border-b border-gray-700/50">
50-
<div className="flex items-center">
51-
<button
52-
type="button"
53-
className="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-300 hover:bg-gray-700"
54-
onClick={() => setSidebarOpen(!sidebarOpen)}
55-
>
56-
<Menu className="h-6 w-6" aria-hidden="true" />
57-
</button>
58-
<Link to="/" className="ml-3 text-xl font-bold text-green-400 hover:text-green-300 transition-colors">
53+
<div className="flex items-center gap-2 bg-gray-800/90 backdrop-blur-sm px-3 py-2 border-b border-gray-700/50">
54+
<button
55+
type="button"
56+
className="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-300 hover:bg-gray-700 flex-shrink-0"
57+
onClick={() => setSidebarOpen(!sidebarOpen)}
58+
>
59+
<Menu className="h-6 w-6" aria-hidden="true" />
60+
</button>
61+
{isWorkspaceRoute ? (
62+
<div className="flex-1 min-w-0">
63+
<GraphSelector />
64+
</div>
65+
) : (
66+
<Link to="/" className="text-lg font-bold text-green-400 hover:text-green-300 transition-colors">
5967
GraphDone
6068
</Link>
61-
</div>
69+
)}
6270
</div>
6371
</div>
6472

packages/web/src/pages/Workspace.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ export function Workspace() {
9090
{/* Responsive Layout Container */}
9191
<div className="flex flex-col lg:flex-row lg:items-center lg:justify-between gap-2 sm:gap-4">
9292

93-
{/* Left Section: Graph Selector */}
94-
<div className="flex-1 min-w-0 lg:order-1 max-w-lg">
93+
{/* Left Section: Graph Selector — desktop only; on mobile the project
94+
selector lives in the global top bar (Layout) to keep the header to 2 rows. */}
95+
<div className="hidden lg:block flex-1 min-w-0 lg:order-1 max-w-lg">
9596
<div className="flex items-center space-x-4 h-full">
9697
{/* Title & Version - Compact */}
9798
<div className="flex flex-col justify-center">

0 commit comments

Comments
 (0)