From f171f6b9749edd50d1a1acf40c937d84222f52ec Mon Sep 17 00:00:00 2001 From: Paul Nothaft Date: Tue, 28 Apr 2026 23:51:19 +0200 Subject: [PATCH] refactor(settings): grouped left-rail nav replaces overflowing tab bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Settings page packed 13 tab buttons into a single horizontal nav that overflowed even at 1440px — items wrapped or got clipped, and "Webhooks" disappeared off the right edge entirely. Pattern was the right call at 5 tabs and broken at 13. Replaces the flat row with the macOS Settings / Stripe / GitHub pattern: - **Desktop (lg+)**: 220px sticky left rail with five labelled groups — General, Display, Privacy & Security, Integrations, System — and a lucide icon next to every item. Active state uses the existing primary token. Adds a section header on the right pane that echoes the active item so the context is obvious after a switch. - **Mobile (< lg)**: native setActiveTab(e.target.value as TabType)} + className="w-full rounded-md border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 px-3 py-2 text-sm font-medium text-neutral-900 dark:text-neutral-100 focus:outline-none focus:ring-2 focus:ring-primary-500" + > + {navGroups.map((group) => ( + + {group.items.map((item) => ( + + ))} + + ))} + + - {/* Tab Content */} + {/* Desktop: grouped left rail. Sticky so the nav stays visible + while the right pane scrolls through long forms. */} + + +
+ {/* Section heading echoes the active nav item — anchors the user + after they switch, especially after a mobile select change. */} +
+
+ +

+ {activeItem.label} +

+
+
+ + {/* Tab Content */} {activeTab === 'general' && ( { {activeTab === 'apiTokens' && } {activeTab === 'webhooks' && } +
+ ); };