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
This commit is contained in:
Nelson Pires
2026-02-06 02:10:34 +02:00
committed by GitHub
parent c63651d934
commit 282d675a85
+6 -2
View File
@@ -893,7 +893,7 @@ export const Header: React.FC = () => {
const renderMobile = () => ( const renderMobile = () => (
<div className="app-region-drag relative flex items-center justify-between gap-2 px-3 py-2 select-none"> <div className="app-region-drag relative flex items-center justify-between gap-2 px-3 py-2 select-none">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2 shrink-0">
{/* Show back button when sessions sidebar is open, otherwise show sessions toggle */} {/* Show back button when sessions sidebar is open, otherwise show sessions toggle */}
{isSessionSwitcherOpen ? ( {isSessionSwitcherOpen ? (
<button <button
@@ -929,7 +929,9 @@ export const Header: React.FC = () => {
{/* Hide tabs and right-side buttons when sessions sidebar is open */} {/* Hide tabs and right-side buttons when sessions sidebar is open */}
{!isSessionSwitcherOpen && ( {!isSessionSwitcherOpen && (
<div className="app-region-no-drag flex items-center gap-1"> <div className="app-region-no-drag flex min-w-0 flex-1 items-center">
<div className="flex min-w-0 flex-1 overflow-x-auto overflow-y-hidden scrollbar-hidden touch-pan-x overscroll-x-contain">
<div className="flex w-max items-center gap-1 pr-1">
<div className="flex items-center gap-0.5" role="tablist" aria-label="Main navigation"> <div className="flex items-center gap-0.5" role="tablist" aria-label="Main navigation">
{tabs.map((tab) => { {tabs.map((tab) => {
const isActive = activeMainTab === tab.id; const isActive = activeMainTab === tab.id;
@@ -1136,6 +1138,8 @@ export const Header: React.FC = () => {
</TooltipContent> </TooltipContent>
</Tooltip> </Tooltip>
</div> </div>
</div>
</div>
)} )}
</div> </div>
); );