From 282d675a8507a0743dd5f04ff0c2bda09e785579 Mon Sep 17 00:00:00 2001 From: Nelson Pires Date: Thu, 5 Feb 2026 21:10:34 -0300 Subject: [PATCH] feat: improve mobile header layout and tab navigation (#327) Enable horizontal scrolling for main navigation tabs in header Prevent back button from shrinking on mobile by fixing flex behavior Show badges and activity dots on tab buttons --- packages/ui/src/components/layout/Header.tsx | 396 ++++++++++--------- 1 file changed, 200 insertions(+), 196 deletions(-) diff --git a/packages/ui/src/components/layout/Header.tsx b/packages/ui/src/components/layout/Header.tsx index 5564727b..c5bd4b8c 100644 --- a/packages/ui/src/components/layout/Header.tsx +++ b/packages/ui/src/components/layout/Header.tsx @@ -893,7 +893,7 @@ export const Header: React.FC = () => { const renderMobile = () => (
-
+
{/* Show back button when sessions sidebar is open, otherwise show sessions toggle */} {isSessionSwitcherOpen ? ( + + +

{tab.label}

+
+ + ); + })} +
+ + + + { + setIsMobileRateLimitsOpen(open); + if (open && quotaResults.length === 0) { + fetchAllQuotas(); + } + }} + > + + + - - -

{tab.label}

-
-
- ); - })} -
+ + + +

Rate limits

+
+ + +
+
+
+ Rate limits +
+
+ + +
+ + +
+
+
+ Last updated {formatTime(quotaLastUpdated)} +
+
+
+ {!hasRateLimits && ( +
+ No rate limits available. +
+ )} + {rateLimitGroups.map((group) => ( + +
+ + {group.providerName} +
+ {group.entries.map(([label, window]) => { + const displayPercent = quotaDisplayMode === 'remaining' + ? window.remainingPercent + : window.usedPercent; + return ( +
+
+ + {formatWindowLabel(label)} + + + {formatPercent(displayPercent)} + +
+ +
+ {window.resetAfterFormatted ?? window.resetAtFormatted ?? ''} +
+
+ ); + })} +
+ ))} +
+
+
+ - - - { - setIsMobileRateLimitsOpen(open); - if (open && quotaResults.length === 0) { - fetchAllQuotas(); - } - }} - > - - - + -

Rate limits

+

{updateAvailable ? 'Settings (Update available)' : 'Settings'}

- -
-
-
- Rate limits -
-
- - -
- - -
-
-
- Last updated {formatTime(quotaLastUpdated)} -
-
-
- {!hasRateLimits && ( -
- No rate limits available. -
- )} - {rateLimitGroups.map((group) => ( - -
- - {group.providerName} -
- {group.entries.map(([label, window]) => { - const displayPercent = quotaDisplayMode === 'remaining' - ? window.remainingPercent - : window.usedPercent; - return ( -
-
- - {formatWindowLabel(label)} - - - {formatPercent(displayPercent)} - -
- -
- {window.resetAfterFormatted ?? window.resetAtFormatted ?? ''} -
-
- ); - })} -
- ))} -
-
-
-
- - - - - - -

{updateAvailable ? 'Settings (Update available)' : 'Settings'}

-
-
+
+ )}