From 05611cd80eae93b44e2b594a4d7e0fe767321907 Mon Sep 17 00:00:00 2001 From: lorentz Date: Sun, 3 May 2026 16:08:00 -0400 Subject: [PATCH] feat(02-01): create HeaderBar component with brand, Bell placeholder, avatar trigger - Sticky header with bg-background/95 backdrop-blur and border-b - WulfMark + Pulse wordmark linked to /mobile/dashboard - Bell icon placeholder (aria-label=Notifications, empty onClick per SHELL-03) - Avatar circle (h-7 w-7) triggers drawer via onAvatarClick prop - pt-safe applied for notch/dynamic-island clearance (PWA-04) - Implements SHELL-02..04 requirements --- components/mobile/HeaderBar.tsx | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 components/mobile/HeaderBar.tsx diff --git a/components/mobile/HeaderBar.tsx b/components/mobile/HeaderBar.tsx new file mode 100644 index 0000000..903ff66 --- /dev/null +++ b/components/mobile/HeaderBar.tsx @@ -0,0 +1,72 @@ +'use client'; + +/* HeaderBar — phase 02 (SHELL-02..04). + * + * Sticky top bar inside the /mobile shell. Three slots: + * left: WulfMark + "Pulse" wordmark, linked to /mobile/dashboard + * right: Bell icon button (placeholder, aria-label="Notifications") + * right: compact avatar circle — opens the More drawer (parent owns state) + * + * No page title in the header — pages render their own H1. */ + +import Link from 'next/link'; +import { Bell } from 'lucide-react'; +import { WulfMark } from '@/components/branding/wulf-mark'; +import { useSession } from '@/lib/auth-client'; + +interface HeaderBarProps { + onAvatarClick: () => void; +} + +export function HeaderBar({ onAvatarClick }: HeaderBarProps) { + const { data: session } = useSession(); + const user = session?.user as + | { name?: string; email?: string } + | undefined; + + const initials = (user?.name ?? user?.email ?? '?') + .split(/[\s@]/) + .filter(Boolean) + .slice(0, 2) + .map((p) => p[0]?.toUpperCase()) + .join(''); + + return ( +
+
+ {/* Left: brand mark + wordmark, linked to /mobile/dashboard */} + + + Pulse + + + {/* Right: Bell placeholder, then avatar trigger */} +
+ + + +
+
+
+ ); +}