From 3fa9f7e21b37f1511b8c306777fc55e0cf213a13 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 7 Sep 2026 16:55:57 -0700 Subject: [PATCH] fix(layout): streamline header layout and sub-tab navigation to eliminate horizontal overflow --- src/app/layout.tsx | 4 +- src/app/page.tsx | 732 +++++++++++++++++++++++++-------------------- 2 files changed, 409 insertions(+), 327 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c177232..0e96304 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -13,8 +13,8 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - - + + {children} diff --git a/src/app/page.tsx b/src/app/page.tsx index d2fad6d..09afee1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -116,6 +116,7 @@ export default function Home() { const [isTerminalLocked, setIsTerminalLocked] = useState(false); const [toasts, setToasts] = useState([]); const [audioEnabled, setAudioEnabled] = useState(true); + const [isMoreMenuOpen, setIsMoreMenuOpen] = useState(false); const [activePatient, setActivePatient] = useState(INITIAL_PATIENTS[0]); const [activeSoapNote, setActiveSoapNote] = useState(INITIAL_SOAP_NOTES[0]); @@ -607,365 +608,446 @@ export default function Home() { }; return ( -
+
{/* Top Hospital Command Header */} -
-
- {/* Hospital Brand & Domain */} -
-
- - +M - -
-
- MEDIUSA CLINIC OS - - CLINICAL v2.5 - -
-
- - https://{activeTenant.domain} +
+ {/* Tier 1: System Command & Tenant Navigation */} +
+
+ {/* Left Cluster: Hospital Brand & Clinic Identity */} +
+
+ + +M + +
+
+ MEDIUSA CLINIC OS + + v2.5 + +
+
+ + https://{activeTenant.domain} +
+ +
+ + {/* Clinic Dropdown Selector */} +
+ + +
- {/* Quick Command Palette Trigger (Cmd+K) */} - - - {/* Audio Toggle Button */} - - - {/* Court & HIPAA Compliance Vault Trigger Button */} - - - {/* Quick Terminal Lockout Button (HIPAA 45 CFR § 164.312(a)(2)(iii)) */} - - - {/* Clinic Dropdown */} -
- - -
- - {/* Staff Role Switcher (RBAC) */} -
- Role: + {/* Center: Command Palette / Search Bar (Responsive) */} +
- -
-
- {/* Portal Switcher Tabs */} -
- + {/* Right Cluster: Quick Tools + Role Switcher + Portal Switcher */} +
+ {/* Search button on small screens where full bar is hidden */} + - + {/* Utility & Security Actions Cluster */} +
+ {/* Audio Toggle */} + - + {/* Court Vault Button */} + - + {/* Terminal Lock Button */} + +
+ + {/* Staff Role Switcher (RBAC) */} +
+ + + +
+ + {/* Portal Mode Switcher */} +
+ + + + + {/* More Views Dropdown */} +
+ + + {isMoreMenuOpen && ( + <> +
setIsMoreMenuOpen(false)} + /> +
+
+ Administrative Views +
+ + +
+ + )} +
+
+
{/* Pre-Launch / Pending BAA Banner */} {portalMode === 'clinic' && activeTenant.baaStatus === 'pending' && ( -
-
- - {activeTenant.name}: - - Scheduling, calendars, and digital intake are active for testing. Ready for doctor BAA sign-off on go-live! - +
+
+
+ + {activeTenant.name}: + + Scheduling, calendars, and digital intake are active for testing. Ready for doctor BAA sign-off on go-live! + +
+
-
)} - {/* Sub-Tabs for Doctor Clinic OS */} + {/* Tier 2: Sub-Tabs for Doctor Clinic OS (Cleanly Grouped, No Horizontal Overflow) */} {portalMode === 'clinic' && ( -
- +
+
+ {/* Grouped Clinical Workspace Navigation */} +
+ {/* Group 1: Clinical Operations */} +
+ - {/* Clinical Charts - Hidden if in Front Desk HIPAA-safe mode */} - {staffRole !== 'front_desk' ? ( - - ) : ( - - HIPAA: Notes Protected - - )} + {staffRole !== 'front_desk' ? ( + + ) : ( + + Notes Locked + + )} - {staffRole !== 'front_desk' && ( - - )} + {staffRole !== 'front_desk' && ( + + )} +
- + {/* Group 2: Practice & Revenue */} +
+ - + - + +
- + {/* Group 3: Patient Retention & Growth */} +
+ - + +
+
+ + {/* Right: Active Clinician Presence Indicator */} +
+ + Active: {activeProvider.name} +
+
)}